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 master 2b515b7d Lines: 1120 33274 3.4 %
Date: 2024-02-28 12:06:22 Functions: 14 2157 0.6 %

          Line data    Source code
       1             : 
       2             : /* Python wrapper functions auto-generated by pidl */
       3             : #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
       4             : #include "lib/replace/system/python.h"
       5             : #include "python/py3compat.h"
       6             : #include "includes.h"
       7             : #include "python/modules.h"
       8             : #include <pytalloc.h>
       9             : #include "librpc/rpc/pyrpc.h"
      10             : #include "librpc/rpc/pyrpc_util.h"
      11             : #include "bin/default/librpc/gen_ndr/ndr_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 = pytalloc_get_ptr(obj);
     256           0 :         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 = pytalloc_get_ptr(py_obj);
     277           0 :         if (value == NULL) {
     278           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: 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           0 :                         const char *test_str;
     287           0 :                         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 :                                         return -1;
     293             :                                 }
     294           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     295           0 :                         } else if (PyBytes_Check(value)) {
     296           0 :                                 test_str = PyBytes_AS_STRING(value);
     297             :                         } else {
     298           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     299           0 :                                 return -1;
     300             :                         }
     301           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     302           0 :                         if (unicode != NULL) {
     303           0 :                                 Py_DECREF(unicode);
     304             :                         }
     305           0 :                         if (talloc_str == NULL) {
     306           0 :                                 PyErr_NoMemory();
     307           0 :                                 return -1;
     308             :                         }
     309           0 :                         object->device = talloc_str;
     310             :                 }
     311             :         }
     312           0 :         return 0;
     313             : }
     314             : 
     315             : static PyGetSetDef py_srvsvc_NetCharDevInfo0_getsetters[] = {
     316             :         {
     317             :                 .name = discard_const_p(char, "device"),
     318             :                 .get = py_srvsvc_NetCharDevInfo0_get_device,
     319             :                 .set = py_srvsvc_NetCharDevInfo0_set_device,
     320             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     321             :         },
     322             :         { .name = NULL }
     323             : };
     324             : 
     325           0 : static PyObject *py_srvsvc_NetCharDevInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     326             : {
     327           0 :         return pytalloc_new(struct srvsvc_NetCharDevInfo0, type);
     328             : }
     329             : 
     330             : 
     331             : static PyTypeObject srvsvc_NetCharDevInfo0_Type = {
     332             :         PyVarObject_HEAD_INIT(NULL, 0)
     333             :         .tp_name = "srvsvc.NetCharDevInfo0",
     334             :         .tp_getset = py_srvsvc_NetCharDevInfo0_getsetters,
     335             :         .tp_methods = NULL,
     336             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     337             :         .tp_new = py_srvsvc_NetCharDevInfo0_new,
     338             : };
     339             : 
     340             : 
     341           0 : static PyObject *py_srvsvc_NetCharDevCtr0_get_count(PyObject *obj, void *closure)
     342             : {
     343           0 :         struct srvsvc_NetCharDevCtr0 *object = pytalloc_get_ptr(obj);
     344           0 :         PyObject *py_count;
     345           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
     346           0 :         return py_count;
     347             : }
     348             : 
     349           0 : static int py_srvsvc_NetCharDevCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
     350             : {
     351           0 :         struct srvsvc_NetCharDevCtr0 *object = pytalloc_get_ptr(py_obj);
     352           0 :         if (value == NULL) {
     353           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
     354           0 :                 return -1;
     355             :         }
     356             :         {
     357           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
     358           0 :                 if (PyLong_Check(value)) {
     359           0 :                         unsigned long long test_var;
     360           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     361           0 :                         if (PyErr_Occurred() != NULL) {
     362           0 :                                 return -1;
     363             :                         }
     364           0 :                         if (test_var > uint_max) {
     365           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     366             :                                   PyLong_Type.tp_name, uint_max, test_var);
     367           0 :                                 return -1;
     368             :                         }
     369           0 :                         object->count = test_var;
     370             :                 } else {
     371           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     372             :                           PyLong_Type.tp_name);
     373           0 :                         return -1;
     374             :                 }
     375             :         }
     376           0 :         return 0;
     377             : }
     378             : 
     379           0 : static PyObject *py_srvsvc_NetCharDevCtr0_get_array(PyObject *obj, void *closure)
     380             : {
     381           0 :         struct srvsvc_NetCharDevCtr0 *object = pytalloc_get_ptr(obj);
     382           0 :         PyObject *py_array;
     383           0 :         if (object->array == NULL) {
     384           0 :                 Py_RETURN_NONE;
     385             :         }
     386           0 :         if (object->array == NULL) {
     387           0 :                 py_array = Py_None;
     388           0 :                 Py_INCREF(py_array);
     389             :         } else {
     390           0 :                 py_array = PyList_New(object->count);
     391           0 :                 if (py_array == NULL) {
     392           0 :                         return NULL;
     393             :                 }
     394             :                 {
     395             :                         int array_cntr_1;
     396           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
     397           0 :                                 PyObject *py_array_1;
     398           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevInfo0_Type, object->array, &(object->array)[array_cntr_1]);
     399           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
     400             :                         }
     401             :                 }
     402             :         }
     403           0 :         return py_array;
     404             : }
     405             : 
     406           0 : static int py_srvsvc_NetCharDevCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
     407             : {
     408           0 :         struct srvsvc_NetCharDevCtr0 *object = pytalloc_get_ptr(py_obj);
     409           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
     410           0 :         if (value == NULL) {
     411           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
     412           0 :                 return -1;
     413             :         }
     414           0 :         if (value == Py_None) {
     415           0 :                 object->array = NULL;
     416             :         } else {
     417           0 :                 object->array = NULL;
     418           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     419             :                 {
     420           0 :                         int array_cntr_1;
     421           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
     422           0 :                         if (!object->array) { return -1; }
     423           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
     424           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
     425           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
     426           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
     427           0 :                                         return -1;
     428             :                                 }
     429           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
     430           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
     431           0 :                                         PyErr_NoMemory();
     432           0 :                                         return -1;
     433             :                                 }
     434           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetCharDevInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
     435             :                         }
     436             :                 }
     437             :         }
     438           0 :         return 0;
     439             : }
     440             : 
     441             : static PyGetSetDef py_srvsvc_NetCharDevCtr0_getsetters[] = {
     442             :         {
     443             :                 .name = discard_const_p(char, "count"),
     444             :                 .get = py_srvsvc_NetCharDevCtr0_get_count,
     445             :                 .set = py_srvsvc_NetCharDevCtr0_set_count,
     446             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     447             :         },
     448             :         {
     449             :                 .name = discard_const_p(char, "array"),
     450             :                 .get = py_srvsvc_NetCharDevCtr0_get_array,
     451             :                 .set = py_srvsvc_NetCharDevCtr0_set_array,
     452             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevInfo0")
     453             :         },
     454             :         { .name = NULL }
     455             : };
     456             : 
     457           0 : static PyObject *py_srvsvc_NetCharDevCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     458             : {
     459           0 :         return pytalloc_new(struct srvsvc_NetCharDevCtr0, type);
     460             : }
     461             : 
     462             : 
     463             : static PyTypeObject srvsvc_NetCharDevCtr0_Type = {
     464             :         PyVarObject_HEAD_INIT(NULL, 0)
     465             :         .tp_name = "srvsvc.NetCharDevCtr0",
     466             :         .tp_getset = py_srvsvc_NetCharDevCtr0_getsetters,
     467             :         .tp_methods = NULL,
     468             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     469             :         .tp_new = py_srvsvc_NetCharDevCtr0_new,
     470             : };
     471             : 
     472             : 
     473           0 : static PyObject *py_srvsvc_NetCharDevInfo1_get_device(PyObject *obj, void *closure)
     474             : {
     475           0 :         struct srvsvc_NetCharDevInfo1 *object = pytalloc_get_ptr(obj);
     476           0 :         PyObject *py_device;
     477           0 :         if (object->device == NULL) {
     478           0 :                 Py_RETURN_NONE;
     479             :         }
     480           0 :         if (object->device == NULL) {
     481           0 :                 py_device = Py_None;
     482           0 :                 Py_INCREF(py_device);
     483             :         } else {
     484           0 :                 if (object->device == NULL) {
     485           0 :                         py_device = Py_None;
     486           0 :                         Py_INCREF(py_device);
     487             :                 } else {
     488           0 :                         py_device = PyUnicode_Decode(object->device, strlen(object->device), "utf-8", "ignore");
     489             :                 }
     490             :         }
     491           0 :         return py_device;
     492             : }
     493             : 
     494           0 : static int py_srvsvc_NetCharDevInfo1_set_device(PyObject *py_obj, PyObject *value, void *closure)
     495             : {
     496           0 :         struct srvsvc_NetCharDevInfo1 *object = pytalloc_get_ptr(py_obj);
     497           0 :         if (value == NULL) {
     498           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->device");
     499           0 :                 return -1;
     500             :         }
     501           0 :         if (value == Py_None) {
     502           0 :                 object->device = NULL;
     503             :         } else {
     504           0 :                 object->device = NULL;
     505             :                 {
     506           0 :                         const char *test_str;
     507           0 :                         const char *talloc_str;
     508           0 :                         PyObject *unicode = NULL;
     509           0 :                         if (PyUnicode_Check(value)) {
     510           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     511           0 :                                 if (unicode == NULL) {
     512           0 :                                         return -1;
     513             :                                 }
     514           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     515           0 :                         } else if (PyBytes_Check(value)) {
     516           0 :                                 test_str = PyBytes_AS_STRING(value);
     517             :                         } else {
     518           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     519           0 :                                 return -1;
     520             :                         }
     521           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     522           0 :                         if (unicode != NULL) {
     523           0 :                                 Py_DECREF(unicode);
     524             :                         }
     525           0 :                         if (talloc_str == NULL) {
     526           0 :                                 PyErr_NoMemory();
     527           0 :                                 return -1;
     528             :                         }
     529           0 :                         object->device = talloc_str;
     530             :                 }
     531             :         }
     532           0 :         return 0;
     533             : }
     534             : 
     535           0 : static PyObject *py_srvsvc_NetCharDevInfo1_get_status(PyObject *obj, void *closure)
     536             : {
     537           0 :         struct srvsvc_NetCharDevInfo1 *object = pytalloc_get_ptr(obj);
     538           0 :         PyObject *py_status;
     539           0 :         py_status = PyLong_FromUnsignedLongLong((uint32_t)(object->status));
     540           0 :         return py_status;
     541             : }
     542             : 
     543           0 : static int py_srvsvc_NetCharDevInfo1_set_status(PyObject *py_obj, PyObject *value, void *closure)
     544             : {
     545           0 :         struct srvsvc_NetCharDevInfo1 *object = pytalloc_get_ptr(py_obj);
     546           0 :         if (value == NULL) {
     547           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->status");
     548           0 :                 return -1;
     549             :         }
     550             :         {
     551           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->status));
     552           0 :                 if (PyLong_Check(value)) {
     553           0 :                         unsigned long long test_var;
     554           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     555           0 :                         if (PyErr_Occurred() != NULL) {
     556           0 :                                 return -1;
     557             :                         }
     558           0 :                         if (test_var > uint_max) {
     559           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     560             :                                   PyLong_Type.tp_name, uint_max, test_var);
     561           0 :                                 return -1;
     562             :                         }
     563           0 :                         object->status = test_var;
     564             :                 } else {
     565           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     566             :                           PyLong_Type.tp_name);
     567           0 :                         return -1;
     568             :                 }
     569             :         }
     570           0 :         return 0;
     571             : }
     572             : 
     573           0 : static PyObject *py_srvsvc_NetCharDevInfo1_get_user(PyObject *obj, void *closure)
     574             : {
     575           0 :         struct srvsvc_NetCharDevInfo1 *object = pytalloc_get_ptr(obj);
     576           0 :         PyObject *py_user;
     577           0 :         if (object->user == NULL) {
     578           0 :                 Py_RETURN_NONE;
     579             :         }
     580           0 :         if (object->user == NULL) {
     581           0 :                 py_user = Py_None;
     582           0 :                 Py_INCREF(py_user);
     583             :         } else {
     584           0 :                 if (object->user == NULL) {
     585           0 :                         py_user = Py_None;
     586           0 :                         Py_INCREF(py_user);
     587             :                 } else {
     588           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
     589             :                 }
     590             :         }
     591           0 :         return py_user;
     592             : }
     593             : 
     594           0 : static int py_srvsvc_NetCharDevInfo1_set_user(PyObject *py_obj, PyObject *value, void *closure)
     595             : {
     596           0 :         struct srvsvc_NetCharDevInfo1 *object = pytalloc_get_ptr(py_obj);
     597           0 :         if (value == NULL) {
     598           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user");
     599           0 :                 return -1;
     600             :         }
     601           0 :         if (value == Py_None) {
     602           0 :                 object->user = NULL;
     603             :         } else {
     604           0 :                 object->user = NULL;
     605             :                 {
     606           0 :                         const char *test_str;
     607           0 :                         const char *talloc_str;
     608           0 :                         PyObject *unicode = NULL;
     609           0 :                         if (PyUnicode_Check(value)) {
     610           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     611           0 :                                 if (unicode == NULL) {
     612           0 :                                         return -1;
     613             :                                 }
     614           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     615           0 :                         } else if (PyBytes_Check(value)) {
     616           0 :                                 test_str = PyBytes_AS_STRING(value);
     617             :                         } else {
     618           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     619           0 :                                 return -1;
     620             :                         }
     621           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     622           0 :                         if (unicode != NULL) {
     623           0 :                                 Py_DECREF(unicode);
     624             :                         }
     625           0 :                         if (talloc_str == NULL) {
     626           0 :                                 PyErr_NoMemory();
     627           0 :                                 return -1;
     628             :                         }
     629           0 :                         object->user = talloc_str;
     630             :                 }
     631             :         }
     632           0 :         return 0;
     633             : }
     634             : 
     635           0 : static PyObject *py_srvsvc_NetCharDevInfo1_get_time(PyObject *obj, void *closure)
     636             : {
     637           0 :         struct srvsvc_NetCharDevInfo1 *object = pytalloc_get_ptr(obj);
     638           0 :         PyObject *py_time;
     639           0 :         py_time = PyLong_FromUnsignedLongLong((uint32_t)(object->time));
     640           0 :         return py_time;
     641             : }
     642             : 
     643           0 : static int py_srvsvc_NetCharDevInfo1_set_time(PyObject *py_obj, PyObject *value, void *closure)
     644             : {
     645           0 :         struct srvsvc_NetCharDevInfo1 *object = pytalloc_get_ptr(py_obj);
     646           0 :         if (value == NULL) {
     647           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->time");
     648           0 :                 return -1;
     649             :         }
     650             :         {
     651           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
     652           0 :                 if (PyLong_Check(value)) {
     653           0 :                         unsigned long long test_var;
     654           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     655           0 :                         if (PyErr_Occurred() != NULL) {
     656           0 :                                 return -1;
     657             :                         }
     658           0 :                         if (test_var > uint_max) {
     659           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     660             :                                   PyLong_Type.tp_name, uint_max, test_var);
     661           0 :                                 return -1;
     662             :                         }
     663           0 :                         object->time = test_var;
     664             :                 } else {
     665           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     666             :                           PyLong_Type.tp_name);
     667           0 :                         return -1;
     668             :                 }
     669             :         }
     670           0 :         return 0;
     671             : }
     672             : 
     673             : static PyGetSetDef py_srvsvc_NetCharDevInfo1_getsetters[] = {
     674             :         {
     675             :                 .name = discard_const_p(char, "device"),
     676             :                 .get = py_srvsvc_NetCharDevInfo1_get_device,
     677             :                 .set = py_srvsvc_NetCharDevInfo1_set_device,
     678             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     679             :         },
     680             :         {
     681             :                 .name = discard_const_p(char, "status"),
     682             :                 .get = py_srvsvc_NetCharDevInfo1_get_status,
     683             :                 .set = py_srvsvc_NetCharDevInfo1_set_status,
     684             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     685             :         },
     686             :         {
     687             :                 .name = discard_const_p(char, "user"),
     688             :                 .get = py_srvsvc_NetCharDevInfo1_get_user,
     689             :                 .set = py_srvsvc_NetCharDevInfo1_set_user,
     690             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     691             :         },
     692             :         {
     693             :                 .name = discard_const_p(char, "time"),
     694             :                 .get = py_srvsvc_NetCharDevInfo1_get_time,
     695             :                 .set = py_srvsvc_NetCharDevInfo1_set_time,
     696             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     697             :         },
     698             :         { .name = NULL }
     699             : };
     700             : 
     701           0 : static PyObject *py_srvsvc_NetCharDevInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     702             : {
     703           0 :         return pytalloc_new(struct srvsvc_NetCharDevInfo1, type);
     704             : }
     705             : 
     706             : 
     707             : static PyTypeObject srvsvc_NetCharDevInfo1_Type = {
     708             :         PyVarObject_HEAD_INIT(NULL, 0)
     709             :         .tp_name = "srvsvc.NetCharDevInfo1",
     710             :         .tp_getset = py_srvsvc_NetCharDevInfo1_getsetters,
     711             :         .tp_methods = NULL,
     712             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     713             :         .tp_new = py_srvsvc_NetCharDevInfo1_new,
     714             : };
     715             : 
     716             : 
     717           0 : static PyObject *py_srvsvc_NetCharDevCtr1_get_count(PyObject *obj, void *closure)
     718             : {
     719           0 :         struct srvsvc_NetCharDevCtr1 *object = pytalloc_get_ptr(obj);
     720           0 :         PyObject *py_count;
     721           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
     722           0 :         return py_count;
     723             : }
     724             : 
     725           0 : static int py_srvsvc_NetCharDevCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
     726             : {
     727           0 :         struct srvsvc_NetCharDevCtr1 *object = pytalloc_get_ptr(py_obj);
     728           0 :         if (value == NULL) {
     729           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
     730           0 :                 return -1;
     731             :         }
     732             :         {
     733           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
     734           0 :                 if (PyLong_Check(value)) {
     735           0 :                         unsigned long long test_var;
     736           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     737           0 :                         if (PyErr_Occurred() != NULL) {
     738           0 :                                 return -1;
     739             :                         }
     740           0 :                         if (test_var > uint_max) {
     741           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     742             :                                   PyLong_Type.tp_name, uint_max, test_var);
     743           0 :                                 return -1;
     744             :                         }
     745           0 :                         object->count = test_var;
     746             :                 } else {
     747           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     748             :                           PyLong_Type.tp_name);
     749           0 :                         return -1;
     750             :                 }
     751             :         }
     752           0 :         return 0;
     753             : }
     754             : 
     755           0 : static PyObject *py_srvsvc_NetCharDevCtr1_get_array(PyObject *obj, void *closure)
     756             : {
     757           0 :         struct srvsvc_NetCharDevCtr1 *object = pytalloc_get_ptr(obj);
     758           0 :         PyObject *py_array;
     759           0 :         if (object->array == NULL) {
     760           0 :                 Py_RETURN_NONE;
     761             :         }
     762           0 :         if (object->array == NULL) {
     763           0 :                 py_array = Py_None;
     764           0 :                 Py_INCREF(py_array);
     765             :         } else {
     766           0 :                 py_array = PyList_New(object->count);
     767           0 :                 if (py_array == NULL) {
     768           0 :                         return NULL;
     769             :                 }
     770             :                 {
     771             :                         int array_cntr_1;
     772           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
     773           0 :                                 PyObject *py_array_1;
     774           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevInfo1_Type, object->array, &(object->array)[array_cntr_1]);
     775           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
     776             :                         }
     777             :                 }
     778             :         }
     779           0 :         return py_array;
     780             : }
     781             : 
     782           0 : static int py_srvsvc_NetCharDevCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
     783             : {
     784           0 :         struct srvsvc_NetCharDevCtr1 *object = pytalloc_get_ptr(py_obj);
     785           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
     786           0 :         if (value == NULL) {
     787           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
     788           0 :                 return -1;
     789             :         }
     790           0 :         if (value == Py_None) {
     791           0 :                 object->array = NULL;
     792             :         } else {
     793           0 :                 object->array = NULL;
     794           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     795             :                 {
     796           0 :                         int array_cntr_1;
     797           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
     798           0 :                         if (!object->array) { return -1; }
     799           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
     800           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
     801           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
     802           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
     803           0 :                                         return -1;
     804             :                                 }
     805           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
     806           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
     807           0 :                                         PyErr_NoMemory();
     808           0 :                                         return -1;
     809             :                                 }
     810           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
     811             :                         }
     812             :                 }
     813             :         }
     814           0 :         return 0;
     815             : }
     816             : 
     817             : static PyGetSetDef py_srvsvc_NetCharDevCtr1_getsetters[] = {
     818             :         {
     819             :                 .name = discard_const_p(char, "count"),
     820             :                 .get = py_srvsvc_NetCharDevCtr1_get_count,
     821             :                 .set = py_srvsvc_NetCharDevCtr1_set_count,
     822             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     823             :         },
     824             :         {
     825             :                 .name = discard_const_p(char, "array"),
     826             :                 .get = py_srvsvc_NetCharDevCtr1_get_array,
     827             :                 .set = py_srvsvc_NetCharDevCtr1_set_array,
     828             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevInfo1")
     829             :         },
     830             :         { .name = NULL }
     831             : };
     832             : 
     833           0 : static PyObject *py_srvsvc_NetCharDevCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     834             : {
     835           0 :         return pytalloc_new(struct srvsvc_NetCharDevCtr1, type);
     836             : }
     837             : 
     838             : 
     839             : static PyTypeObject srvsvc_NetCharDevCtr1_Type = {
     840             :         PyVarObject_HEAD_INIT(NULL, 0)
     841             :         .tp_name = "srvsvc.NetCharDevCtr1",
     842             :         .tp_getset = py_srvsvc_NetCharDevCtr1_getsetters,
     843             :         .tp_methods = NULL,
     844             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     845             :         .tp_new = py_srvsvc_NetCharDevCtr1_new,
     846             : };
     847             : 
     848           0 : static PyObject *py_import_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevInfo *in)
     849             : {
     850           0 :         PyObject *ret;
     851             : 
     852           0 :         switch (level) {
     853           0 :                 case 0:
     854           0 :                         if (in->info0 == NULL) {
     855           0 :                                 ret = Py_None;
     856           0 :                                 Py_INCREF(ret);
     857             :                         } else {
     858           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevInfo0_Type, in->info0, in->info0);
     859             :                         }
     860           0 :                         return ret;
     861             : 
     862           0 :                 case 1:
     863           0 :                         if (in->info1 == NULL) {
     864           0 :                                 ret = Py_None;
     865           0 :                                 Py_INCREF(ret);
     866             :                         } else {
     867           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevInfo1_Type, in->info1, in->info1);
     868             :                         }
     869           0 :                         return ret;
     870             : 
     871           0 :                 default:
     872           0 :                         ret = Py_None;
     873           0 :                         Py_INCREF(ret);
     874           0 :                         return ret;
     875             : 
     876             :         }
     877             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
     878             :         return NULL;
     879             : }
     880             : 
     881           0 : static union srvsvc_NetCharDevInfo *py_export_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
     882             : {
     883           0 :         union srvsvc_NetCharDevInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevInfo);
     884           0 :         switch (level) {
     885           0 :                 case 0:
     886           0 :                         if (in == NULL) {
     887           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info0");
     888           0 :                                 talloc_free(ret); return NULL;
     889             :                         }
     890           0 :                         if (in == Py_None) {
     891           0 :                                 ret->info0 = NULL;
     892             :                         } else {
     893           0 :                                 ret->info0 = NULL;
     894           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevInfo0_Type, in, talloc_free(ret); return NULL;);
     895           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
     896           0 :                                         PyErr_NoMemory();
     897           0 :                                         talloc_free(ret); return NULL;
     898             :                                 }
     899           0 :                                 ret->info0 = (struct srvsvc_NetCharDevInfo0 *)pytalloc_get_ptr(in);
     900             :                         }
     901           0 :                         break;
     902             : 
     903           0 :                 case 1:
     904           0 :                         if (in == NULL) {
     905           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1");
     906           0 :                                 talloc_free(ret); return NULL;
     907             :                         }
     908           0 :                         if (in == Py_None) {
     909           0 :                                 ret->info1 = NULL;
     910             :                         } else {
     911           0 :                                 ret->info1 = NULL;
     912           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevInfo1_Type, in, talloc_free(ret); return NULL;);
     913           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
     914           0 :                                         PyErr_NoMemory();
     915           0 :                                         talloc_free(ret); return NULL;
     916             :                                 }
     917           0 :                                 ret->info1 = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(in);
     918             :                         }
     919           0 :                         break;
     920             : 
     921           0 :                 default:
     922           0 :                         break;
     923             : 
     924             :         }
     925             : 
     926           0 :         return ret;
     927             : }
     928             : 
     929           0 : static PyObject *py_srvsvc_NetCharDevInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     930             : {
     931           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
     932           0 :         PyObject *mem_ctx_obj = NULL;
     933           0 :         TALLOC_CTX *mem_ctx = NULL;
     934           0 :         int level = 0;
     935           0 :         PyObject *in_obj = NULL;
     936           0 :         union srvsvc_NetCharDevInfo *in = NULL;
     937             : 
     938           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
     939             :                 discard_const_p(char *, kwnames),
     940             :                 &mem_ctx_obj,
     941             :                 &level,
     942             :                 &in_obj)) {
     943           0 :                 return NULL;
     944             :         }
     945           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
     946           0 :         if (mem_ctx == NULL) {
     947           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
     948           0 :                 return NULL;
     949             :         }
     950           0 :         in = (union srvsvc_NetCharDevInfo *)pytalloc_get_ptr(in_obj);
     951           0 :         if (in == NULL) {
     952           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetCharDevInfo!");
     953           0 :                 return NULL;
     954             :         }
     955             : 
     956           0 :         return py_import_srvsvc_NetCharDevInfo(mem_ctx, level, in);
     957             : }
     958             : 
     959           0 : static PyObject *py_srvsvc_NetCharDevInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     960             : {
     961           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
     962           0 :         PyObject *mem_ctx_obj = NULL;
     963           0 :         TALLOC_CTX *mem_ctx = NULL;
     964           0 :         int level = 0;
     965           0 :         PyObject *in = NULL;
     966           0 :         union srvsvc_NetCharDevInfo *out = NULL;
     967             : 
     968           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
     969             :                 discard_const_p(char *, kwnames),
     970             :                 &mem_ctx_obj,
     971             :                 &level,
     972             :                 &in)) {
     973           0 :                 return NULL;
     974             :         }
     975           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
     976           0 :         if (mem_ctx == NULL) {
     977           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
     978           0 :                 return NULL;
     979             :         }
     980             : 
     981           0 :         out = py_export_srvsvc_NetCharDevInfo(mem_ctx, level, in);
     982           0 :         if (out == NULL) {
     983           0 :                 return NULL;
     984             :         }
     985             : 
     986           0 :         return pytalloc_GenericObject_reference(out);
     987             : }
     988             : 
     989             : static PyMethodDef py_srvsvc_NetCharDevInfo_methods[] = {
     990             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevInfo_import),
     991             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
     992             :                 "T.__import__(mem_ctx, level, in) => ret." },
     993             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevInfo_export),
     994             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
     995             :                 "T.__export__(mem_ctx, level, in) => ret." },
     996             :         { NULL, NULL, 0, NULL }
     997             : };
     998             : 
     999           0 : static PyObject *py_srvsvc_NetCharDevInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1000             : {
    1001           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    1002           0 :         return NULL;
    1003             : }
    1004             : 
    1005             : 
    1006             : static PyTypeObject srvsvc_NetCharDevInfo_Type = {
    1007             :         PyVarObject_HEAD_INIT(NULL, 0)
    1008             :         .tp_name = "srvsvc.NetCharDevInfo",
    1009             :         .tp_getset = NULL,
    1010             :         .tp_methods = py_srvsvc_NetCharDevInfo_methods,
    1011             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1012             :         .tp_new = py_srvsvc_NetCharDevInfo_new,
    1013             : };
    1014             : 
    1015           0 : static PyObject *py_import_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevCtr *in)
    1016             : {
    1017           0 :         PyObject *ret;
    1018             : 
    1019           0 :         switch (level) {
    1020           0 :                 case 0:
    1021           0 :                         if (in->ctr0 == NULL) {
    1022           0 :                                 ret = Py_None;
    1023           0 :                                 Py_INCREF(ret);
    1024             :                         } else {
    1025           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevCtr0_Type, in->ctr0, in->ctr0);
    1026             :                         }
    1027           0 :                         return ret;
    1028             : 
    1029           0 :                 case 1:
    1030           0 :                         if (in->ctr1 == NULL) {
    1031           0 :                                 ret = Py_None;
    1032           0 :                                 Py_INCREF(ret);
    1033             :                         } else {
    1034           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevCtr1_Type, in->ctr1, in->ctr1);
    1035             :                         }
    1036           0 :                         return ret;
    1037             : 
    1038           0 :                 default:
    1039           0 :                         ret = Py_None;
    1040           0 :                         Py_INCREF(ret);
    1041           0 :                         return ret;
    1042             : 
    1043             :         }
    1044             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    1045             :         return NULL;
    1046             : }
    1047             : 
    1048           0 : static union srvsvc_NetCharDevCtr *py_export_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    1049             : {
    1050           0 :         union srvsvc_NetCharDevCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevCtr);
    1051           0 :         switch (level) {
    1052           0 :                 case 0:
    1053           0 :                         if (in == NULL) {
    1054           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr0");
    1055           0 :                                 talloc_free(ret); return NULL;
    1056             :                         }
    1057           0 :                         if (in == Py_None) {
    1058           0 :                                 ret->ctr0 = NULL;
    1059             :                         } else {
    1060           0 :                                 ret->ctr0 = NULL;
    1061           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevCtr0_Type, in, talloc_free(ret); return NULL;);
    1062           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    1063           0 :                                         PyErr_NoMemory();
    1064           0 :                                         talloc_free(ret); return NULL;
    1065             :                                 }
    1066           0 :                                 ret->ctr0 = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(in);
    1067             :                         }
    1068           0 :                         break;
    1069             : 
    1070           0 :                 case 1:
    1071           0 :                         if (in == NULL) {
    1072           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr1");
    1073           0 :                                 talloc_free(ret); return NULL;
    1074             :                         }
    1075           0 :                         if (in == Py_None) {
    1076           0 :                                 ret->ctr1 = NULL;
    1077             :                         } else {
    1078           0 :                                 ret->ctr1 = NULL;
    1079           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevCtr1_Type, in, talloc_free(ret); return NULL;);
    1080           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    1081           0 :                                         PyErr_NoMemory();
    1082           0 :                                         talloc_free(ret); return NULL;
    1083             :                                 }
    1084           0 :                                 ret->ctr1 = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(in);
    1085             :                         }
    1086           0 :                         break;
    1087             : 
    1088           0 :                 default:
    1089           0 :                         break;
    1090             : 
    1091             :         }
    1092             : 
    1093           0 :         return ret;
    1094             : }
    1095             : 
    1096           0 : static PyObject *py_srvsvc_NetCharDevCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1097             : {
    1098           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    1099           0 :         PyObject *mem_ctx_obj = NULL;
    1100           0 :         TALLOC_CTX *mem_ctx = NULL;
    1101           0 :         int level = 0;
    1102           0 :         PyObject *in_obj = NULL;
    1103           0 :         union srvsvc_NetCharDevCtr *in = NULL;
    1104             : 
    1105           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    1106             :                 discard_const_p(char *, kwnames),
    1107             :                 &mem_ctx_obj,
    1108             :                 &level,
    1109             :                 &in_obj)) {
    1110           0 :                 return NULL;
    1111             :         }
    1112           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    1113           0 :         if (mem_ctx == NULL) {
    1114           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    1115           0 :                 return NULL;
    1116             :         }
    1117           0 :         in = (union srvsvc_NetCharDevCtr *)pytalloc_get_ptr(in_obj);
    1118           0 :         if (in == NULL) {
    1119           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetCharDevCtr!");
    1120           0 :                 return NULL;
    1121             :         }
    1122             : 
    1123           0 :         return py_import_srvsvc_NetCharDevCtr(mem_ctx, level, in);
    1124             : }
    1125             : 
    1126           0 : static PyObject *py_srvsvc_NetCharDevCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1127             : {
    1128           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    1129           0 :         PyObject *mem_ctx_obj = NULL;
    1130           0 :         TALLOC_CTX *mem_ctx = NULL;
    1131           0 :         int level = 0;
    1132           0 :         PyObject *in = NULL;
    1133           0 :         union srvsvc_NetCharDevCtr *out = NULL;
    1134             : 
    1135           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    1136             :                 discard_const_p(char *, kwnames),
    1137             :                 &mem_ctx_obj,
    1138             :                 &level,
    1139             :                 &in)) {
    1140           0 :                 return NULL;
    1141             :         }
    1142           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    1143           0 :         if (mem_ctx == NULL) {
    1144           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    1145           0 :                 return NULL;
    1146             :         }
    1147             : 
    1148           0 :         out = py_export_srvsvc_NetCharDevCtr(mem_ctx, level, in);
    1149           0 :         if (out == NULL) {
    1150           0 :                 return NULL;
    1151             :         }
    1152             : 
    1153           0 :         return pytalloc_GenericObject_reference(out);
    1154             : }
    1155             : 
    1156             : static PyMethodDef py_srvsvc_NetCharDevCtr_methods[] = {
    1157             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevCtr_import),
    1158             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    1159             :                 "T.__import__(mem_ctx, level, in) => ret." },
    1160             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevCtr_export),
    1161             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    1162             :                 "T.__export__(mem_ctx, level, in) => ret." },
    1163             :         { NULL, NULL, 0, NULL }
    1164             : };
    1165             : 
    1166           0 : static PyObject *py_srvsvc_NetCharDevCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1167             : {
    1168           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    1169           0 :         return NULL;
    1170             : }
    1171             : 
    1172             : 
    1173             : static PyTypeObject srvsvc_NetCharDevCtr_Type = {
    1174             :         PyVarObject_HEAD_INIT(NULL, 0)
    1175             :         .tp_name = "srvsvc.NetCharDevCtr",
    1176             :         .tp_getset = NULL,
    1177             :         .tp_methods = py_srvsvc_NetCharDevCtr_methods,
    1178             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1179             :         .tp_new = py_srvsvc_NetCharDevCtr_new,
    1180             : };
    1181             : 
    1182             : 
    1183           0 : static PyObject *py_srvsvc_NetCharDevInfoCtr_get_level(PyObject *obj, void *closure)
    1184             : {
    1185           0 :         struct srvsvc_NetCharDevInfoCtr *object = pytalloc_get_ptr(obj);
    1186           0 :         PyObject *py_level;
    1187           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->level));
    1188           0 :         return py_level;
    1189             : }
    1190             : 
    1191           0 : static int py_srvsvc_NetCharDevInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
    1192             : {
    1193           0 :         struct srvsvc_NetCharDevInfoCtr *object = pytalloc_get_ptr(py_obj);
    1194           0 :         if (value == NULL) {
    1195           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->level");
    1196           0 :                 return -1;
    1197             :         }
    1198             :         {
    1199           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    1200           0 :                 if (PyLong_Check(value)) {
    1201           0 :                         unsigned long long test_var;
    1202           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1203           0 :                         if (PyErr_Occurred() != NULL) {
    1204           0 :                                 return -1;
    1205             :                         }
    1206           0 :                         if (test_var > uint_max) {
    1207           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1208             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1209           0 :                                 return -1;
    1210             :                         }
    1211           0 :                         object->level = test_var;
    1212             :                 } else {
    1213           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1214             :                           PyLong_Type.tp_name);
    1215           0 :                         return -1;
    1216             :                 }
    1217             :         }
    1218           0 :         return 0;
    1219             : }
    1220             : 
    1221           0 : static PyObject *py_srvsvc_NetCharDevInfoCtr_get_ctr(PyObject *obj, void *closure)
    1222             : {
    1223           0 :         struct srvsvc_NetCharDevInfoCtr *object = pytalloc_get_ptr(obj);
    1224           0 :         PyObject *py_ctr;
    1225           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetCharDevCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetCharDevCtr");
    1226           0 :         if (py_ctr == NULL) {
    1227           0 :                 return NULL;
    1228             :         }
    1229           0 :         return py_ctr;
    1230             : }
    1231             : 
    1232           0 : static int py_srvsvc_NetCharDevInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    1233             : {
    1234           0 :         struct srvsvc_NetCharDevInfoCtr *object = pytalloc_get_ptr(py_obj);
    1235           0 :         if (value == NULL) {
    1236           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ctr");
    1237           0 :                 return -1;
    1238             :         }
    1239             :         {
    1240           0 :                 union srvsvc_NetCharDevCtr *ctr_switch_0;
    1241           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");
    1242           0 :                 if (ctr_switch_0 == NULL) {
    1243           0 :                         return -1;
    1244             :                 }
    1245           0 :                 object->ctr = *ctr_switch_0;
    1246             :         }
    1247           0 :         return 0;
    1248             : }
    1249             : 
    1250             : static PyGetSetDef py_srvsvc_NetCharDevInfoCtr_getsetters[] = {
    1251             :         {
    1252             :                 .name = discard_const_p(char, "level"),
    1253             :                 .get = py_srvsvc_NetCharDevInfoCtr_get_level,
    1254             :                 .set = py_srvsvc_NetCharDevInfoCtr_set_level,
    1255             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1256             :         },
    1257             :         {
    1258             :                 .name = discard_const_p(char, "ctr"),
    1259             :                 .get = py_srvsvc_NetCharDevInfoCtr_get_ctr,
    1260             :                 .set = py_srvsvc_NetCharDevInfoCtr_set_ctr,
    1261             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevCtr")
    1262             :         },
    1263             :         { .name = NULL }
    1264             : };
    1265             : 
    1266           0 : static PyObject *py_srvsvc_NetCharDevInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1267             : {
    1268           0 :         return pytalloc_new(struct srvsvc_NetCharDevInfoCtr, type);
    1269             : }
    1270             : 
    1271             : 
    1272             : static PyTypeObject srvsvc_NetCharDevInfoCtr_Type = {
    1273             :         PyVarObject_HEAD_INIT(NULL, 0)
    1274             :         .tp_name = "srvsvc.NetCharDevInfoCtr",
    1275             :         .tp_getset = py_srvsvc_NetCharDevInfoCtr_getsetters,
    1276             :         .tp_methods = NULL,
    1277             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1278             :         .tp_new = py_srvsvc_NetCharDevInfoCtr_new,
    1279             : };
    1280             : 
    1281             : 
    1282           0 : static PyObject *py_srvsvc_NetCharDevQInfo0_get_device(PyObject *obj, void *closure)
    1283             : {
    1284           0 :         struct srvsvc_NetCharDevQInfo0 *object = pytalloc_get_ptr(obj);
    1285           0 :         PyObject *py_device;
    1286           0 :         if (object->device == NULL) {
    1287           0 :                 Py_RETURN_NONE;
    1288             :         }
    1289           0 :         if (object->device == NULL) {
    1290           0 :                 py_device = Py_None;
    1291           0 :                 Py_INCREF(py_device);
    1292             :         } else {
    1293           0 :                 if (object->device == NULL) {
    1294           0 :                         py_device = Py_None;
    1295           0 :                         Py_INCREF(py_device);
    1296             :                 } else {
    1297           0 :                         py_device = PyUnicode_Decode(object->device, strlen(object->device), "utf-8", "ignore");
    1298             :                 }
    1299             :         }
    1300           0 :         return py_device;
    1301             : }
    1302             : 
    1303           0 : static int py_srvsvc_NetCharDevQInfo0_set_device(PyObject *py_obj, PyObject *value, void *closure)
    1304             : {
    1305           0 :         struct srvsvc_NetCharDevQInfo0 *object = pytalloc_get_ptr(py_obj);
    1306           0 :         if (value == NULL) {
    1307           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->device");
    1308           0 :                 return -1;
    1309             :         }
    1310           0 :         if (value == Py_None) {
    1311           0 :                 object->device = NULL;
    1312             :         } else {
    1313           0 :                 object->device = NULL;
    1314             :                 {
    1315           0 :                         const char *test_str;
    1316           0 :                         const char *talloc_str;
    1317           0 :                         PyObject *unicode = NULL;
    1318           0 :                         if (PyUnicode_Check(value)) {
    1319           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    1320           0 :                                 if (unicode == NULL) {
    1321           0 :                                         return -1;
    1322             :                                 }
    1323           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    1324           0 :                         } else if (PyBytes_Check(value)) {
    1325           0 :                                 test_str = PyBytes_AS_STRING(value);
    1326             :                         } else {
    1327           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    1328           0 :                                 return -1;
    1329             :                         }
    1330           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    1331           0 :                         if (unicode != NULL) {
    1332           0 :                                 Py_DECREF(unicode);
    1333             :                         }
    1334           0 :                         if (talloc_str == NULL) {
    1335           0 :                                 PyErr_NoMemory();
    1336           0 :                                 return -1;
    1337             :                         }
    1338           0 :                         object->device = talloc_str;
    1339             :                 }
    1340             :         }
    1341           0 :         return 0;
    1342             : }
    1343             : 
    1344             : static PyGetSetDef py_srvsvc_NetCharDevQInfo0_getsetters[] = {
    1345             :         {
    1346             :                 .name = discard_const_p(char, "device"),
    1347             :                 .get = py_srvsvc_NetCharDevQInfo0_get_device,
    1348             :                 .set = py_srvsvc_NetCharDevQInfo0_set_device,
    1349             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1350             :         },
    1351             :         { .name = NULL }
    1352             : };
    1353             : 
    1354           0 : static PyObject *py_srvsvc_NetCharDevQInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1355             : {
    1356           0 :         return pytalloc_new(struct srvsvc_NetCharDevQInfo0, type);
    1357             : }
    1358             : 
    1359             : 
    1360             : static PyTypeObject srvsvc_NetCharDevQInfo0_Type = {
    1361             :         PyVarObject_HEAD_INIT(NULL, 0)
    1362             :         .tp_name = "srvsvc.NetCharDevQInfo0",
    1363             :         .tp_getset = py_srvsvc_NetCharDevQInfo0_getsetters,
    1364             :         .tp_methods = NULL,
    1365             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1366             :         .tp_new = py_srvsvc_NetCharDevQInfo0_new,
    1367             : };
    1368             : 
    1369             : 
    1370           0 : static PyObject *py_srvsvc_NetCharDevQCtr0_get_count(PyObject *obj, void *closure)
    1371             : {
    1372           0 :         struct srvsvc_NetCharDevQCtr0 *object = pytalloc_get_ptr(obj);
    1373           0 :         PyObject *py_count;
    1374           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    1375           0 :         return py_count;
    1376             : }
    1377             : 
    1378           0 : static int py_srvsvc_NetCharDevQCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
    1379             : {
    1380           0 :         struct srvsvc_NetCharDevQCtr0 *object = pytalloc_get_ptr(py_obj);
    1381           0 :         if (value == NULL) {
    1382           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    1383           0 :                 return -1;
    1384             :         }
    1385             :         {
    1386           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    1387           0 :                 if (PyLong_Check(value)) {
    1388           0 :                         unsigned long long test_var;
    1389           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1390           0 :                         if (PyErr_Occurred() != NULL) {
    1391           0 :                                 return -1;
    1392             :                         }
    1393           0 :                         if (test_var > uint_max) {
    1394           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1395             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1396           0 :                                 return -1;
    1397             :                         }
    1398           0 :                         object->count = test_var;
    1399             :                 } else {
    1400           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1401             :                           PyLong_Type.tp_name);
    1402           0 :                         return -1;
    1403             :                 }
    1404             :         }
    1405           0 :         return 0;
    1406             : }
    1407             : 
    1408           0 : static PyObject *py_srvsvc_NetCharDevQCtr0_get_array(PyObject *obj, void *closure)
    1409             : {
    1410           0 :         struct srvsvc_NetCharDevQCtr0 *object = pytalloc_get_ptr(obj);
    1411           0 :         PyObject *py_array;
    1412           0 :         if (object->array == NULL) {
    1413           0 :                 Py_RETURN_NONE;
    1414             :         }
    1415           0 :         if (object->array == NULL) {
    1416           0 :                 py_array = Py_None;
    1417           0 :                 Py_INCREF(py_array);
    1418             :         } else {
    1419           0 :                 py_array = PyList_New(object->count);
    1420           0 :                 if (py_array == NULL) {
    1421           0 :                         return NULL;
    1422             :                 }
    1423             :                 {
    1424             :                         int array_cntr_1;
    1425           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    1426           0 :                                 PyObject *py_array_1;
    1427           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo0_Type, object->array, &(object->array)[array_cntr_1]);
    1428           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    1429             :                         }
    1430             :                 }
    1431             :         }
    1432           0 :         return py_array;
    1433             : }
    1434             : 
    1435           0 : static int py_srvsvc_NetCharDevQCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
    1436             : {
    1437           0 :         struct srvsvc_NetCharDevQCtr0 *object = pytalloc_get_ptr(py_obj);
    1438           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    1439           0 :         if (value == NULL) {
    1440           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    1441           0 :                 return -1;
    1442             :         }
    1443           0 :         if (value == Py_None) {
    1444           0 :                 object->array = NULL;
    1445             :         } else {
    1446           0 :                 object->array = NULL;
    1447           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1448             :                 {
    1449           0 :                         int array_cntr_1;
    1450           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    1451           0 :                         if (!object->array) { return -1; }
    1452           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    1453           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    1454           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    1455           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    1456           0 :                                         return -1;
    1457             :                                 }
    1458           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    1459           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    1460           0 :                                         PyErr_NoMemory();
    1461           0 :                                         return -1;
    1462             :                                 }
    1463           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetCharDevQInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    1464             :                         }
    1465             :                 }
    1466             :         }
    1467           0 :         return 0;
    1468             : }
    1469             : 
    1470             : static PyGetSetDef py_srvsvc_NetCharDevQCtr0_getsetters[] = {
    1471             :         {
    1472             :                 .name = discard_const_p(char, "count"),
    1473             :                 .get = py_srvsvc_NetCharDevQCtr0_get_count,
    1474             :                 .set = py_srvsvc_NetCharDevQCtr0_set_count,
    1475             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1476             :         },
    1477             :         {
    1478             :                 .name = discard_const_p(char, "array"),
    1479             :                 .get = py_srvsvc_NetCharDevQCtr0_get_array,
    1480             :                 .set = py_srvsvc_NetCharDevQCtr0_set_array,
    1481             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQInfo0")
    1482             :         },
    1483             :         { .name = NULL }
    1484             : };
    1485             : 
    1486           0 : static PyObject *py_srvsvc_NetCharDevQCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1487             : {
    1488           0 :         return pytalloc_new(struct srvsvc_NetCharDevQCtr0, type);
    1489             : }
    1490             : 
    1491             : 
    1492             : static PyTypeObject srvsvc_NetCharDevQCtr0_Type = {
    1493             :         PyVarObject_HEAD_INIT(NULL, 0)
    1494             :         .tp_name = "srvsvc.NetCharDevQCtr0",
    1495             :         .tp_getset = py_srvsvc_NetCharDevQCtr0_getsetters,
    1496             :         .tp_methods = NULL,
    1497             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1498             :         .tp_new = py_srvsvc_NetCharDevQCtr0_new,
    1499             : };
    1500             : 
    1501             : 
    1502           0 : static PyObject *py_srvsvc_NetCharDevQInfo1_get_device(PyObject *obj, void *closure)
    1503             : {
    1504           0 :         struct srvsvc_NetCharDevQInfo1 *object = pytalloc_get_ptr(obj);
    1505           0 :         PyObject *py_device;
    1506           0 :         if (object->device == NULL) {
    1507           0 :                 Py_RETURN_NONE;
    1508             :         }
    1509           0 :         if (object->device == NULL) {
    1510           0 :                 py_device = Py_None;
    1511           0 :                 Py_INCREF(py_device);
    1512             :         } else {
    1513           0 :                 if (object->device == NULL) {
    1514           0 :                         py_device = Py_None;
    1515           0 :                         Py_INCREF(py_device);
    1516             :                 } else {
    1517           0 :                         py_device = PyUnicode_Decode(object->device, strlen(object->device), "utf-8", "ignore");
    1518             :                 }
    1519             :         }
    1520           0 :         return py_device;
    1521             : }
    1522             : 
    1523           0 : static int py_srvsvc_NetCharDevQInfo1_set_device(PyObject *py_obj, PyObject *value, void *closure)
    1524             : {
    1525           0 :         struct srvsvc_NetCharDevQInfo1 *object = pytalloc_get_ptr(py_obj);
    1526           0 :         if (value == NULL) {
    1527           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->device");
    1528           0 :                 return -1;
    1529             :         }
    1530           0 :         if (value == Py_None) {
    1531           0 :                 object->device = NULL;
    1532             :         } else {
    1533           0 :                 object->device = NULL;
    1534             :                 {
    1535           0 :                         const char *test_str;
    1536           0 :                         const char *talloc_str;
    1537           0 :                         PyObject *unicode = NULL;
    1538           0 :                         if (PyUnicode_Check(value)) {
    1539           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    1540           0 :                                 if (unicode == NULL) {
    1541           0 :                                         return -1;
    1542             :                                 }
    1543           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    1544           0 :                         } else if (PyBytes_Check(value)) {
    1545           0 :                                 test_str = PyBytes_AS_STRING(value);
    1546             :                         } else {
    1547           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    1548           0 :                                 return -1;
    1549             :                         }
    1550           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    1551           0 :                         if (unicode != NULL) {
    1552           0 :                                 Py_DECREF(unicode);
    1553             :                         }
    1554           0 :                         if (talloc_str == NULL) {
    1555           0 :                                 PyErr_NoMemory();
    1556           0 :                                 return -1;
    1557             :                         }
    1558           0 :                         object->device = talloc_str;
    1559             :                 }
    1560             :         }
    1561           0 :         return 0;
    1562             : }
    1563             : 
    1564           0 : static PyObject *py_srvsvc_NetCharDevQInfo1_get_priority(PyObject *obj, void *closure)
    1565             : {
    1566           0 :         struct srvsvc_NetCharDevQInfo1 *object = pytalloc_get_ptr(obj);
    1567           0 :         PyObject *py_priority;
    1568           0 :         py_priority = PyLong_FromUnsignedLongLong((uint32_t)(object->priority));
    1569           0 :         return py_priority;
    1570             : }
    1571             : 
    1572           0 : static int py_srvsvc_NetCharDevQInfo1_set_priority(PyObject *py_obj, PyObject *value, void *closure)
    1573             : {
    1574           0 :         struct srvsvc_NetCharDevQInfo1 *object = pytalloc_get_ptr(py_obj);
    1575           0 :         if (value == NULL) {
    1576           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->priority");
    1577           0 :                 return -1;
    1578             :         }
    1579             :         {
    1580           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priority));
    1581           0 :                 if (PyLong_Check(value)) {
    1582           0 :                         unsigned long long test_var;
    1583           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1584           0 :                         if (PyErr_Occurred() != NULL) {
    1585           0 :                                 return -1;
    1586             :                         }
    1587           0 :                         if (test_var > uint_max) {
    1588           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1589             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1590           0 :                                 return -1;
    1591             :                         }
    1592           0 :                         object->priority = test_var;
    1593             :                 } else {
    1594           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1595             :                           PyLong_Type.tp_name);
    1596           0 :                         return -1;
    1597             :                 }
    1598             :         }
    1599           0 :         return 0;
    1600             : }
    1601             : 
    1602           0 : static PyObject *py_srvsvc_NetCharDevQInfo1_get_devices(PyObject *obj, void *closure)
    1603             : {
    1604           0 :         struct srvsvc_NetCharDevQInfo1 *object = pytalloc_get_ptr(obj);
    1605           0 :         PyObject *py_devices;
    1606           0 :         if (object->devices == NULL) {
    1607           0 :                 Py_RETURN_NONE;
    1608             :         }
    1609           0 :         if (object->devices == NULL) {
    1610           0 :                 py_devices = Py_None;
    1611           0 :                 Py_INCREF(py_devices);
    1612             :         } else {
    1613           0 :                 if (object->devices == NULL) {
    1614           0 :                         py_devices = Py_None;
    1615           0 :                         Py_INCREF(py_devices);
    1616             :                 } else {
    1617           0 :                         py_devices = PyUnicode_Decode(object->devices, strlen(object->devices), "utf-8", "ignore");
    1618             :                 }
    1619             :         }
    1620           0 :         return py_devices;
    1621             : }
    1622             : 
    1623           0 : static int py_srvsvc_NetCharDevQInfo1_set_devices(PyObject *py_obj, PyObject *value, void *closure)
    1624             : {
    1625           0 :         struct srvsvc_NetCharDevQInfo1 *object = pytalloc_get_ptr(py_obj);
    1626           0 :         if (value == NULL) {
    1627           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->devices");
    1628           0 :                 return -1;
    1629             :         }
    1630           0 :         if (value == Py_None) {
    1631           0 :                 object->devices = NULL;
    1632             :         } else {
    1633           0 :                 object->devices = NULL;
    1634             :                 {
    1635           0 :                         const char *test_str;
    1636           0 :                         const char *talloc_str;
    1637           0 :                         PyObject *unicode = NULL;
    1638           0 :                         if (PyUnicode_Check(value)) {
    1639           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    1640           0 :                                 if (unicode == NULL) {
    1641           0 :                                         return -1;
    1642             :                                 }
    1643           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    1644           0 :                         } else if (PyBytes_Check(value)) {
    1645           0 :                                 test_str = PyBytes_AS_STRING(value);
    1646             :                         } else {
    1647           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    1648           0 :                                 return -1;
    1649             :                         }
    1650           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    1651           0 :                         if (unicode != NULL) {
    1652           0 :                                 Py_DECREF(unicode);
    1653             :                         }
    1654           0 :                         if (talloc_str == NULL) {
    1655           0 :                                 PyErr_NoMemory();
    1656           0 :                                 return -1;
    1657             :                         }
    1658           0 :                         object->devices = talloc_str;
    1659             :                 }
    1660             :         }
    1661           0 :         return 0;
    1662             : }
    1663             : 
    1664           0 : static PyObject *py_srvsvc_NetCharDevQInfo1_get_users(PyObject *obj, void *closure)
    1665             : {
    1666           0 :         struct srvsvc_NetCharDevQInfo1 *object = pytalloc_get_ptr(obj);
    1667           0 :         PyObject *py_users;
    1668           0 :         py_users = PyLong_FromUnsignedLongLong((uint32_t)(object->users));
    1669           0 :         return py_users;
    1670             : }
    1671             : 
    1672           0 : static int py_srvsvc_NetCharDevQInfo1_set_users(PyObject *py_obj, PyObject *value, void *closure)
    1673             : {
    1674           0 :         struct srvsvc_NetCharDevQInfo1 *object = pytalloc_get_ptr(py_obj);
    1675           0 :         if (value == NULL) {
    1676           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->users");
    1677           0 :                 return -1;
    1678             :         }
    1679             :         {
    1680           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->users));
    1681           0 :                 if (PyLong_Check(value)) {
    1682           0 :                         unsigned long long test_var;
    1683           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1684           0 :                         if (PyErr_Occurred() != NULL) {
    1685           0 :                                 return -1;
    1686             :                         }
    1687           0 :                         if (test_var > uint_max) {
    1688           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1689             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1690           0 :                                 return -1;
    1691             :                         }
    1692           0 :                         object->users = test_var;
    1693             :                 } else {
    1694           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1695             :                           PyLong_Type.tp_name);
    1696           0 :                         return -1;
    1697             :                 }
    1698             :         }
    1699           0 :         return 0;
    1700             : }
    1701             : 
    1702           0 : static PyObject *py_srvsvc_NetCharDevQInfo1_get_num_ahead(PyObject *obj, void *closure)
    1703             : {
    1704           0 :         struct srvsvc_NetCharDevQInfo1 *object = pytalloc_get_ptr(obj);
    1705           0 :         PyObject *py_num_ahead;
    1706           0 :         py_num_ahead = PyLong_FromUnsignedLongLong((uint32_t)(object->num_ahead));
    1707           0 :         return py_num_ahead;
    1708             : }
    1709             : 
    1710           0 : static int py_srvsvc_NetCharDevQInfo1_set_num_ahead(PyObject *py_obj, PyObject *value, void *closure)
    1711             : {
    1712           0 :         struct srvsvc_NetCharDevQInfo1 *object = pytalloc_get_ptr(py_obj);
    1713           0 :         if (value == NULL) {
    1714           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_ahead");
    1715           0 :                 return -1;
    1716             :         }
    1717             :         {
    1718           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_ahead));
    1719           0 :                 if (PyLong_Check(value)) {
    1720           0 :                         unsigned long long test_var;
    1721           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1722           0 :                         if (PyErr_Occurred() != NULL) {
    1723           0 :                                 return -1;
    1724             :                         }
    1725           0 :                         if (test_var > uint_max) {
    1726           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1727             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1728           0 :                                 return -1;
    1729             :                         }
    1730           0 :                         object->num_ahead = test_var;
    1731             :                 } else {
    1732           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1733             :                           PyLong_Type.tp_name);
    1734           0 :                         return -1;
    1735             :                 }
    1736             :         }
    1737           0 :         return 0;
    1738             : }
    1739             : 
    1740             : static PyGetSetDef py_srvsvc_NetCharDevQInfo1_getsetters[] = {
    1741             :         {
    1742             :                 .name = discard_const_p(char, "device"),
    1743             :                 .get = py_srvsvc_NetCharDevQInfo1_get_device,
    1744             :                 .set = py_srvsvc_NetCharDevQInfo1_set_device,
    1745             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1746             :         },
    1747             :         {
    1748             :                 .name = discard_const_p(char, "priority"),
    1749             :                 .get = py_srvsvc_NetCharDevQInfo1_get_priority,
    1750             :                 .set = py_srvsvc_NetCharDevQInfo1_set_priority,
    1751             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1752             :         },
    1753             :         {
    1754             :                 .name = discard_const_p(char, "devices"),
    1755             :                 .get = py_srvsvc_NetCharDevQInfo1_get_devices,
    1756             :                 .set = py_srvsvc_NetCharDevQInfo1_set_devices,
    1757             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1758             :         },
    1759             :         {
    1760             :                 .name = discard_const_p(char, "users"),
    1761             :                 .get = py_srvsvc_NetCharDevQInfo1_get_users,
    1762             :                 .set = py_srvsvc_NetCharDevQInfo1_set_users,
    1763             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1764             :         },
    1765             :         {
    1766             :                 .name = discard_const_p(char, "num_ahead"),
    1767             :                 .get = py_srvsvc_NetCharDevQInfo1_get_num_ahead,
    1768             :                 .set = py_srvsvc_NetCharDevQInfo1_set_num_ahead,
    1769             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1770             :         },
    1771             :         { .name = NULL }
    1772             : };
    1773             : 
    1774           0 : static PyObject *py_srvsvc_NetCharDevQInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1775             : {
    1776           0 :         return pytalloc_new(struct srvsvc_NetCharDevQInfo1, type);
    1777             : }
    1778             : 
    1779             : 
    1780             : static PyTypeObject srvsvc_NetCharDevQInfo1_Type = {
    1781             :         PyVarObject_HEAD_INIT(NULL, 0)
    1782             :         .tp_name = "srvsvc.NetCharDevQInfo1",
    1783             :         .tp_getset = py_srvsvc_NetCharDevQInfo1_getsetters,
    1784             :         .tp_methods = NULL,
    1785             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1786             :         .tp_new = py_srvsvc_NetCharDevQInfo1_new,
    1787             : };
    1788             : 
    1789             : 
    1790           0 : static PyObject *py_srvsvc_NetCharDevQCtr1_get_count(PyObject *obj, void *closure)
    1791             : {
    1792           0 :         struct srvsvc_NetCharDevQCtr1 *object = pytalloc_get_ptr(obj);
    1793           0 :         PyObject *py_count;
    1794           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    1795           0 :         return py_count;
    1796             : }
    1797             : 
    1798           0 : static int py_srvsvc_NetCharDevQCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
    1799             : {
    1800           0 :         struct srvsvc_NetCharDevQCtr1 *object = pytalloc_get_ptr(py_obj);
    1801           0 :         if (value == NULL) {
    1802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    1803           0 :                 return -1;
    1804             :         }
    1805             :         {
    1806           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    1807           0 :                 if (PyLong_Check(value)) {
    1808           0 :                         unsigned long long test_var;
    1809           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1810           0 :                         if (PyErr_Occurred() != NULL) {
    1811           0 :                                 return -1;
    1812             :                         }
    1813           0 :                         if (test_var > uint_max) {
    1814           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1815             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1816           0 :                                 return -1;
    1817             :                         }
    1818           0 :                         object->count = test_var;
    1819             :                 } else {
    1820           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1821             :                           PyLong_Type.tp_name);
    1822           0 :                         return -1;
    1823             :                 }
    1824             :         }
    1825           0 :         return 0;
    1826             : }
    1827             : 
    1828           0 : static PyObject *py_srvsvc_NetCharDevQCtr1_get_array(PyObject *obj, void *closure)
    1829             : {
    1830           0 :         struct srvsvc_NetCharDevQCtr1 *object = pytalloc_get_ptr(obj);
    1831           0 :         PyObject *py_array;
    1832           0 :         if (object->array == NULL) {
    1833           0 :                 Py_RETURN_NONE;
    1834             :         }
    1835           0 :         if (object->array == NULL) {
    1836           0 :                 py_array = Py_None;
    1837           0 :                 Py_INCREF(py_array);
    1838             :         } else {
    1839           0 :                 py_array = PyList_New(object->count);
    1840           0 :                 if (py_array == NULL) {
    1841           0 :                         return NULL;
    1842             :                 }
    1843             :                 {
    1844             :                         int array_cntr_1;
    1845           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    1846           0 :                                 PyObject *py_array_1;
    1847           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo1_Type, object->array, &(object->array)[array_cntr_1]);
    1848           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    1849             :                         }
    1850             :                 }
    1851             :         }
    1852           0 :         return py_array;
    1853             : }
    1854             : 
    1855           0 : static int py_srvsvc_NetCharDevQCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
    1856             : {
    1857           0 :         struct srvsvc_NetCharDevQCtr1 *object = pytalloc_get_ptr(py_obj);
    1858           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    1859           0 :         if (value == NULL) {
    1860           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    1861           0 :                 return -1;
    1862             :         }
    1863           0 :         if (value == Py_None) {
    1864           0 :                 object->array = NULL;
    1865             :         } else {
    1866           0 :                 object->array = NULL;
    1867           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1868             :                 {
    1869           0 :                         int array_cntr_1;
    1870           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    1871           0 :                         if (!object->array) { return -1; }
    1872           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    1873           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    1874           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    1875           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    1876           0 :                                         return -1;
    1877             :                                 }
    1878           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    1879           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    1880           0 :                                         PyErr_NoMemory();
    1881           0 :                                         return -1;
    1882             :                                 }
    1883           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    1884             :                         }
    1885             :                 }
    1886             :         }
    1887           0 :         return 0;
    1888             : }
    1889             : 
    1890             : static PyGetSetDef py_srvsvc_NetCharDevQCtr1_getsetters[] = {
    1891             :         {
    1892             :                 .name = discard_const_p(char, "count"),
    1893             :                 .get = py_srvsvc_NetCharDevQCtr1_get_count,
    1894             :                 .set = py_srvsvc_NetCharDevQCtr1_set_count,
    1895             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1896             :         },
    1897             :         {
    1898             :                 .name = discard_const_p(char, "array"),
    1899             :                 .get = py_srvsvc_NetCharDevQCtr1_get_array,
    1900             :                 .set = py_srvsvc_NetCharDevQCtr1_set_array,
    1901             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQInfo1")
    1902             :         },
    1903             :         { .name = NULL }
    1904             : };
    1905             : 
    1906           0 : static PyObject *py_srvsvc_NetCharDevQCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1907             : {
    1908           0 :         return pytalloc_new(struct srvsvc_NetCharDevQCtr1, type);
    1909             : }
    1910             : 
    1911             : 
    1912             : static PyTypeObject srvsvc_NetCharDevQCtr1_Type = {
    1913             :         PyVarObject_HEAD_INIT(NULL, 0)
    1914             :         .tp_name = "srvsvc.NetCharDevQCtr1",
    1915             :         .tp_getset = py_srvsvc_NetCharDevQCtr1_getsetters,
    1916             :         .tp_methods = NULL,
    1917             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1918             :         .tp_new = py_srvsvc_NetCharDevQCtr1_new,
    1919             : };
    1920             : 
    1921           0 : static PyObject *py_import_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQInfo *in)
    1922             : {
    1923           0 :         PyObject *ret;
    1924             : 
    1925           0 :         switch (level) {
    1926           0 :                 case 0:
    1927           0 :                         if (in->info0 == NULL) {
    1928           0 :                                 ret = Py_None;
    1929           0 :                                 Py_INCREF(ret);
    1930             :                         } else {
    1931           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo0_Type, in->info0, in->info0);
    1932             :                         }
    1933           0 :                         return ret;
    1934             : 
    1935           0 :                 case 1:
    1936           0 :                         if (in->info1 == NULL) {
    1937           0 :                                 ret = Py_None;
    1938           0 :                                 Py_INCREF(ret);
    1939             :                         } else {
    1940           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo1_Type, in->info1, in->info1);
    1941             :                         }
    1942           0 :                         return ret;
    1943             : 
    1944           0 :                 default:
    1945           0 :                         ret = Py_None;
    1946           0 :                         Py_INCREF(ret);
    1947           0 :                         return ret;
    1948             : 
    1949             :         }
    1950             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    1951             :         return NULL;
    1952             : }
    1953             : 
    1954           0 : static union srvsvc_NetCharDevQInfo *py_export_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    1955             : {
    1956           0 :         union srvsvc_NetCharDevQInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevQInfo);
    1957           0 :         switch (level) {
    1958           0 :                 case 0:
    1959           0 :                         if (in == NULL) {
    1960           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info0");
    1961           0 :                                 talloc_free(ret); return NULL;
    1962             :                         }
    1963           0 :                         if (in == Py_None) {
    1964           0 :                                 ret->info0 = NULL;
    1965             :                         } else {
    1966           0 :                                 ret->info0 = NULL;
    1967           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfo0_Type, in, talloc_free(ret); return NULL;);
    1968           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    1969           0 :                                         PyErr_NoMemory();
    1970           0 :                                         talloc_free(ret); return NULL;
    1971             :                                 }
    1972           0 :                                 ret->info0 = (struct srvsvc_NetCharDevQInfo0 *)pytalloc_get_ptr(in);
    1973             :                         }
    1974           0 :                         break;
    1975             : 
    1976           0 :                 case 1:
    1977           0 :                         if (in == NULL) {
    1978           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1");
    1979           0 :                                 talloc_free(ret); return NULL;
    1980             :                         }
    1981           0 :                         if (in == Py_None) {
    1982           0 :                                 ret->info1 = NULL;
    1983             :                         } else {
    1984           0 :                                 ret->info1 = NULL;
    1985           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfo1_Type, in, talloc_free(ret); return NULL;);
    1986           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    1987           0 :                                         PyErr_NoMemory();
    1988           0 :                                         talloc_free(ret); return NULL;
    1989             :                                 }
    1990           0 :                                 ret->info1 = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(in);
    1991             :                         }
    1992           0 :                         break;
    1993             : 
    1994           0 :                 default:
    1995           0 :                         break;
    1996             : 
    1997             :         }
    1998             : 
    1999           0 :         return ret;
    2000             : }
    2001             : 
    2002           0 : static PyObject *py_srvsvc_NetCharDevQInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2003             : {
    2004           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2005           0 :         PyObject *mem_ctx_obj = NULL;
    2006           0 :         TALLOC_CTX *mem_ctx = NULL;
    2007           0 :         int level = 0;
    2008           0 :         PyObject *in_obj = NULL;
    2009           0 :         union srvsvc_NetCharDevQInfo *in = NULL;
    2010             : 
    2011           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    2012             :                 discard_const_p(char *, kwnames),
    2013             :                 &mem_ctx_obj,
    2014             :                 &level,
    2015             :                 &in_obj)) {
    2016           0 :                 return NULL;
    2017             :         }
    2018           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2019           0 :         if (mem_ctx == NULL) {
    2020           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2021           0 :                 return NULL;
    2022             :         }
    2023           0 :         in = (union srvsvc_NetCharDevQInfo *)pytalloc_get_ptr(in_obj);
    2024           0 :         if (in == NULL) {
    2025           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetCharDevQInfo!");
    2026           0 :                 return NULL;
    2027             :         }
    2028             : 
    2029           0 :         return py_import_srvsvc_NetCharDevQInfo(mem_ctx, level, in);
    2030             : }
    2031             : 
    2032           0 : static PyObject *py_srvsvc_NetCharDevQInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2033             : {
    2034           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2035           0 :         PyObject *mem_ctx_obj = NULL;
    2036           0 :         TALLOC_CTX *mem_ctx = NULL;
    2037           0 :         int level = 0;
    2038           0 :         PyObject *in = NULL;
    2039           0 :         union srvsvc_NetCharDevQInfo *out = NULL;
    2040             : 
    2041           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    2042             :                 discard_const_p(char *, kwnames),
    2043             :                 &mem_ctx_obj,
    2044             :                 &level,
    2045             :                 &in)) {
    2046           0 :                 return NULL;
    2047             :         }
    2048           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2049           0 :         if (mem_ctx == NULL) {
    2050           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2051           0 :                 return NULL;
    2052             :         }
    2053             : 
    2054           0 :         out = py_export_srvsvc_NetCharDevQInfo(mem_ctx, level, in);
    2055           0 :         if (out == NULL) {
    2056           0 :                 return NULL;
    2057             :         }
    2058             : 
    2059           0 :         return pytalloc_GenericObject_reference(out);
    2060             : }
    2061             : 
    2062             : static PyMethodDef py_srvsvc_NetCharDevQInfo_methods[] = {
    2063             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQInfo_import),
    2064             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2065             :                 "T.__import__(mem_ctx, level, in) => ret." },
    2066             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQInfo_export),
    2067             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2068             :                 "T.__export__(mem_ctx, level, in) => ret." },
    2069             :         { NULL, NULL, 0, NULL }
    2070             : };
    2071             : 
    2072           0 : static PyObject *py_srvsvc_NetCharDevQInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2073             : {
    2074           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    2075           0 :         return NULL;
    2076             : }
    2077             : 
    2078             : 
    2079             : static PyTypeObject srvsvc_NetCharDevQInfo_Type = {
    2080             :         PyVarObject_HEAD_INIT(NULL, 0)
    2081             :         .tp_name = "srvsvc.NetCharDevQInfo",
    2082             :         .tp_getset = NULL,
    2083             :         .tp_methods = py_srvsvc_NetCharDevQInfo_methods,
    2084             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2085             :         .tp_new = py_srvsvc_NetCharDevQInfo_new,
    2086             : };
    2087             : 
    2088           0 : static PyObject *py_import_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQCtr *in)
    2089             : {
    2090           0 :         PyObject *ret;
    2091             : 
    2092           0 :         switch (level) {
    2093           0 :                 case 0:
    2094           0 :                         if (in->ctr0 == NULL) {
    2095           0 :                                 ret = Py_None;
    2096           0 :                                 Py_INCREF(ret);
    2097             :                         } else {
    2098           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevQCtr0_Type, in->ctr0, in->ctr0);
    2099             :                         }
    2100           0 :                         return ret;
    2101             : 
    2102           0 :                 case 1:
    2103           0 :                         if (in->ctr1 == NULL) {
    2104           0 :                                 ret = Py_None;
    2105           0 :                                 Py_INCREF(ret);
    2106             :                         } else {
    2107           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevQCtr1_Type, in->ctr1, in->ctr1);
    2108             :                         }
    2109           0 :                         return ret;
    2110             : 
    2111           0 :                 default:
    2112           0 :                         ret = Py_None;
    2113           0 :                         Py_INCREF(ret);
    2114           0 :                         return ret;
    2115             : 
    2116             :         }
    2117             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    2118             :         return NULL;
    2119             : }
    2120             : 
    2121           0 : static union srvsvc_NetCharDevQCtr *py_export_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    2122             : {
    2123           0 :         union srvsvc_NetCharDevQCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevQCtr);
    2124           0 :         switch (level) {
    2125           0 :                 case 0:
    2126           0 :                         if (in == NULL) {
    2127           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr0");
    2128           0 :                                 talloc_free(ret); return NULL;
    2129             :                         }
    2130           0 :                         if (in == Py_None) {
    2131           0 :                                 ret->ctr0 = NULL;
    2132             :                         } else {
    2133           0 :                                 ret->ctr0 = NULL;
    2134           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevQCtr0_Type, in, talloc_free(ret); return NULL;);
    2135           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2136           0 :                                         PyErr_NoMemory();
    2137           0 :                                         talloc_free(ret); return NULL;
    2138             :                                 }
    2139           0 :                                 ret->ctr0 = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(in);
    2140             :                         }
    2141           0 :                         break;
    2142             : 
    2143           0 :                 case 1:
    2144           0 :                         if (in == NULL) {
    2145           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr1");
    2146           0 :                                 talloc_free(ret); return NULL;
    2147             :                         }
    2148           0 :                         if (in == Py_None) {
    2149           0 :                                 ret->ctr1 = NULL;
    2150             :                         } else {
    2151           0 :                                 ret->ctr1 = NULL;
    2152           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevQCtr1_Type, in, talloc_free(ret); return NULL;);
    2153           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2154           0 :                                         PyErr_NoMemory();
    2155           0 :                                         talloc_free(ret); return NULL;
    2156             :                                 }
    2157           0 :                                 ret->ctr1 = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(in);
    2158             :                         }
    2159           0 :                         break;
    2160             : 
    2161           0 :                 default:
    2162           0 :                         break;
    2163             : 
    2164             :         }
    2165             : 
    2166           0 :         return ret;
    2167             : }
    2168             : 
    2169           0 : static PyObject *py_srvsvc_NetCharDevQCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2170             : {
    2171           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2172           0 :         PyObject *mem_ctx_obj = NULL;
    2173           0 :         TALLOC_CTX *mem_ctx = NULL;
    2174           0 :         int level = 0;
    2175           0 :         PyObject *in_obj = NULL;
    2176           0 :         union srvsvc_NetCharDevQCtr *in = NULL;
    2177             : 
    2178           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    2179             :                 discard_const_p(char *, kwnames),
    2180             :                 &mem_ctx_obj,
    2181             :                 &level,
    2182             :                 &in_obj)) {
    2183           0 :                 return NULL;
    2184             :         }
    2185           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2186           0 :         if (mem_ctx == NULL) {
    2187           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2188           0 :                 return NULL;
    2189             :         }
    2190           0 :         in = (union srvsvc_NetCharDevQCtr *)pytalloc_get_ptr(in_obj);
    2191           0 :         if (in == NULL) {
    2192           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetCharDevQCtr!");
    2193           0 :                 return NULL;
    2194             :         }
    2195             : 
    2196           0 :         return py_import_srvsvc_NetCharDevQCtr(mem_ctx, level, in);
    2197             : }
    2198             : 
    2199           0 : static PyObject *py_srvsvc_NetCharDevQCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2200             : {
    2201           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2202           0 :         PyObject *mem_ctx_obj = NULL;
    2203           0 :         TALLOC_CTX *mem_ctx = NULL;
    2204           0 :         int level = 0;
    2205           0 :         PyObject *in = NULL;
    2206           0 :         union srvsvc_NetCharDevQCtr *out = NULL;
    2207             : 
    2208           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    2209             :                 discard_const_p(char *, kwnames),
    2210             :                 &mem_ctx_obj,
    2211             :                 &level,
    2212             :                 &in)) {
    2213           0 :                 return NULL;
    2214             :         }
    2215           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2216           0 :         if (mem_ctx == NULL) {
    2217           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2218           0 :                 return NULL;
    2219             :         }
    2220             : 
    2221           0 :         out = py_export_srvsvc_NetCharDevQCtr(mem_ctx, level, in);
    2222           0 :         if (out == NULL) {
    2223           0 :                 return NULL;
    2224             :         }
    2225             : 
    2226           0 :         return pytalloc_GenericObject_reference(out);
    2227             : }
    2228             : 
    2229             : static PyMethodDef py_srvsvc_NetCharDevQCtr_methods[] = {
    2230             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQCtr_import),
    2231             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2232             :                 "T.__import__(mem_ctx, level, in) => ret." },
    2233             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQCtr_export),
    2234             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2235             :                 "T.__export__(mem_ctx, level, in) => ret." },
    2236             :         { NULL, NULL, 0, NULL }
    2237             : };
    2238             : 
    2239           0 : static PyObject *py_srvsvc_NetCharDevQCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2240             : {
    2241           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    2242           0 :         return NULL;
    2243             : }
    2244             : 
    2245             : 
    2246             : static PyTypeObject srvsvc_NetCharDevQCtr_Type = {
    2247             :         PyVarObject_HEAD_INIT(NULL, 0)
    2248             :         .tp_name = "srvsvc.NetCharDevQCtr",
    2249             :         .tp_getset = NULL,
    2250             :         .tp_methods = py_srvsvc_NetCharDevQCtr_methods,
    2251             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2252             :         .tp_new = py_srvsvc_NetCharDevQCtr_new,
    2253             : };
    2254             : 
    2255             : 
    2256           0 : static PyObject *py_srvsvc_NetCharDevQInfoCtr_get_level(PyObject *obj, void *closure)
    2257             : {
    2258           0 :         struct srvsvc_NetCharDevQInfoCtr *object = pytalloc_get_ptr(obj);
    2259           0 :         PyObject *py_level;
    2260           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->level));
    2261           0 :         return py_level;
    2262             : }
    2263             : 
    2264           0 : static int py_srvsvc_NetCharDevQInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
    2265             : {
    2266           0 :         struct srvsvc_NetCharDevQInfoCtr *object = pytalloc_get_ptr(py_obj);
    2267           0 :         if (value == NULL) {
    2268           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->level");
    2269           0 :                 return -1;
    2270             :         }
    2271             :         {
    2272           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    2273           0 :                 if (PyLong_Check(value)) {
    2274           0 :                         unsigned long long test_var;
    2275           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2276           0 :                         if (PyErr_Occurred() != NULL) {
    2277           0 :                                 return -1;
    2278             :                         }
    2279           0 :                         if (test_var > uint_max) {
    2280           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2281             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2282           0 :                                 return -1;
    2283             :                         }
    2284           0 :                         object->level = test_var;
    2285             :                 } else {
    2286           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2287             :                           PyLong_Type.tp_name);
    2288           0 :                         return -1;
    2289             :                 }
    2290             :         }
    2291           0 :         return 0;
    2292             : }
    2293             : 
    2294           0 : static PyObject *py_srvsvc_NetCharDevQInfoCtr_get_ctr(PyObject *obj, void *closure)
    2295             : {
    2296           0 :         struct srvsvc_NetCharDevQInfoCtr *object = pytalloc_get_ptr(obj);
    2297           0 :         PyObject *py_ctr;
    2298           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetCharDevQCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetCharDevQCtr");
    2299           0 :         if (py_ctr == NULL) {
    2300           0 :                 return NULL;
    2301             :         }
    2302           0 :         return py_ctr;
    2303             : }
    2304             : 
    2305           0 : static int py_srvsvc_NetCharDevQInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    2306             : {
    2307           0 :         struct srvsvc_NetCharDevQInfoCtr *object = pytalloc_get_ptr(py_obj);
    2308           0 :         if (value == NULL) {
    2309           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ctr");
    2310           0 :                 return -1;
    2311             :         }
    2312             :         {
    2313           0 :                 union srvsvc_NetCharDevQCtr *ctr_switch_0;
    2314           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");
    2315           0 :                 if (ctr_switch_0 == NULL) {
    2316           0 :                         return -1;
    2317             :                 }
    2318           0 :                 object->ctr = *ctr_switch_0;
    2319             :         }
    2320           0 :         return 0;
    2321             : }
    2322             : 
    2323             : static PyGetSetDef py_srvsvc_NetCharDevQInfoCtr_getsetters[] = {
    2324             :         {
    2325             :                 .name = discard_const_p(char, "level"),
    2326             :                 .get = py_srvsvc_NetCharDevQInfoCtr_get_level,
    2327             :                 .set = py_srvsvc_NetCharDevQInfoCtr_set_level,
    2328             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2329             :         },
    2330             :         {
    2331             :                 .name = discard_const_p(char, "ctr"),
    2332             :                 .get = py_srvsvc_NetCharDevQInfoCtr_get_ctr,
    2333             :                 .set = py_srvsvc_NetCharDevQInfoCtr_set_ctr,
    2334             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQCtr")
    2335             :         },
    2336             :         { .name = NULL }
    2337             : };
    2338             : 
    2339           0 : static PyObject *py_srvsvc_NetCharDevQInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2340             : {
    2341           0 :         return pytalloc_new(struct srvsvc_NetCharDevQInfoCtr, type);
    2342             : }
    2343             : 
    2344             : 
    2345             : static PyTypeObject srvsvc_NetCharDevQInfoCtr_Type = {
    2346             :         PyVarObject_HEAD_INIT(NULL, 0)
    2347             :         .tp_name = "srvsvc.NetCharDevQInfoCtr",
    2348             :         .tp_getset = py_srvsvc_NetCharDevQInfoCtr_getsetters,
    2349             :         .tp_methods = NULL,
    2350             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2351             :         .tp_new = py_srvsvc_NetCharDevQInfoCtr_new,
    2352             : };
    2353             : 
    2354             : 
    2355           0 : static PyObject *py_srvsvc_NetConnInfo0_get_conn_id(PyObject *obj, void *closure)
    2356             : {
    2357           0 :         struct srvsvc_NetConnInfo0 *object = pytalloc_get_ptr(obj);
    2358           0 :         PyObject *py_conn_id;
    2359           0 :         py_conn_id = PyLong_FromUnsignedLongLong((uint32_t)(object->conn_id));
    2360           0 :         return py_conn_id;
    2361             : }
    2362             : 
    2363           0 : static int py_srvsvc_NetConnInfo0_set_conn_id(PyObject *py_obj, PyObject *value, void *closure)
    2364             : {
    2365           0 :         struct srvsvc_NetConnInfo0 *object = pytalloc_get_ptr(py_obj);
    2366           0 :         if (value == NULL) {
    2367           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->conn_id");
    2368           0 :                 return -1;
    2369             :         }
    2370             :         {
    2371           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_id));
    2372           0 :                 if (PyLong_Check(value)) {
    2373           0 :                         unsigned long long test_var;
    2374           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2375           0 :                         if (PyErr_Occurred() != NULL) {
    2376           0 :                                 return -1;
    2377             :                         }
    2378           0 :                         if (test_var > uint_max) {
    2379           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2380             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2381           0 :                                 return -1;
    2382             :                         }
    2383           0 :                         object->conn_id = test_var;
    2384             :                 } else {
    2385           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2386             :                           PyLong_Type.tp_name);
    2387           0 :                         return -1;
    2388             :                 }
    2389             :         }
    2390           0 :         return 0;
    2391             : }
    2392             : 
    2393             : static PyGetSetDef py_srvsvc_NetConnInfo0_getsetters[] = {
    2394             :         {
    2395             :                 .name = discard_const_p(char, "conn_id"),
    2396             :                 .get = py_srvsvc_NetConnInfo0_get_conn_id,
    2397             :                 .set = py_srvsvc_NetConnInfo0_set_conn_id,
    2398             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2399             :         },
    2400             :         { .name = NULL }
    2401             : };
    2402             : 
    2403           0 : static PyObject *py_srvsvc_NetConnInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2404             : {
    2405           0 :         return pytalloc_new(struct srvsvc_NetConnInfo0, type);
    2406             : }
    2407             : 
    2408             : 
    2409             : static PyTypeObject srvsvc_NetConnInfo0_Type = {
    2410             :         PyVarObject_HEAD_INIT(NULL, 0)
    2411             :         .tp_name = "srvsvc.NetConnInfo0",
    2412             :         .tp_getset = py_srvsvc_NetConnInfo0_getsetters,
    2413             :         .tp_methods = NULL,
    2414             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2415             :         .tp_new = py_srvsvc_NetConnInfo0_new,
    2416             : };
    2417             : 
    2418             : 
    2419           0 : static PyObject *py_srvsvc_NetConnCtr0_get_count(PyObject *obj, void *closure)
    2420             : {
    2421           0 :         struct srvsvc_NetConnCtr0 *object = pytalloc_get_ptr(obj);
    2422           0 :         PyObject *py_count;
    2423           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    2424           0 :         return py_count;
    2425             : }
    2426             : 
    2427           0 : static int py_srvsvc_NetConnCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
    2428             : {
    2429           0 :         struct srvsvc_NetConnCtr0 *object = pytalloc_get_ptr(py_obj);
    2430           0 :         if (value == NULL) {
    2431           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    2432           0 :                 return -1;
    2433             :         }
    2434             :         {
    2435           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    2436           0 :                 if (PyLong_Check(value)) {
    2437           0 :                         unsigned long long test_var;
    2438           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2439           0 :                         if (PyErr_Occurred() != NULL) {
    2440           0 :                                 return -1;
    2441             :                         }
    2442           0 :                         if (test_var > uint_max) {
    2443           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2444             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2445           0 :                                 return -1;
    2446             :                         }
    2447           0 :                         object->count = test_var;
    2448             :                 } else {
    2449           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2450             :                           PyLong_Type.tp_name);
    2451           0 :                         return -1;
    2452             :                 }
    2453             :         }
    2454           0 :         return 0;
    2455             : }
    2456             : 
    2457           0 : static PyObject *py_srvsvc_NetConnCtr0_get_array(PyObject *obj, void *closure)
    2458             : {
    2459           0 :         struct srvsvc_NetConnCtr0 *object = pytalloc_get_ptr(obj);
    2460           0 :         PyObject *py_array;
    2461           0 :         if (object->array == NULL) {
    2462           0 :                 Py_RETURN_NONE;
    2463             :         }
    2464           0 :         if (object->array == NULL) {
    2465           0 :                 py_array = Py_None;
    2466           0 :                 Py_INCREF(py_array);
    2467             :         } else {
    2468           0 :                 py_array = PyList_New(object->count);
    2469           0 :                 if (py_array == NULL) {
    2470           0 :                         return NULL;
    2471             :                 }
    2472             :                 {
    2473             :                         int array_cntr_1;
    2474           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    2475           0 :                                 PyObject *py_array_1;
    2476           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetConnInfo0_Type, object->array, &(object->array)[array_cntr_1]);
    2477           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    2478             :                         }
    2479             :                 }
    2480             :         }
    2481           0 :         return py_array;
    2482             : }
    2483             : 
    2484           0 : static int py_srvsvc_NetConnCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
    2485             : {
    2486           0 :         struct srvsvc_NetConnCtr0 *object = pytalloc_get_ptr(py_obj);
    2487           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    2488           0 :         if (value == NULL) {
    2489           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    2490           0 :                 return -1;
    2491             :         }
    2492           0 :         if (value == Py_None) {
    2493           0 :                 object->array = NULL;
    2494             :         } else {
    2495           0 :                 object->array = NULL;
    2496           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2497             :                 {
    2498           0 :                         int array_cntr_1;
    2499           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    2500           0 :                         if (!object->array) { return -1; }
    2501           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    2502           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    2503           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    2504           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    2505           0 :                                         return -1;
    2506             :                                 }
    2507           0 :                                 PY_CHECK_TYPE(&srvsvc_NetConnInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    2508           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    2509           0 :                                         PyErr_NoMemory();
    2510           0 :                                         return -1;
    2511             :                                 }
    2512           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetConnInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    2513             :                         }
    2514             :                 }
    2515             :         }
    2516           0 :         return 0;
    2517             : }
    2518             : 
    2519             : static PyGetSetDef py_srvsvc_NetConnCtr0_getsetters[] = {
    2520             :         {
    2521             :                 .name = discard_const_p(char, "count"),
    2522             :                 .get = py_srvsvc_NetConnCtr0_get_count,
    2523             :                 .set = py_srvsvc_NetConnCtr0_set_count,
    2524             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2525             :         },
    2526             :         {
    2527             :                 .name = discard_const_p(char, "array"),
    2528             :                 .get = py_srvsvc_NetConnCtr0_get_array,
    2529             :                 .set = py_srvsvc_NetConnCtr0_set_array,
    2530             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetConnInfo0")
    2531             :         },
    2532             :         { .name = NULL }
    2533             : };
    2534             : 
    2535           0 : static PyObject *py_srvsvc_NetConnCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2536             : {
    2537           0 :         return pytalloc_new(struct srvsvc_NetConnCtr0, type);
    2538             : }
    2539             : 
    2540             : 
    2541             : static PyTypeObject srvsvc_NetConnCtr0_Type = {
    2542             :         PyVarObject_HEAD_INIT(NULL, 0)
    2543             :         .tp_name = "srvsvc.NetConnCtr0",
    2544             :         .tp_getset = py_srvsvc_NetConnCtr0_getsetters,
    2545             :         .tp_methods = NULL,
    2546             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2547             :         .tp_new = py_srvsvc_NetConnCtr0_new,
    2548             : };
    2549             : 
    2550             : 
    2551           0 : static PyObject *py_srvsvc_NetConnInfo1_get_conn_id(PyObject *obj, void *closure)
    2552             : {
    2553           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(obj);
    2554           0 :         PyObject *py_conn_id;
    2555           0 :         py_conn_id = PyLong_FromUnsignedLongLong((uint32_t)(object->conn_id));
    2556           0 :         return py_conn_id;
    2557             : }
    2558             : 
    2559           0 : static int py_srvsvc_NetConnInfo1_set_conn_id(PyObject *py_obj, PyObject *value, void *closure)
    2560             : {
    2561           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(py_obj);
    2562           0 :         if (value == NULL) {
    2563           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->conn_id");
    2564           0 :                 return -1;
    2565             :         }
    2566             :         {
    2567           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_id));
    2568           0 :                 if (PyLong_Check(value)) {
    2569           0 :                         unsigned long long test_var;
    2570           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2571           0 :                         if (PyErr_Occurred() != NULL) {
    2572           0 :                                 return -1;
    2573             :                         }
    2574           0 :                         if (test_var > uint_max) {
    2575           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2576             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2577           0 :                                 return -1;
    2578             :                         }
    2579           0 :                         object->conn_id = test_var;
    2580             :                 } else {
    2581           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2582             :                           PyLong_Type.tp_name);
    2583           0 :                         return -1;
    2584             :                 }
    2585             :         }
    2586           0 :         return 0;
    2587             : }
    2588             : 
    2589           0 : static PyObject *py_srvsvc_NetConnInfo1_get_conn_type(PyObject *obj, void *closure)
    2590             : {
    2591           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(obj);
    2592           0 :         PyObject *py_conn_type;
    2593           0 :         py_conn_type = PyLong_FromUnsignedLongLong((uint32_t)(object->conn_type));
    2594           0 :         return py_conn_type;
    2595             : }
    2596             : 
    2597           0 : static int py_srvsvc_NetConnInfo1_set_conn_type(PyObject *py_obj, PyObject *value, void *closure)
    2598             : {
    2599           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(py_obj);
    2600           0 :         if (value == NULL) {
    2601           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->conn_type");
    2602           0 :                 return -1;
    2603             :         }
    2604             :         {
    2605           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_type));
    2606           0 :                 if (PyLong_Check(value)) {
    2607           0 :                         unsigned long long test_var;
    2608           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2609           0 :                         if (PyErr_Occurred() != NULL) {
    2610           0 :                                 return -1;
    2611             :                         }
    2612           0 :                         if (test_var > uint_max) {
    2613           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2614             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2615           0 :                                 return -1;
    2616             :                         }
    2617           0 :                         object->conn_type = test_var;
    2618             :                 } else {
    2619           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2620             :                           PyLong_Type.tp_name);
    2621           0 :                         return -1;
    2622             :                 }
    2623             :         }
    2624           0 :         return 0;
    2625             : }
    2626             : 
    2627           0 : static PyObject *py_srvsvc_NetConnInfo1_get_num_open(PyObject *obj, void *closure)
    2628             : {
    2629           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(obj);
    2630           0 :         PyObject *py_num_open;
    2631           0 :         py_num_open = PyLong_FromUnsignedLongLong((uint32_t)(object->num_open));
    2632           0 :         return py_num_open;
    2633             : }
    2634             : 
    2635           0 : static int py_srvsvc_NetConnInfo1_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
    2636             : {
    2637           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(py_obj);
    2638           0 :         if (value == NULL) {
    2639           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_open");
    2640           0 :                 return -1;
    2641             :         }
    2642             :         {
    2643           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
    2644           0 :                 if (PyLong_Check(value)) {
    2645           0 :                         unsigned long long test_var;
    2646           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2647           0 :                         if (PyErr_Occurred() != NULL) {
    2648           0 :                                 return -1;
    2649             :                         }
    2650           0 :                         if (test_var > uint_max) {
    2651           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2652             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2653           0 :                                 return -1;
    2654             :                         }
    2655           0 :                         object->num_open = test_var;
    2656             :                 } else {
    2657           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2658             :                           PyLong_Type.tp_name);
    2659           0 :                         return -1;
    2660             :                 }
    2661             :         }
    2662           0 :         return 0;
    2663             : }
    2664             : 
    2665           0 : static PyObject *py_srvsvc_NetConnInfo1_get_num_users(PyObject *obj, void *closure)
    2666             : {
    2667           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(obj);
    2668           0 :         PyObject *py_num_users;
    2669           0 :         py_num_users = PyLong_FromUnsignedLongLong((uint32_t)(object->num_users));
    2670           0 :         return py_num_users;
    2671             : }
    2672             : 
    2673           0 : static int py_srvsvc_NetConnInfo1_set_num_users(PyObject *py_obj, PyObject *value, void *closure)
    2674             : {
    2675           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(py_obj);
    2676           0 :         if (value == NULL) {
    2677           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_users");
    2678           0 :                 return -1;
    2679             :         }
    2680             :         {
    2681           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_users));
    2682           0 :                 if (PyLong_Check(value)) {
    2683           0 :                         unsigned long long test_var;
    2684           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2685           0 :                         if (PyErr_Occurred() != NULL) {
    2686           0 :                                 return -1;
    2687             :                         }
    2688           0 :                         if (test_var > uint_max) {
    2689           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2690             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2691           0 :                                 return -1;
    2692             :                         }
    2693           0 :                         object->num_users = test_var;
    2694             :                 } else {
    2695           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2696             :                           PyLong_Type.tp_name);
    2697           0 :                         return -1;
    2698             :                 }
    2699             :         }
    2700           0 :         return 0;
    2701             : }
    2702             : 
    2703           0 : static PyObject *py_srvsvc_NetConnInfo1_get_conn_time(PyObject *obj, void *closure)
    2704             : {
    2705           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(obj);
    2706           0 :         PyObject *py_conn_time;
    2707           0 :         py_conn_time = PyLong_FromUnsignedLongLong((uint32_t)(object->conn_time));
    2708           0 :         return py_conn_time;
    2709             : }
    2710             : 
    2711           0 : static int py_srvsvc_NetConnInfo1_set_conn_time(PyObject *py_obj, PyObject *value, void *closure)
    2712             : {
    2713           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(py_obj);
    2714           0 :         if (value == NULL) {
    2715           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->conn_time");
    2716           0 :                 return -1;
    2717             :         }
    2718             :         {
    2719           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_time));
    2720           0 :                 if (PyLong_Check(value)) {
    2721           0 :                         unsigned long long test_var;
    2722           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2723           0 :                         if (PyErr_Occurred() != NULL) {
    2724           0 :                                 return -1;
    2725             :                         }
    2726           0 :                         if (test_var > uint_max) {
    2727           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2728             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2729           0 :                                 return -1;
    2730             :                         }
    2731           0 :                         object->conn_time = test_var;
    2732             :                 } else {
    2733           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2734             :                           PyLong_Type.tp_name);
    2735           0 :                         return -1;
    2736             :                 }
    2737             :         }
    2738           0 :         return 0;
    2739             : }
    2740             : 
    2741           0 : static PyObject *py_srvsvc_NetConnInfo1_get_user(PyObject *obj, void *closure)
    2742             : {
    2743           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(obj);
    2744           0 :         PyObject *py_user;
    2745           0 :         if (object->user == NULL) {
    2746           0 :                 Py_RETURN_NONE;
    2747             :         }
    2748           0 :         if (object->user == NULL) {
    2749           0 :                 py_user = Py_None;
    2750           0 :                 Py_INCREF(py_user);
    2751             :         } else {
    2752           0 :                 if (object->user == NULL) {
    2753           0 :                         py_user = Py_None;
    2754           0 :                         Py_INCREF(py_user);
    2755             :                 } else {
    2756           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
    2757             :                 }
    2758             :         }
    2759           0 :         return py_user;
    2760             : }
    2761             : 
    2762           0 : static int py_srvsvc_NetConnInfo1_set_user(PyObject *py_obj, PyObject *value, void *closure)
    2763             : {
    2764           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(py_obj);
    2765           0 :         if (value == NULL) {
    2766           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user");
    2767           0 :                 return -1;
    2768             :         }
    2769           0 :         if (value == Py_None) {
    2770           0 :                 object->user = NULL;
    2771             :         } else {
    2772           0 :                 object->user = NULL;
    2773             :                 {
    2774           0 :                         const char *test_str;
    2775           0 :                         const char *talloc_str;
    2776           0 :                         PyObject *unicode = NULL;
    2777           0 :                         if (PyUnicode_Check(value)) {
    2778           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2779           0 :                                 if (unicode == NULL) {
    2780           0 :                                         return -1;
    2781             :                                 }
    2782           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2783           0 :                         } else if (PyBytes_Check(value)) {
    2784           0 :                                 test_str = PyBytes_AS_STRING(value);
    2785             :                         } else {
    2786           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2787           0 :                                 return -1;
    2788             :                         }
    2789           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2790           0 :                         if (unicode != NULL) {
    2791           0 :                                 Py_DECREF(unicode);
    2792             :                         }
    2793           0 :                         if (talloc_str == NULL) {
    2794           0 :                                 PyErr_NoMemory();
    2795           0 :                                 return -1;
    2796             :                         }
    2797           0 :                         object->user = talloc_str;
    2798             :                 }
    2799             :         }
    2800           0 :         return 0;
    2801             : }
    2802             : 
    2803           0 : static PyObject *py_srvsvc_NetConnInfo1_get_share(PyObject *obj, void *closure)
    2804             : {
    2805           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(obj);
    2806           0 :         PyObject *py_share;
    2807           0 :         if (object->share == NULL) {
    2808           0 :                 Py_RETURN_NONE;
    2809             :         }
    2810           0 :         if (object->share == NULL) {
    2811           0 :                 py_share = Py_None;
    2812           0 :                 Py_INCREF(py_share);
    2813             :         } else {
    2814           0 :                 if (object->share == NULL) {
    2815           0 :                         py_share = Py_None;
    2816           0 :                         Py_INCREF(py_share);
    2817             :                 } else {
    2818           0 :                         py_share = PyUnicode_Decode(object->share, strlen(object->share), "utf-8", "ignore");
    2819             :                 }
    2820             :         }
    2821           0 :         return py_share;
    2822             : }
    2823             : 
    2824           0 : static int py_srvsvc_NetConnInfo1_set_share(PyObject *py_obj, PyObject *value, void *closure)
    2825             : {
    2826           0 :         struct srvsvc_NetConnInfo1 *object = pytalloc_get_ptr(py_obj);
    2827           0 :         if (value == NULL) {
    2828           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->share");
    2829           0 :                 return -1;
    2830             :         }
    2831           0 :         if (value == Py_None) {
    2832           0 :                 object->share = NULL;
    2833             :         } else {
    2834           0 :                 object->share = NULL;
    2835             :                 {
    2836           0 :                         const char *test_str;
    2837           0 :                         const char *talloc_str;
    2838           0 :                         PyObject *unicode = NULL;
    2839           0 :                         if (PyUnicode_Check(value)) {
    2840           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2841           0 :                                 if (unicode == NULL) {
    2842           0 :                                         return -1;
    2843             :                                 }
    2844           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2845           0 :                         } else if (PyBytes_Check(value)) {
    2846           0 :                                 test_str = PyBytes_AS_STRING(value);
    2847             :                         } else {
    2848           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2849           0 :                                 return -1;
    2850             :                         }
    2851           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2852           0 :                         if (unicode != NULL) {
    2853           0 :                                 Py_DECREF(unicode);
    2854             :                         }
    2855           0 :                         if (talloc_str == NULL) {
    2856           0 :                                 PyErr_NoMemory();
    2857           0 :                                 return -1;
    2858             :                         }
    2859           0 :                         object->share = talloc_str;
    2860             :                 }
    2861             :         }
    2862           0 :         return 0;
    2863             : }
    2864             : 
    2865             : static PyGetSetDef py_srvsvc_NetConnInfo1_getsetters[] = {
    2866             :         {
    2867             :                 .name = discard_const_p(char, "conn_id"),
    2868             :                 .get = py_srvsvc_NetConnInfo1_get_conn_id,
    2869             :                 .set = py_srvsvc_NetConnInfo1_set_conn_id,
    2870             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2871             :         },
    2872             :         {
    2873             :                 .name = discard_const_p(char, "conn_type"),
    2874             :                 .get = py_srvsvc_NetConnInfo1_get_conn_type,
    2875             :                 .set = py_srvsvc_NetConnInfo1_set_conn_type,
    2876             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2877             :         },
    2878             :         {
    2879             :                 .name = discard_const_p(char, "num_open"),
    2880             :                 .get = py_srvsvc_NetConnInfo1_get_num_open,
    2881             :                 .set = py_srvsvc_NetConnInfo1_set_num_open,
    2882             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2883             :         },
    2884             :         {
    2885             :                 .name = discard_const_p(char, "num_users"),
    2886             :                 .get = py_srvsvc_NetConnInfo1_get_num_users,
    2887             :                 .set = py_srvsvc_NetConnInfo1_set_num_users,
    2888             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2889             :         },
    2890             :         {
    2891             :                 .name = discard_const_p(char, "conn_time"),
    2892             :                 .get = py_srvsvc_NetConnInfo1_get_conn_time,
    2893             :                 .set = py_srvsvc_NetConnInfo1_set_conn_time,
    2894             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2895             :         },
    2896             :         {
    2897             :                 .name = discard_const_p(char, "user"),
    2898             :                 .get = py_srvsvc_NetConnInfo1_get_user,
    2899             :                 .set = py_srvsvc_NetConnInfo1_set_user,
    2900             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    2901             :         },
    2902             :         {
    2903             :                 .name = discard_const_p(char, "share"),
    2904             :                 .get = py_srvsvc_NetConnInfo1_get_share,
    2905             :                 .set = py_srvsvc_NetConnInfo1_set_share,
    2906             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    2907             :         },
    2908             :         { .name = NULL }
    2909             : };
    2910             : 
    2911           0 : static PyObject *py_srvsvc_NetConnInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2912             : {
    2913           0 :         return pytalloc_new(struct srvsvc_NetConnInfo1, type);
    2914             : }
    2915             : 
    2916             : 
    2917             : static PyTypeObject srvsvc_NetConnInfo1_Type = {
    2918             :         PyVarObject_HEAD_INIT(NULL, 0)
    2919             :         .tp_name = "srvsvc.NetConnInfo1",
    2920             :         .tp_getset = py_srvsvc_NetConnInfo1_getsetters,
    2921             :         .tp_methods = NULL,
    2922             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2923             :         .tp_new = py_srvsvc_NetConnInfo1_new,
    2924             : };
    2925             : 
    2926             : 
    2927           0 : static PyObject *py_srvsvc_NetConnCtr1_get_count(PyObject *obj, void *closure)
    2928             : {
    2929           0 :         struct srvsvc_NetConnCtr1 *object = pytalloc_get_ptr(obj);
    2930           0 :         PyObject *py_count;
    2931           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    2932           0 :         return py_count;
    2933             : }
    2934             : 
    2935           0 : static int py_srvsvc_NetConnCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
    2936             : {
    2937           0 :         struct srvsvc_NetConnCtr1 *object = pytalloc_get_ptr(py_obj);
    2938           0 :         if (value == NULL) {
    2939           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    2940           0 :                 return -1;
    2941             :         }
    2942             :         {
    2943           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    2944           0 :                 if (PyLong_Check(value)) {
    2945           0 :                         unsigned long long test_var;
    2946           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2947           0 :                         if (PyErr_Occurred() != NULL) {
    2948           0 :                                 return -1;
    2949             :                         }
    2950           0 :                         if (test_var > uint_max) {
    2951           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2952             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2953           0 :                                 return -1;
    2954             :                         }
    2955           0 :                         object->count = test_var;
    2956             :                 } else {
    2957           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2958             :                           PyLong_Type.tp_name);
    2959           0 :                         return -1;
    2960             :                 }
    2961             :         }
    2962           0 :         return 0;
    2963             : }
    2964             : 
    2965           0 : static PyObject *py_srvsvc_NetConnCtr1_get_array(PyObject *obj, void *closure)
    2966             : {
    2967           0 :         struct srvsvc_NetConnCtr1 *object = pytalloc_get_ptr(obj);
    2968           0 :         PyObject *py_array;
    2969           0 :         if (object->array == NULL) {
    2970           0 :                 Py_RETURN_NONE;
    2971             :         }
    2972           0 :         if (object->array == NULL) {
    2973           0 :                 py_array = Py_None;
    2974           0 :                 Py_INCREF(py_array);
    2975             :         } else {
    2976           0 :                 py_array = PyList_New(object->count);
    2977           0 :                 if (py_array == NULL) {
    2978           0 :                         return NULL;
    2979             :                 }
    2980             :                 {
    2981             :                         int array_cntr_1;
    2982           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    2983           0 :                                 PyObject *py_array_1;
    2984           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetConnInfo1_Type, object->array, &(object->array)[array_cntr_1]);
    2985           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    2986             :                         }
    2987             :                 }
    2988             :         }
    2989           0 :         return py_array;
    2990             : }
    2991             : 
    2992           0 : static int py_srvsvc_NetConnCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
    2993             : {
    2994           0 :         struct srvsvc_NetConnCtr1 *object = pytalloc_get_ptr(py_obj);
    2995           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    2996           0 :         if (value == NULL) {
    2997           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    2998           0 :                 return -1;
    2999             :         }
    3000           0 :         if (value == Py_None) {
    3001           0 :                 object->array = NULL;
    3002             :         } else {
    3003           0 :                 object->array = NULL;
    3004           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    3005             :                 {
    3006           0 :                         int array_cntr_1;
    3007           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    3008           0 :                         if (!object->array) { return -1; }
    3009           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    3010           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    3011           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    3012           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    3013           0 :                                         return -1;
    3014             :                                 }
    3015           0 :                                 PY_CHECK_TYPE(&srvsvc_NetConnInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    3016           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    3017           0 :                                         PyErr_NoMemory();
    3018           0 :                                         return -1;
    3019             :                                 }
    3020           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    3021             :                         }
    3022             :                 }
    3023             :         }
    3024           0 :         return 0;
    3025             : }
    3026             : 
    3027             : static PyGetSetDef py_srvsvc_NetConnCtr1_getsetters[] = {
    3028             :         {
    3029             :                 .name = discard_const_p(char, "count"),
    3030             :                 .get = py_srvsvc_NetConnCtr1_get_count,
    3031             :                 .set = py_srvsvc_NetConnCtr1_set_count,
    3032             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3033             :         },
    3034             :         {
    3035             :                 .name = discard_const_p(char, "array"),
    3036             :                 .get = py_srvsvc_NetConnCtr1_get_array,
    3037             :                 .set = py_srvsvc_NetConnCtr1_set_array,
    3038             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetConnInfo1")
    3039             :         },
    3040             :         { .name = NULL }
    3041             : };
    3042             : 
    3043           0 : static PyObject *py_srvsvc_NetConnCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3044             : {
    3045           0 :         return pytalloc_new(struct srvsvc_NetConnCtr1, type);
    3046             : }
    3047             : 
    3048             : 
    3049             : static PyTypeObject srvsvc_NetConnCtr1_Type = {
    3050             :         PyVarObject_HEAD_INIT(NULL, 0)
    3051             :         .tp_name = "srvsvc.NetConnCtr1",
    3052             :         .tp_getset = py_srvsvc_NetConnCtr1_getsetters,
    3053             :         .tp_methods = NULL,
    3054             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3055             :         .tp_new = py_srvsvc_NetConnCtr1_new,
    3056             : };
    3057             : 
    3058           0 : static PyObject *py_import_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetConnCtr *in)
    3059             : {
    3060           0 :         PyObject *ret;
    3061             : 
    3062           0 :         switch (level) {
    3063           0 :                 case 0:
    3064           0 :                         if (in->ctr0 == NULL) {
    3065           0 :                                 ret = Py_None;
    3066           0 :                                 Py_INCREF(ret);
    3067             :                         } else {
    3068           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetConnCtr0_Type, in->ctr0, in->ctr0);
    3069             :                         }
    3070           0 :                         return ret;
    3071             : 
    3072           0 :                 case 1:
    3073           0 :                         if (in->ctr1 == NULL) {
    3074           0 :                                 ret = Py_None;
    3075           0 :                                 Py_INCREF(ret);
    3076             :                         } else {
    3077           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetConnCtr1_Type, in->ctr1, in->ctr1);
    3078             :                         }
    3079           0 :                         return ret;
    3080             : 
    3081           0 :                 default:
    3082           0 :                         ret = Py_None;
    3083           0 :                         Py_INCREF(ret);
    3084           0 :                         return ret;
    3085             : 
    3086             :         }
    3087             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    3088             :         return NULL;
    3089             : }
    3090             : 
    3091           0 : static union srvsvc_NetConnCtr *py_export_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    3092             : {
    3093           0 :         union srvsvc_NetConnCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetConnCtr);
    3094           0 :         switch (level) {
    3095           0 :                 case 0:
    3096           0 :                         if (in == NULL) {
    3097           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr0");
    3098           0 :                                 talloc_free(ret); return NULL;
    3099             :                         }
    3100           0 :                         if (in == Py_None) {
    3101           0 :                                 ret->ctr0 = NULL;
    3102             :                         } else {
    3103           0 :                                 ret->ctr0 = NULL;
    3104           0 :                                 PY_CHECK_TYPE(&srvsvc_NetConnCtr0_Type, in, talloc_free(ret); return NULL;);
    3105           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    3106           0 :                                         PyErr_NoMemory();
    3107           0 :                                         talloc_free(ret); return NULL;
    3108             :                                 }
    3109           0 :                                 ret->ctr0 = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(in);
    3110             :                         }
    3111           0 :                         break;
    3112             : 
    3113           0 :                 case 1:
    3114           0 :                         if (in == NULL) {
    3115           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr1");
    3116           0 :                                 talloc_free(ret); return NULL;
    3117             :                         }
    3118           0 :                         if (in == Py_None) {
    3119           0 :                                 ret->ctr1 = NULL;
    3120             :                         } else {
    3121           0 :                                 ret->ctr1 = NULL;
    3122           0 :                                 PY_CHECK_TYPE(&srvsvc_NetConnCtr1_Type, in, talloc_free(ret); return NULL;);
    3123           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    3124           0 :                                         PyErr_NoMemory();
    3125           0 :                                         talloc_free(ret); return NULL;
    3126             :                                 }
    3127           0 :                                 ret->ctr1 = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(in);
    3128             :                         }
    3129           0 :                         break;
    3130             : 
    3131           0 :                 default:
    3132           0 :                         break;
    3133             : 
    3134             :         }
    3135             : 
    3136           0 :         return ret;
    3137             : }
    3138             : 
    3139           0 : static PyObject *py_srvsvc_NetConnCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3140             : {
    3141           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    3142           0 :         PyObject *mem_ctx_obj = NULL;
    3143           0 :         TALLOC_CTX *mem_ctx = NULL;
    3144           0 :         int level = 0;
    3145           0 :         PyObject *in_obj = NULL;
    3146           0 :         union srvsvc_NetConnCtr *in = NULL;
    3147             : 
    3148           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    3149             :                 discard_const_p(char *, kwnames),
    3150             :                 &mem_ctx_obj,
    3151             :                 &level,
    3152             :                 &in_obj)) {
    3153           0 :                 return NULL;
    3154             :         }
    3155           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    3156           0 :         if (mem_ctx == NULL) {
    3157           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    3158           0 :                 return NULL;
    3159             :         }
    3160           0 :         in = (union srvsvc_NetConnCtr *)pytalloc_get_ptr(in_obj);
    3161           0 :         if (in == NULL) {
    3162           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetConnCtr!");
    3163           0 :                 return NULL;
    3164             :         }
    3165             : 
    3166           0 :         return py_import_srvsvc_NetConnCtr(mem_ctx, level, in);
    3167             : }
    3168             : 
    3169           0 : static PyObject *py_srvsvc_NetConnCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3170             : {
    3171           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    3172           0 :         PyObject *mem_ctx_obj = NULL;
    3173           0 :         TALLOC_CTX *mem_ctx = NULL;
    3174           0 :         int level = 0;
    3175           0 :         PyObject *in = NULL;
    3176           0 :         union srvsvc_NetConnCtr *out = NULL;
    3177             : 
    3178           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    3179             :                 discard_const_p(char *, kwnames),
    3180             :                 &mem_ctx_obj,
    3181             :                 &level,
    3182             :                 &in)) {
    3183           0 :                 return NULL;
    3184             :         }
    3185           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    3186           0 :         if (mem_ctx == NULL) {
    3187           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    3188           0 :                 return NULL;
    3189             :         }
    3190             : 
    3191           0 :         out = py_export_srvsvc_NetConnCtr(mem_ctx, level, in);
    3192           0 :         if (out == NULL) {
    3193           0 :                 return NULL;
    3194             :         }
    3195             : 
    3196           0 :         return pytalloc_GenericObject_reference(out);
    3197             : }
    3198             : 
    3199             : static PyMethodDef py_srvsvc_NetConnCtr_methods[] = {
    3200             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetConnCtr_import),
    3201             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    3202             :                 "T.__import__(mem_ctx, level, in) => ret." },
    3203             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetConnCtr_export),
    3204             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    3205             :                 "T.__export__(mem_ctx, level, in) => ret." },
    3206             :         { NULL, NULL, 0, NULL }
    3207             : };
    3208             : 
    3209           0 : static PyObject *py_srvsvc_NetConnCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3210             : {
    3211           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    3212           0 :         return NULL;
    3213             : }
    3214             : 
    3215             : 
    3216             : static PyTypeObject srvsvc_NetConnCtr_Type = {
    3217             :         PyVarObject_HEAD_INIT(NULL, 0)
    3218             :         .tp_name = "srvsvc.NetConnCtr",
    3219             :         .tp_getset = NULL,
    3220             :         .tp_methods = py_srvsvc_NetConnCtr_methods,
    3221             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3222             :         .tp_new = py_srvsvc_NetConnCtr_new,
    3223             : };
    3224             : 
    3225             : 
    3226           0 : static PyObject *py_srvsvc_NetConnInfoCtr_get_level(PyObject *obj, void *closure)
    3227             : {
    3228           0 :         struct srvsvc_NetConnInfoCtr *object = pytalloc_get_ptr(obj);
    3229           0 :         PyObject *py_level;
    3230           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->level));
    3231           0 :         return py_level;
    3232             : }
    3233             : 
    3234           0 : static int py_srvsvc_NetConnInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
    3235             : {
    3236           0 :         struct srvsvc_NetConnInfoCtr *object = pytalloc_get_ptr(py_obj);
    3237           0 :         if (value == NULL) {
    3238           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->level");
    3239           0 :                 return -1;
    3240             :         }
    3241             :         {
    3242           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    3243           0 :                 if (PyLong_Check(value)) {
    3244           0 :                         unsigned long long test_var;
    3245           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3246           0 :                         if (PyErr_Occurred() != NULL) {
    3247           0 :                                 return -1;
    3248             :                         }
    3249           0 :                         if (test_var > uint_max) {
    3250           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3251             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3252           0 :                                 return -1;
    3253             :                         }
    3254           0 :                         object->level = test_var;
    3255             :                 } else {
    3256           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3257             :                           PyLong_Type.tp_name);
    3258           0 :                         return -1;
    3259             :                 }
    3260             :         }
    3261           0 :         return 0;
    3262             : }
    3263             : 
    3264           0 : static PyObject *py_srvsvc_NetConnInfoCtr_get_ctr(PyObject *obj, void *closure)
    3265             : {
    3266           0 :         struct srvsvc_NetConnInfoCtr *object = pytalloc_get_ptr(obj);
    3267           0 :         PyObject *py_ctr;
    3268           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetConnCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetConnCtr");
    3269           0 :         if (py_ctr == NULL) {
    3270           0 :                 return NULL;
    3271             :         }
    3272           0 :         return py_ctr;
    3273             : }
    3274             : 
    3275           0 : static int py_srvsvc_NetConnInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    3276             : {
    3277           0 :         struct srvsvc_NetConnInfoCtr *object = pytalloc_get_ptr(py_obj);
    3278           0 :         if (value == NULL) {
    3279           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ctr");
    3280           0 :                 return -1;
    3281             :         }
    3282             :         {
    3283           0 :                 union srvsvc_NetConnCtr *ctr_switch_0;
    3284           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");
    3285           0 :                 if (ctr_switch_0 == NULL) {
    3286           0 :                         return -1;
    3287             :                 }
    3288           0 :                 object->ctr = *ctr_switch_0;
    3289             :         }
    3290           0 :         return 0;
    3291             : }
    3292             : 
    3293             : static PyGetSetDef py_srvsvc_NetConnInfoCtr_getsetters[] = {
    3294             :         {
    3295             :                 .name = discard_const_p(char, "level"),
    3296             :                 .get = py_srvsvc_NetConnInfoCtr_get_level,
    3297             :                 .set = py_srvsvc_NetConnInfoCtr_set_level,
    3298             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3299             :         },
    3300             :         {
    3301             :                 .name = discard_const_p(char, "ctr"),
    3302             :                 .get = py_srvsvc_NetConnInfoCtr_get_ctr,
    3303             :                 .set = py_srvsvc_NetConnInfoCtr_set_ctr,
    3304             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetConnCtr")
    3305             :         },
    3306             :         { .name = NULL }
    3307             : };
    3308             : 
    3309           0 : static PyObject *py_srvsvc_NetConnInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3310             : {
    3311           0 :         return pytalloc_new(struct srvsvc_NetConnInfoCtr, type);
    3312             : }
    3313             : 
    3314             : 
    3315             : static PyTypeObject srvsvc_NetConnInfoCtr_Type = {
    3316             :         PyVarObject_HEAD_INIT(NULL, 0)
    3317             :         .tp_name = "srvsvc.NetConnInfoCtr",
    3318             :         .tp_getset = py_srvsvc_NetConnInfoCtr_getsetters,
    3319             :         .tp_methods = NULL,
    3320             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3321             :         .tp_new = py_srvsvc_NetConnInfoCtr_new,
    3322             : };
    3323             : 
    3324             : 
    3325           0 : static PyObject *py_srvsvc_NetFileInfo2_get_fid(PyObject *obj, void *closure)
    3326             : {
    3327           0 :         struct srvsvc_NetFileInfo2 *object = pytalloc_get_ptr(obj);
    3328           0 :         PyObject *py_fid;
    3329           0 :         py_fid = PyLong_FromUnsignedLongLong((uint32_t)(object->fid));
    3330           0 :         return py_fid;
    3331             : }
    3332             : 
    3333           0 : static int py_srvsvc_NetFileInfo2_set_fid(PyObject *py_obj, PyObject *value, void *closure)
    3334             : {
    3335           0 :         struct srvsvc_NetFileInfo2 *object = pytalloc_get_ptr(py_obj);
    3336           0 :         if (value == NULL) {
    3337           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fid");
    3338           0 :                 return -1;
    3339             :         }
    3340             :         {
    3341           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fid));
    3342           0 :                 if (PyLong_Check(value)) {
    3343           0 :                         unsigned long long test_var;
    3344           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3345           0 :                         if (PyErr_Occurred() != NULL) {
    3346           0 :                                 return -1;
    3347             :                         }
    3348           0 :                         if (test_var > uint_max) {
    3349           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3350             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3351           0 :                                 return -1;
    3352             :                         }
    3353           0 :                         object->fid = test_var;
    3354             :                 } else {
    3355           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3356             :                           PyLong_Type.tp_name);
    3357           0 :                         return -1;
    3358             :                 }
    3359             :         }
    3360           0 :         return 0;
    3361             : }
    3362             : 
    3363             : static PyGetSetDef py_srvsvc_NetFileInfo2_getsetters[] = {
    3364             :         {
    3365             :                 .name = discard_const_p(char, "fid"),
    3366             :                 .get = py_srvsvc_NetFileInfo2_get_fid,
    3367             :                 .set = py_srvsvc_NetFileInfo2_set_fid,
    3368             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3369             :         },
    3370             :         { .name = NULL }
    3371             : };
    3372             : 
    3373           0 : static PyObject *py_srvsvc_NetFileInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3374             : {
    3375           0 :         return pytalloc_new(struct srvsvc_NetFileInfo2, type);
    3376             : }
    3377             : 
    3378             : 
    3379             : static PyTypeObject srvsvc_NetFileInfo2_Type = {
    3380             :         PyVarObject_HEAD_INIT(NULL, 0)
    3381             :         .tp_name = "srvsvc.NetFileInfo2",
    3382             :         .tp_getset = py_srvsvc_NetFileInfo2_getsetters,
    3383             :         .tp_methods = NULL,
    3384             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3385             :         .tp_new = py_srvsvc_NetFileInfo2_new,
    3386             : };
    3387             : 
    3388             : 
    3389           0 : static PyObject *py_srvsvc_NetFileCtr2_get_count(PyObject *obj, void *closure)
    3390             : {
    3391           0 :         struct srvsvc_NetFileCtr2 *object = pytalloc_get_ptr(obj);
    3392           0 :         PyObject *py_count;
    3393           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    3394           0 :         return py_count;
    3395             : }
    3396             : 
    3397           0 : static int py_srvsvc_NetFileCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
    3398             : {
    3399           0 :         struct srvsvc_NetFileCtr2 *object = pytalloc_get_ptr(py_obj);
    3400           0 :         if (value == NULL) {
    3401           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    3402           0 :                 return -1;
    3403             :         }
    3404             :         {
    3405           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    3406           0 :                 if (PyLong_Check(value)) {
    3407           0 :                         unsigned long long test_var;
    3408           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3409           0 :                         if (PyErr_Occurred() != NULL) {
    3410           0 :                                 return -1;
    3411             :                         }
    3412           0 :                         if (test_var > uint_max) {
    3413           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3414             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3415           0 :                                 return -1;
    3416             :                         }
    3417           0 :                         object->count = test_var;
    3418             :                 } else {
    3419           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3420             :                           PyLong_Type.tp_name);
    3421           0 :                         return -1;
    3422             :                 }
    3423             :         }
    3424           0 :         return 0;
    3425             : }
    3426             : 
    3427           0 : static PyObject *py_srvsvc_NetFileCtr2_get_array(PyObject *obj, void *closure)
    3428             : {
    3429           0 :         struct srvsvc_NetFileCtr2 *object = pytalloc_get_ptr(obj);
    3430           0 :         PyObject *py_array;
    3431           0 :         if (object->array == NULL) {
    3432           0 :                 Py_RETURN_NONE;
    3433             :         }
    3434           0 :         if (object->array == NULL) {
    3435           0 :                 py_array = Py_None;
    3436           0 :                 Py_INCREF(py_array);
    3437             :         } else {
    3438           0 :                 py_array = PyList_New(object->count);
    3439           0 :                 if (py_array == NULL) {
    3440           0 :                         return NULL;
    3441             :                 }
    3442             :                 {
    3443             :                         int array_cntr_1;
    3444           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    3445           0 :                                 PyObject *py_array_1;
    3446           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetFileInfo2_Type, object->array, &(object->array)[array_cntr_1]);
    3447           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    3448             :                         }
    3449             :                 }
    3450             :         }
    3451           0 :         return py_array;
    3452             : }
    3453             : 
    3454           0 : static int py_srvsvc_NetFileCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
    3455             : {
    3456           0 :         struct srvsvc_NetFileCtr2 *object = pytalloc_get_ptr(py_obj);
    3457           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    3458           0 :         if (value == NULL) {
    3459           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    3460           0 :                 return -1;
    3461             :         }
    3462           0 :         if (value == Py_None) {
    3463           0 :                 object->array = NULL;
    3464             :         } else {
    3465           0 :                 object->array = NULL;
    3466           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    3467             :                 {
    3468           0 :                         int array_cntr_1;
    3469           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    3470           0 :                         if (!object->array) { return -1; }
    3471           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    3472           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    3473           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    3474           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    3475           0 :                                         return -1;
    3476             :                                 }
    3477           0 :                                 PY_CHECK_TYPE(&srvsvc_NetFileInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    3478           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    3479           0 :                                         PyErr_NoMemory();
    3480           0 :                                         return -1;
    3481             :                                 }
    3482           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetFileInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    3483             :                         }
    3484             :                 }
    3485             :         }
    3486           0 :         return 0;
    3487             : }
    3488             : 
    3489             : static PyGetSetDef py_srvsvc_NetFileCtr2_getsetters[] = {
    3490             :         {
    3491             :                 .name = discard_const_p(char, "count"),
    3492             :                 .get = py_srvsvc_NetFileCtr2_get_count,
    3493             :                 .set = py_srvsvc_NetFileCtr2_set_count,
    3494             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3495             :         },
    3496             :         {
    3497             :                 .name = discard_const_p(char, "array"),
    3498             :                 .get = py_srvsvc_NetFileCtr2_get_array,
    3499             :                 .set = py_srvsvc_NetFileCtr2_set_array,
    3500             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetFileInfo2")
    3501             :         },
    3502             :         { .name = NULL }
    3503             : };
    3504             : 
    3505           0 : static PyObject *py_srvsvc_NetFileCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3506             : {
    3507           0 :         return pytalloc_new(struct srvsvc_NetFileCtr2, type);
    3508             : }
    3509             : 
    3510             : 
    3511             : static PyTypeObject srvsvc_NetFileCtr2_Type = {
    3512             :         PyVarObject_HEAD_INIT(NULL, 0)
    3513             :         .tp_name = "srvsvc.NetFileCtr2",
    3514             :         .tp_getset = py_srvsvc_NetFileCtr2_getsetters,
    3515             :         .tp_methods = NULL,
    3516             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3517             :         .tp_new = py_srvsvc_NetFileCtr2_new,
    3518             : };
    3519             : 
    3520             : 
    3521           0 : static PyObject *py_srvsvc_NetFileInfo3_get_fid(PyObject *obj, void *closure)
    3522             : {
    3523           0 :         struct srvsvc_NetFileInfo3 *object = pytalloc_get_ptr(obj);
    3524           0 :         PyObject *py_fid;
    3525           0 :         py_fid = PyLong_FromUnsignedLongLong((uint32_t)(object->fid));
    3526           0 :         return py_fid;
    3527             : }
    3528             : 
    3529           0 : static int py_srvsvc_NetFileInfo3_set_fid(PyObject *py_obj, PyObject *value, void *closure)
    3530             : {
    3531           0 :         struct srvsvc_NetFileInfo3 *object = pytalloc_get_ptr(py_obj);
    3532           0 :         if (value == NULL) {
    3533           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fid");
    3534           0 :                 return -1;
    3535             :         }
    3536             :         {
    3537           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fid));
    3538           0 :                 if (PyLong_Check(value)) {
    3539           0 :                         unsigned long long test_var;
    3540           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3541           0 :                         if (PyErr_Occurred() != NULL) {
    3542           0 :                                 return -1;
    3543             :                         }
    3544           0 :                         if (test_var > uint_max) {
    3545           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3546             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3547           0 :                                 return -1;
    3548             :                         }
    3549           0 :                         object->fid = test_var;
    3550             :                 } else {
    3551           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3552             :                           PyLong_Type.tp_name);
    3553           0 :                         return -1;
    3554             :                 }
    3555             :         }
    3556           0 :         return 0;
    3557             : }
    3558             : 
    3559           0 : static PyObject *py_srvsvc_NetFileInfo3_get_permissions(PyObject *obj, void *closure)
    3560             : {
    3561           0 :         struct srvsvc_NetFileInfo3 *object = pytalloc_get_ptr(obj);
    3562           0 :         PyObject *py_permissions;
    3563           0 :         py_permissions = PyLong_FromUnsignedLongLong((uint32_t)(object->permissions));
    3564           0 :         return py_permissions;
    3565             : }
    3566             : 
    3567           0 : static int py_srvsvc_NetFileInfo3_set_permissions(PyObject *py_obj, PyObject *value, void *closure)
    3568             : {
    3569           0 :         struct srvsvc_NetFileInfo3 *object = pytalloc_get_ptr(py_obj);
    3570           0 :         if (value == NULL) {
    3571           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->permissions");
    3572           0 :                 return -1;
    3573             :         }
    3574             :         {
    3575           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permissions));
    3576           0 :                 if (PyLong_Check(value)) {
    3577           0 :                         unsigned long long test_var;
    3578           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3579           0 :                         if (PyErr_Occurred() != NULL) {
    3580           0 :                                 return -1;
    3581             :                         }
    3582           0 :                         if (test_var > uint_max) {
    3583           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3584             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3585           0 :                                 return -1;
    3586             :                         }
    3587           0 :                         object->permissions = test_var;
    3588             :                 } else {
    3589           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3590             :                           PyLong_Type.tp_name);
    3591           0 :                         return -1;
    3592             :                 }
    3593             :         }
    3594           0 :         return 0;
    3595             : }
    3596             : 
    3597           0 : static PyObject *py_srvsvc_NetFileInfo3_get_num_locks(PyObject *obj, void *closure)
    3598             : {
    3599           0 :         struct srvsvc_NetFileInfo3 *object = pytalloc_get_ptr(obj);
    3600           0 :         PyObject *py_num_locks;
    3601           0 :         py_num_locks = PyLong_FromUnsignedLongLong((uint32_t)(object->num_locks));
    3602           0 :         return py_num_locks;
    3603             : }
    3604             : 
    3605           0 : static int py_srvsvc_NetFileInfo3_set_num_locks(PyObject *py_obj, PyObject *value, void *closure)
    3606             : {
    3607           0 :         struct srvsvc_NetFileInfo3 *object = pytalloc_get_ptr(py_obj);
    3608           0 :         if (value == NULL) {
    3609           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_locks");
    3610           0 :                 return -1;
    3611             :         }
    3612             :         {
    3613           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_locks));
    3614           0 :                 if (PyLong_Check(value)) {
    3615           0 :                         unsigned long long test_var;
    3616           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3617           0 :                         if (PyErr_Occurred() != NULL) {
    3618           0 :                                 return -1;
    3619             :                         }
    3620           0 :                         if (test_var > uint_max) {
    3621           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3622             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3623           0 :                                 return -1;
    3624             :                         }
    3625           0 :                         object->num_locks = test_var;
    3626             :                 } else {
    3627           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3628             :                           PyLong_Type.tp_name);
    3629           0 :                         return -1;
    3630             :                 }
    3631             :         }
    3632           0 :         return 0;
    3633             : }
    3634             : 
    3635           0 : static PyObject *py_srvsvc_NetFileInfo3_get_path(PyObject *obj, void *closure)
    3636             : {
    3637           0 :         struct srvsvc_NetFileInfo3 *object = pytalloc_get_ptr(obj);
    3638           0 :         PyObject *py_path;
    3639           0 :         if (object->path == NULL) {
    3640           0 :                 Py_RETURN_NONE;
    3641             :         }
    3642           0 :         if (object->path == NULL) {
    3643           0 :                 py_path = Py_None;
    3644           0 :                 Py_INCREF(py_path);
    3645             :         } else {
    3646           0 :                 if (object->path == NULL) {
    3647           0 :                         py_path = Py_None;
    3648           0 :                         Py_INCREF(py_path);
    3649             :                 } else {
    3650           0 :                         py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
    3651             :                 }
    3652             :         }
    3653           0 :         return py_path;
    3654             : }
    3655             : 
    3656           0 : static int py_srvsvc_NetFileInfo3_set_path(PyObject *py_obj, PyObject *value, void *closure)
    3657             : {
    3658           0 :         struct srvsvc_NetFileInfo3 *object = pytalloc_get_ptr(py_obj);
    3659           0 :         if (value == NULL) {
    3660           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->path");
    3661           0 :                 return -1;
    3662             :         }
    3663           0 :         if (value == Py_None) {
    3664           0 :                 object->path = NULL;
    3665             :         } else {
    3666           0 :                 object->path = NULL;
    3667             :                 {
    3668           0 :                         const char *test_str;
    3669           0 :                         const char *talloc_str;
    3670           0 :                         PyObject *unicode = NULL;
    3671           0 :                         if (PyUnicode_Check(value)) {
    3672           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    3673           0 :                                 if (unicode == NULL) {
    3674           0 :                                         return -1;
    3675             :                                 }
    3676           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    3677           0 :                         } else if (PyBytes_Check(value)) {
    3678           0 :                                 test_str = PyBytes_AS_STRING(value);
    3679             :                         } else {
    3680           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    3681           0 :                                 return -1;
    3682             :                         }
    3683           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    3684           0 :                         if (unicode != NULL) {
    3685           0 :                                 Py_DECREF(unicode);
    3686             :                         }
    3687           0 :                         if (talloc_str == NULL) {
    3688           0 :                                 PyErr_NoMemory();
    3689           0 :                                 return -1;
    3690             :                         }
    3691           0 :                         object->path = talloc_str;
    3692             :                 }
    3693             :         }
    3694           0 :         return 0;
    3695             : }
    3696             : 
    3697           0 : static PyObject *py_srvsvc_NetFileInfo3_get_user(PyObject *obj, void *closure)
    3698             : {
    3699           0 :         struct srvsvc_NetFileInfo3 *object = pytalloc_get_ptr(obj);
    3700           0 :         PyObject *py_user;
    3701           0 :         if (object->user == NULL) {
    3702           0 :                 Py_RETURN_NONE;
    3703             :         }
    3704           0 :         if (object->user == NULL) {
    3705           0 :                 py_user = Py_None;
    3706           0 :                 Py_INCREF(py_user);
    3707             :         } else {
    3708           0 :                 if (object->user == NULL) {
    3709           0 :                         py_user = Py_None;
    3710           0 :                         Py_INCREF(py_user);
    3711             :                 } else {
    3712           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
    3713             :                 }
    3714             :         }
    3715           0 :         return py_user;
    3716             : }
    3717             : 
    3718           0 : static int py_srvsvc_NetFileInfo3_set_user(PyObject *py_obj, PyObject *value, void *closure)
    3719             : {
    3720           0 :         struct srvsvc_NetFileInfo3 *object = pytalloc_get_ptr(py_obj);
    3721           0 :         if (value == NULL) {
    3722           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user");
    3723           0 :                 return -1;
    3724             :         }
    3725           0 :         if (value == Py_None) {
    3726           0 :                 object->user = NULL;
    3727             :         } else {
    3728           0 :                 object->user = NULL;
    3729             :                 {
    3730           0 :                         const char *test_str;
    3731           0 :                         const char *talloc_str;
    3732           0 :                         PyObject *unicode = NULL;
    3733           0 :                         if (PyUnicode_Check(value)) {
    3734           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    3735           0 :                                 if (unicode == NULL) {
    3736           0 :                                         return -1;
    3737             :                                 }
    3738           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    3739           0 :                         } else if (PyBytes_Check(value)) {
    3740           0 :                                 test_str = PyBytes_AS_STRING(value);
    3741             :                         } else {
    3742           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    3743           0 :                                 return -1;
    3744             :                         }
    3745           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    3746           0 :                         if (unicode != NULL) {
    3747           0 :                                 Py_DECREF(unicode);
    3748             :                         }
    3749           0 :                         if (talloc_str == NULL) {
    3750           0 :                                 PyErr_NoMemory();
    3751           0 :                                 return -1;
    3752             :                         }
    3753           0 :                         object->user = talloc_str;
    3754             :                 }
    3755             :         }
    3756           0 :         return 0;
    3757             : }
    3758             : 
    3759             : static PyGetSetDef py_srvsvc_NetFileInfo3_getsetters[] = {
    3760             :         {
    3761             :                 .name = discard_const_p(char, "fid"),
    3762             :                 .get = py_srvsvc_NetFileInfo3_get_fid,
    3763             :                 .set = py_srvsvc_NetFileInfo3_set_fid,
    3764             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3765             :         },
    3766             :         {
    3767             :                 .name = discard_const_p(char, "permissions"),
    3768             :                 .get = py_srvsvc_NetFileInfo3_get_permissions,
    3769             :                 .set = py_srvsvc_NetFileInfo3_set_permissions,
    3770             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3771             :         },
    3772             :         {
    3773             :                 .name = discard_const_p(char, "num_locks"),
    3774             :                 .get = py_srvsvc_NetFileInfo3_get_num_locks,
    3775             :                 .set = py_srvsvc_NetFileInfo3_set_num_locks,
    3776             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3777             :         },
    3778             :         {
    3779             :                 .name = discard_const_p(char, "path"),
    3780             :                 .get = py_srvsvc_NetFileInfo3_get_path,
    3781             :                 .set = py_srvsvc_NetFileInfo3_set_path,
    3782             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    3783             :         },
    3784             :         {
    3785             :                 .name = discard_const_p(char, "user"),
    3786             :                 .get = py_srvsvc_NetFileInfo3_get_user,
    3787             :                 .set = py_srvsvc_NetFileInfo3_set_user,
    3788             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    3789             :         },
    3790             :         { .name = NULL }
    3791             : };
    3792             : 
    3793           0 : static PyObject *py_srvsvc_NetFileInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3794             : {
    3795           0 :         return pytalloc_new(struct srvsvc_NetFileInfo3, type);
    3796             : }
    3797             : 
    3798             : 
    3799             : static PyTypeObject srvsvc_NetFileInfo3_Type = {
    3800             :         PyVarObject_HEAD_INIT(NULL, 0)
    3801             :         .tp_name = "srvsvc.NetFileInfo3",
    3802             :         .tp_getset = py_srvsvc_NetFileInfo3_getsetters,
    3803             :         .tp_methods = NULL,
    3804             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3805             :         .tp_new = py_srvsvc_NetFileInfo3_new,
    3806             : };
    3807             : 
    3808             : 
    3809           0 : static PyObject *py_srvsvc_NetFileCtr3_get_count(PyObject *obj, void *closure)
    3810             : {
    3811           0 :         struct srvsvc_NetFileCtr3 *object = pytalloc_get_ptr(obj);
    3812           0 :         PyObject *py_count;
    3813           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    3814           0 :         return py_count;
    3815             : }
    3816             : 
    3817           0 : static int py_srvsvc_NetFileCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
    3818             : {
    3819           0 :         struct srvsvc_NetFileCtr3 *object = pytalloc_get_ptr(py_obj);
    3820           0 :         if (value == NULL) {
    3821           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    3822           0 :                 return -1;
    3823             :         }
    3824             :         {
    3825           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    3826           0 :                 if (PyLong_Check(value)) {
    3827           0 :                         unsigned long long test_var;
    3828           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3829           0 :                         if (PyErr_Occurred() != NULL) {
    3830           0 :                                 return -1;
    3831             :                         }
    3832           0 :                         if (test_var > uint_max) {
    3833           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3834             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3835           0 :                                 return -1;
    3836             :                         }
    3837           0 :                         object->count = test_var;
    3838             :                 } else {
    3839           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3840             :                           PyLong_Type.tp_name);
    3841           0 :                         return -1;
    3842             :                 }
    3843             :         }
    3844           0 :         return 0;
    3845             : }
    3846             : 
    3847           0 : static PyObject *py_srvsvc_NetFileCtr3_get_array(PyObject *obj, void *closure)
    3848             : {
    3849           0 :         struct srvsvc_NetFileCtr3 *object = pytalloc_get_ptr(obj);
    3850           0 :         PyObject *py_array;
    3851           0 :         if (object->array == NULL) {
    3852           0 :                 Py_RETURN_NONE;
    3853             :         }
    3854           0 :         if (object->array == NULL) {
    3855           0 :                 py_array = Py_None;
    3856           0 :                 Py_INCREF(py_array);
    3857             :         } else {
    3858           0 :                 py_array = PyList_New(object->count);
    3859           0 :                 if (py_array == NULL) {
    3860           0 :                         return NULL;
    3861             :                 }
    3862             :                 {
    3863             :                         int array_cntr_1;
    3864           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    3865           0 :                                 PyObject *py_array_1;
    3866           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetFileInfo3_Type, object->array, &(object->array)[array_cntr_1]);
    3867           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    3868             :                         }
    3869             :                 }
    3870             :         }
    3871           0 :         return py_array;
    3872             : }
    3873             : 
    3874           0 : static int py_srvsvc_NetFileCtr3_set_array(PyObject *py_obj, PyObject *value, void *closure)
    3875             : {
    3876           0 :         struct srvsvc_NetFileCtr3 *object = pytalloc_get_ptr(py_obj);
    3877           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    3878           0 :         if (value == NULL) {
    3879           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    3880           0 :                 return -1;
    3881             :         }
    3882           0 :         if (value == Py_None) {
    3883           0 :                 object->array = NULL;
    3884             :         } else {
    3885           0 :                 object->array = NULL;
    3886           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    3887             :                 {
    3888           0 :                         int array_cntr_1;
    3889           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    3890           0 :                         if (!object->array) { return -1; }
    3891           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    3892           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    3893           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    3894           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    3895           0 :                                         return -1;
    3896             :                                 }
    3897           0 :                                 PY_CHECK_TYPE(&srvsvc_NetFileInfo3_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    3898           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    3899           0 :                                         PyErr_NoMemory();
    3900           0 :                                         return -1;
    3901             :                                 }
    3902           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    3903             :                         }
    3904             :                 }
    3905             :         }
    3906           0 :         return 0;
    3907             : }
    3908             : 
    3909             : static PyGetSetDef py_srvsvc_NetFileCtr3_getsetters[] = {
    3910             :         {
    3911             :                 .name = discard_const_p(char, "count"),
    3912             :                 .get = py_srvsvc_NetFileCtr3_get_count,
    3913             :                 .set = py_srvsvc_NetFileCtr3_set_count,
    3914             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3915             :         },
    3916             :         {
    3917             :                 .name = discard_const_p(char, "array"),
    3918             :                 .get = py_srvsvc_NetFileCtr3_get_array,
    3919             :                 .set = py_srvsvc_NetFileCtr3_set_array,
    3920             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetFileInfo3")
    3921             :         },
    3922             :         { .name = NULL }
    3923             : };
    3924             : 
    3925           0 : static PyObject *py_srvsvc_NetFileCtr3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3926             : {
    3927           0 :         return pytalloc_new(struct srvsvc_NetFileCtr3, type);
    3928             : }
    3929             : 
    3930             : 
    3931             : static PyTypeObject srvsvc_NetFileCtr3_Type = {
    3932             :         PyVarObject_HEAD_INIT(NULL, 0)
    3933             :         .tp_name = "srvsvc.NetFileCtr3",
    3934             :         .tp_getset = py_srvsvc_NetFileCtr3_getsetters,
    3935             :         .tp_methods = NULL,
    3936             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3937             :         .tp_new = py_srvsvc_NetFileCtr3_new,
    3938             : };
    3939             : 
    3940           0 : static PyObject *py_import_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileInfo *in)
    3941             : {
    3942           0 :         PyObject *ret;
    3943             : 
    3944           0 :         switch (level) {
    3945           0 :                 case 2:
    3946           0 :                         if (in->info2 == NULL) {
    3947           0 :                                 ret = Py_None;
    3948           0 :                                 Py_INCREF(ret);
    3949             :                         } else {
    3950           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetFileInfo2_Type, in->info2, in->info2);
    3951             :                         }
    3952           0 :                         return ret;
    3953             : 
    3954           0 :                 case 3:
    3955           0 :                         if (in->info3 == NULL) {
    3956           0 :                                 ret = Py_None;
    3957           0 :                                 Py_INCREF(ret);
    3958             :                         } else {
    3959           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetFileInfo3_Type, in->info3, in->info3);
    3960             :                         }
    3961           0 :                         return ret;
    3962             : 
    3963           0 :                 default:
    3964           0 :                         ret = Py_None;
    3965           0 :                         Py_INCREF(ret);
    3966           0 :                         return ret;
    3967             : 
    3968             :         }
    3969             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    3970             :         return NULL;
    3971             : }
    3972             : 
    3973           0 : static union srvsvc_NetFileInfo *py_export_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    3974             : {
    3975           0 :         union srvsvc_NetFileInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetFileInfo);
    3976           0 :         switch (level) {
    3977           0 :                 case 2:
    3978           0 :                         if (in == NULL) {
    3979           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info2");
    3980           0 :                                 talloc_free(ret); return NULL;
    3981             :                         }
    3982           0 :                         if (in == Py_None) {
    3983           0 :                                 ret->info2 = NULL;
    3984             :                         } else {
    3985           0 :                                 ret->info2 = NULL;
    3986           0 :                                 PY_CHECK_TYPE(&srvsvc_NetFileInfo2_Type, in, talloc_free(ret); return NULL;);
    3987           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    3988           0 :                                         PyErr_NoMemory();
    3989           0 :                                         talloc_free(ret); return NULL;
    3990             :                                 }
    3991           0 :                                 ret->info2 = (struct srvsvc_NetFileInfo2 *)pytalloc_get_ptr(in);
    3992             :                         }
    3993           0 :                         break;
    3994             : 
    3995           0 :                 case 3:
    3996           0 :                         if (in == NULL) {
    3997           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info3");
    3998           0 :                                 talloc_free(ret); return NULL;
    3999             :                         }
    4000           0 :                         if (in == Py_None) {
    4001           0 :                                 ret->info3 = NULL;
    4002             :                         } else {
    4003           0 :                                 ret->info3 = NULL;
    4004           0 :                                 PY_CHECK_TYPE(&srvsvc_NetFileInfo3_Type, in, talloc_free(ret); return NULL;);
    4005           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    4006           0 :                                         PyErr_NoMemory();
    4007           0 :                                         talloc_free(ret); return NULL;
    4008             :                                 }
    4009           0 :                                 ret->info3 = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(in);
    4010             :                         }
    4011           0 :                         break;
    4012             : 
    4013           0 :                 default:
    4014           0 :                         break;
    4015             : 
    4016             :         }
    4017             : 
    4018           0 :         return ret;
    4019             : }
    4020             : 
    4021           0 : static PyObject *py_srvsvc_NetFileInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4022             : {
    4023           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    4024           0 :         PyObject *mem_ctx_obj = NULL;
    4025           0 :         TALLOC_CTX *mem_ctx = NULL;
    4026           0 :         int level = 0;
    4027           0 :         PyObject *in_obj = NULL;
    4028           0 :         union srvsvc_NetFileInfo *in = NULL;
    4029             : 
    4030           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    4031             :                 discard_const_p(char *, kwnames),
    4032             :                 &mem_ctx_obj,
    4033             :                 &level,
    4034             :                 &in_obj)) {
    4035           0 :                 return NULL;
    4036             :         }
    4037           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    4038           0 :         if (mem_ctx == NULL) {
    4039           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    4040           0 :                 return NULL;
    4041             :         }
    4042           0 :         in = (union srvsvc_NetFileInfo *)pytalloc_get_ptr(in_obj);
    4043           0 :         if (in == NULL) {
    4044           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetFileInfo!");
    4045           0 :                 return NULL;
    4046             :         }
    4047             : 
    4048           0 :         return py_import_srvsvc_NetFileInfo(mem_ctx, level, in);
    4049             : }
    4050             : 
    4051           0 : static PyObject *py_srvsvc_NetFileInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4052             : {
    4053           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    4054           0 :         PyObject *mem_ctx_obj = NULL;
    4055           0 :         TALLOC_CTX *mem_ctx = NULL;
    4056           0 :         int level = 0;
    4057           0 :         PyObject *in = NULL;
    4058           0 :         union srvsvc_NetFileInfo *out = NULL;
    4059             : 
    4060           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    4061             :                 discard_const_p(char *, kwnames),
    4062             :                 &mem_ctx_obj,
    4063             :                 &level,
    4064             :                 &in)) {
    4065           0 :                 return NULL;
    4066             :         }
    4067           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    4068           0 :         if (mem_ctx == NULL) {
    4069           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    4070           0 :                 return NULL;
    4071             :         }
    4072             : 
    4073           0 :         out = py_export_srvsvc_NetFileInfo(mem_ctx, level, in);
    4074           0 :         if (out == NULL) {
    4075           0 :                 return NULL;
    4076             :         }
    4077             : 
    4078           0 :         return pytalloc_GenericObject_reference(out);
    4079             : }
    4080             : 
    4081             : static PyMethodDef py_srvsvc_NetFileInfo_methods[] = {
    4082             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileInfo_import),
    4083             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    4084             :                 "T.__import__(mem_ctx, level, in) => ret." },
    4085             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileInfo_export),
    4086             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    4087             :                 "T.__export__(mem_ctx, level, in) => ret." },
    4088             :         { NULL, NULL, 0, NULL }
    4089             : };
    4090             : 
    4091           0 : static PyObject *py_srvsvc_NetFileInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4092             : {
    4093           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    4094           0 :         return NULL;
    4095             : }
    4096             : 
    4097             : 
    4098             : static PyTypeObject srvsvc_NetFileInfo_Type = {
    4099             :         PyVarObject_HEAD_INIT(NULL, 0)
    4100             :         .tp_name = "srvsvc.NetFileInfo",
    4101             :         .tp_getset = NULL,
    4102             :         .tp_methods = py_srvsvc_NetFileInfo_methods,
    4103             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4104             :         .tp_new = py_srvsvc_NetFileInfo_new,
    4105             : };
    4106             : 
    4107           0 : static PyObject *py_import_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileCtr *in)
    4108             : {
    4109           0 :         PyObject *ret;
    4110             : 
    4111           0 :         switch (level) {
    4112           0 :                 case 2:
    4113           0 :                         if (in->ctr2 == NULL) {
    4114           0 :                                 ret = Py_None;
    4115           0 :                                 Py_INCREF(ret);
    4116             :                         } else {
    4117           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetFileCtr2_Type, in->ctr2, in->ctr2);
    4118             :                         }
    4119           0 :                         return ret;
    4120             : 
    4121           0 :                 case 3:
    4122           0 :                         if (in->ctr3 == NULL) {
    4123           0 :                                 ret = Py_None;
    4124           0 :                                 Py_INCREF(ret);
    4125             :                         } else {
    4126           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetFileCtr3_Type, in->ctr3, in->ctr3);
    4127             :                         }
    4128           0 :                         return ret;
    4129             : 
    4130           0 :                 default:
    4131           0 :                         ret = Py_None;
    4132           0 :                         Py_INCREF(ret);
    4133           0 :                         return ret;
    4134             : 
    4135             :         }
    4136             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    4137             :         return NULL;
    4138             : }
    4139             : 
    4140           0 : static union srvsvc_NetFileCtr *py_export_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    4141             : {
    4142           0 :         union srvsvc_NetFileCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetFileCtr);
    4143           0 :         switch (level) {
    4144           0 :                 case 2:
    4145           0 :                         if (in == NULL) {
    4146           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr2");
    4147           0 :                                 talloc_free(ret); return NULL;
    4148             :                         }
    4149           0 :                         if (in == Py_None) {
    4150           0 :                                 ret->ctr2 = NULL;
    4151             :                         } else {
    4152           0 :                                 ret->ctr2 = NULL;
    4153           0 :                                 PY_CHECK_TYPE(&srvsvc_NetFileCtr2_Type, in, talloc_free(ret); return NULL;);
    4154           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    4155           0 :                                         PyErr_NoMemory();
    4156           0 :                                         talloc_free(ret); return NULL;
    4157             :                                 }
    4158           0 :                                 ret->ctr2 = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(in);
    4159             :                         }
    4160           0 :                         break;
    4161             : 
    4162           0 :                 case 3:
    4163           0 :                         if (in == NULL) {
    4164           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr3");
    4165           0 :                                 talloc_free(ret); return NULL;
    4166             :                         }
    4167           0 :                         if (in == Py_None) {
    4168           0 :                                 ret->ctr3 = NULL;
    4169             :                         } else {
    4170           0 :                                 ret->ctr3 = NULL;
    4171           0 :                                 PY_CHECK_TYPE(&srvsvc_NetFileCtr3_Type, in, talloc_free(ret); return NULL;);
    4172           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    4173           0 :                                         PyErr_NoMemory();
    4174           0 :                                         talloc_free(ret); return NULL;
    4175             :                                 }
    4176           0 :                                 ret->ctr3 = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(in);
    4177             :                         }
    4178           0 :                         break;
    4179             : 
    4180           0 :                 default:
    4181           0 :                         break;
    4182             : 
    4183             :         }
    4184             : 
    4185           0 :         return ret;
    4186             : }
    4187             : 
    4188           0 : static PyObject *py_srvsvc_NetFileCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4189             : {
    4190           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    4191           0 :         PyObject *mem_ctx_obj = NULL;
    4192           0 :         TALLOC_CTX *mem_ctx = NULL;
    4193           0 :         int level = 0;
    4194           0 :         PyObject *in_obj = NULL;
    4195           0 :         union srvsvc_NetFileCtr *in = NULL;
    4196             : 
    4197           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    4198             :                 discard_const_p(char *, kwnames),
    4199             :                 &mem_ctx_obj,
    4200             :                 &level,
    4201             :                 &in_obj)) {
    4202           0 :                 return NULL;
    4203             :         }
    4204           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    4205           0 :         if (mem_ctx == NULL) {
    4206           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    4207           0 :                 return NULL;
    4208             :         }
    4209           0 :         in = (union srvsvc_NetFileCtr *)pytalloc_get_ptr(in_obj);
    4210           0 :         if (in == NULL) {
    4211           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetFileCtr!");
    4212           0 :                 return NULL;
    4213             :         }
    4214             : 
    4215           0 :         return py_import_srvsvc_NetFileCtr(mem_ctx, level, in);
    4216             : }
    4217             : 
    4218           0 : static PyObject *py_srvsvc_NetFileCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4219             : {
    4220           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    4221           0 :         PyObject *mem_ctx_obj = NULL;
    4222           0 :         TALLOC_CTX *mem_ctx = NULL;
    4223           0 :         int level = 0;
    4224           0 :         PyObject *in = NULL;
    4225           0 :         union srvsvc_NetFileCtr *out = NULL;
    4226             : 
    4227           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    4228             :                 discard_const_p(char *, kwnames),
    4229             :                 &mem_ctx_obj,
    4230             :                 &level,
    4231             :                 &in)) {
    4232           0 :                 return NULL;
    4233             :         }
    4234           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    4235           0 :         if (mem_ctx == NULL) {
    4236           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    4237           0 :                 return NULL;
    4238             :         }
    4239             : 
    4240           0 :         out = py_export_srvsvc_NetFileCtr(mem_ctx, level, in);
    4241           0 :         if (out == NULL) {
    4242           0 :                 return NULL;
    4243             :         }
    4244             : 
    4245           0 :         return pytalloc_GenericObject_reference(out);
    4246             : }
    4247             : 
    4248             : static PyMethodDef py_srvsvc_NetFileCtr_methods[] = {
    4249             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileCtr_import),
    4250             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    4251             :                 "T.__import__(mem_ctx, level, in) => ret." },
    4252             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileCtr_export),
    4253             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    4254             :                 "T.__export__(mem_ctx, level, in) => ret." },
    4255             :         { NULL, NULL, 0, NULL }
    4256             : };
    4257             : 
    4258           0 : static PyObject *py_srvsvc_NetFileCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4259             : {
    4260           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    4261           0 :         return NULL;
    4262             : }
    4263             : 
    4264             : 
    4265             : static PyTypeObject srvsvc_NetFileCtr_Type = {
    4266             :         PyVarObject_HEAD_INIT(NULL, 0)
    4267             :         .tp_name = "srvsvc.NetFileCtr",
    4268             :         .tp_getset = NULL,
    4269             :         .tp_methods = py_srvsvc_NetFileCtr_methods,
    4270             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4271             :         .tp_new = py_srvsvc_NetFileCtr_new,
    4272             : };
    4273             : 
    4274             : 
    4275           0 : static PyObject *py_srvsvc_NetFileInfoCtr_get_level(PyObject *obj, void *closure)
    4276             : {
    4277           0 :         struct srvsvc_NetFileInfoCtr *object = pytalloc_get_ptr(obj);
    4278           0 :         PyObject *py_level;
    4279           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->level));
    4280           0 :         return py_level;
    4281             : }
    4282             : 
    4283           0 : static int py_srvsvc_NetFileInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
    4284             : {
    4285           0 :         struct srvsvc_NetFileInfoCtr *object = pytalloc_get_ptr(py_obj);
    4286           0 :         if (value == NULL) {
    4287           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->level");
    4288           0 :                 return -1;
    4289             :         }
    4290             :         {
    4291           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    4292           0 :                 if (PyLong_Check(value)) {
    4293           0 :                         unsigned long long test_var;
    4294           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4295           0 :                         if (PyErr_Occurred() != NULL) {
    4296           0 :                                 return -1;
    4297             :                         }
    4298           0 :                         if (test_var > uint_max) {
    4299           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4300             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4301           0 :                                 return -1;
    4302             :                         }
    4303           0 :                         object->level = test_var;
    4304             :                 } else {
    4305           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4306             :                           PyLong_Type.tp_name);
    4307           0 :                         return -1;
    4308             :                 }
    4309             :         }
    4310           0 :         return 0;
    4311             : }
    4312             : 
    4313           0 : static PyObject *py_srvsvc_NetFileInfoCtr_get_ctr(PyObject *obj, void *closure)
    4314             : {
    4315           0 :         struct srvsvc_NetFileInfoCtr *object = pytalloc_get_ptr(obj);
    4316           0 :         PyObject *py_ctr;
    4317           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetFileCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetFileCtr");
    4318           0 :         if (py_ctr == NULL) {
    4319           0 :                 return NULL;
    4320             :         }
    4321           0 :         return py_ctr;
    4322             : }
    4323             : 
    4324           0 : static int py_srvsvc_NetFileInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    4325             : {
    4326           0 :         struct srvsvc_NetFileInfoCtr *object = pytalloc_get_ptr(py_obj);
    4327           0 :         if (value == NULL) {
    4328           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ctr");
    4329           0 :                 return -1;
    4330             :         }
    4331             :         {
    4332           0 :                 union srvsvc_NetFileCtr *ctr_switch_0;
    4333           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");
    4334           0 :                 if (ctr_switch_0 == NULL) {
    4335           0 :                         return -1;
    4336             :                 }
    4337           0 :                 object->ctr = *ctr_switch_0;
    4338             :         }
    4339           0 :         return 0;
    4340             : }
    4341             : 
    4342             : static PyGetSetDef py_srvsvc_NetFileInfoCtr_getsetters[] = {
    4343             :         {
    4344             :                 .name = discard_const_p(char, "level"),
    4345             :                 .get = py_srvsvc_NetFileInfoCtr_get_level,
    4346             :                 .set = py_srvsvc_NetFileInfoCtr_set_level,
    4347             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4348             :         },
    4349             :         {
    4350             :                 .name = discard_const_p(char, "ctr"),
    4351             :                 .get = py_srvsvc_NetFileInfoCtr_get_ctr,
    4352             :                 .set = py_srvsvc_NetFileInfoCtr_set_ctr,
    4353             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetFileCtr")
    4354             :         },
    4355             :         { .name = NULL }
    4356             : };
    4357             : 
    4358           0 : static PyObject *py_srvsvc_NetFileInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4359             : {
    4360           0 :         return pytalloc_new(struct srvsvc_NetFileInfoCtr, type);
    4361             : }
    4362             : 
    4363             : 
    4364             : static PyTypeObject srvsvc_NetFileInfoCtr_Type = {
    4365             :         PyVarObject_HEAD_INIT(NULL, 0)
    4366             :         .tp_name = "srvsvc.NetFileInfoCtr",
    4367             :         .tp_getset = py_srvsvc_NetFileInfoCtr_getsetters,
    4368             :         .tp_methods = NULL,
    4369             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4370             :         .tp_new = py_srvsvc_NetFileInfoCtr_new,
    4371             : };
    4372             : 
    4373             : 
    4374           0 : static PyObject *py_srvsvc_NetSessInfo0_get_client(PyObject *obj, void *closure)
    4375             : {
    4376           0 :         struct srvsvc_NetSessInfo0 *object = pytalloc_get_ptr(obj);
    4377           0 :         PyObject *py_client;
    4378           0 :         if (object->client == NULL) {
    4379           0 :                 Py_RETURN_NONE;
    4380             :         }
    4381           0 :         if (object->client == NULL) {
    4382           0 :                 py_client = Py_None;
    4383           0 :                 Py_INCREF(py_client);
    4384             :         } else {
    4385           0 :                 if (object->client == NULL) {
    4386           0 :                         py_client = Py_None;
    4387           0 :                         Py_INCREF(py_client);
    4388             :                 } else {
    4389           0 :                         py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
    4390             :                 }
    4391             :         }
    4392           0 :         return py_client;
    4393             : }
    4394             : 
    4395           0 : static int py_srvsvc_NetSessInfo0_set_client(PyObject *py_obj, PyObject *value, void *closure)
    4396             : {
    4397           0 :         struct srvsvc_NetSessInfo0 *object = pytalloc_get_ptr(py_obj);
    4398           0 :         if (value == NULL) {
    4399           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->client");
    4400           0 :                 return -1;
    4401             :         }
    4402           0 :         if (value == Py_None) {
    4403           0 :                 object->client = NULL;
    4404             :         } else {
    4405           0 :                 object->client = NULL;
    4406             :                 {
    4407           0 :                         const char *test_str;
    4408           0 :                         const char *talloc_str;
    4409           0 :                         PyObject *unicode = NULL;
    4410           0 :                         if (PyUnicode_Check(value)) {
    4411           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    4412           0 :                                 if (unicode == NULL) {
    4413           0 :                                         return -1;
    4414             :                                 }
    4415           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    4416           0 :                         } else if (PyBytes_Check(value)) {
    4417           0 :                                 test_str = PyBytes_AS_STRING(value);
    4418             :                         } else {
    4419           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    4420           0 :                                 return -1;
    4421             :                         }
    4422           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    4423           0 :                         if (unicode != NULL) {
    4424           0 :                                 Py_DECREF(unicode);
    4425             :                         }
    4426           0 :                         if (talloc_str == NULL) {
    4427           0 :                                 PyErr_NoMemory();
    4428           0 :                                 return -1;
    4429             :                         }
    4430           0 :                         object->client = talloc_str;
    4431             :                 }
    4432             :         }
    4433           0 :         return 0;
    4434             : }
    4435             : 
    4436             : static PyGetSetDef py_srvsvc_NetSessInfo0_getsetters[] = {
    4437             :         {
    4438             :                 .name = discard_const_p(char, "client"),
    4439             :                 .get = py_srvsvc_NetSessInfo0_get_client,
    4440             :                 .set = py_srvsvc_NetSessInfo0_set_client,
    4441             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    4442             :         },
    4443             :         { .name = NULL }
    4444             : };
    4445             : 
    4446           0 : static PyObject *py_srvsvc_NetSessInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4447             : {
    4448           0 :         return pytalloc_new(struct srvsvc_NetSessInfo0, type);
    4449             : }
    4450             : 
    4451             : 
    4452             : static PyTypeObject srvsvc_NetSessInfo0_Type = {
    4453             :         PyVarObject_HEAD_INIT(NULL, 0)
    4454             :         .tp_name = "srvsvc.NetSessInfo0",
    4455             :         .tp_getset = py_srvsvc_NetSessInfo0_getsetters,
    4456             :         .tp_methods = NULL,
    4457             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4458             :         .tp_new = py_srvsvc_NetSessInfo0_new,
    4459             : };
    4460             : 
    4461             : 
    4462           0 : static PyObject *py_srvsvc_NetSessCtr0_get_count(PyObject *obj, void *closure)
    4463             : {
    4464           0 :         struct srvsvc_NetSessCtr0 *object = pytalloc_get_ptr(obj);
    4465           0 :         PyObject *py_count;
    4466           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    4467           0 :         return py_count;
    4468             : }
    4469             : 
    4470           0 : static int py_srvsvc_NetSessCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
    4471             : {
    4472           0 :         struct srvsvc_NetSessCtr0 *object = pytalloc_get_ptr(py_obj);
    4473           0 :         if (value == NULL) {
    4474           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    4475           0 :                 return -1;
    4476             :         }
    4477             :         {
    4478           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    4479           0 :                 if (PyLong_Check(value)) {
    4480           0 :                         unsigned long long test_var;
    4481           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4482           0 :                         if (PyErr_Occurred() != NULL) {
    4483           0 :                                 return -1;
    4484             :                         }
    4485           0 :                         if (test_var > uint_max) {
    4486           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4487             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4488           0 :                                 return -1;
    4489             :                         }
    4490           0 :                         object->count = test_var;
    4491             :                 } else {
    4492           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4493             :                           PyLong_Type.tp_name);
    4494           0 :                         return -1;
    4495             :                 }
    4496             :         }
    4497           0 :         return 0;
    4498             : }
    4499             : 
    4500           0 : static PyObject *py_srvsvc_NetSessCtr0_get_array(PyObject *obj, void *closure)
    4501             : {
    4502           0 :         struct srvsvc_NetSessCtr0 *object = pytalloc_get_ptr(obj);
    4503           0 :         PyObject *py_array;
    4504           0 :         if (object->array == NULL) {
    4505           0 :                 Py_RETURN_NONE;
    4506             :         }
    4507           0 :         if (object->array == NULL) {
    4508           0 :                 py_array = Py_None;
    4509           0 :                 Py_INCREF(py_array);
    4510             :         } else {
    4511           0 :                 py_array = PyList_New(object->count);
    4512           0 :                 if (py_array == NULL) {
    4513           0 :                         return NULL;
    4514             :                 }
    4515             :                 {
    4516             :                         int array_cntr_1;
    4517           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    4518           0 :                                 PyObject *py_array_1;
    4519           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo0_Type, object->array, &(object->array)[array_cntr_1]);
    4520           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    4521             :                         }
    4522             :                 }
    4523             :         }
    4524           0 :         return py_array;
    4525             : }
    4526             : 
    4527           0 : static int py_srvsvc_NetSessCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
    4528             : {
    4529           0 :         struct srvsvc_NetSessCtr0 *object = pytalloc_get_ptr(py_obj);
    4530           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    4531           0 :         if (value == NULL) {
    4532           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    4533           0 :                 return -1;
    4534             :         }
    4535           0 :         if (value == Py_None) {
    4536           0 :                 object->array = NULL;
    4537             :         } else {
    4538           0 :                 object->array = NULL;
    4539           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4540             :                 {
    4541           0 :                         int array_cntr_1;
    4542           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    4543           0 :                         if (!object->array) { return -1; }
    4544           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    4545           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    4546           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    4547           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    4548           0 :                                         return -1;
    4549             :                                 }
    4550           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    4551           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    4552           0 :                                         PyErr_NoMemory();
    4553           0 :                                         return -1;
    4554             :                                 }
    4555           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetSessInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    4556             :                         }
    4557             :                 }
    4558             :         }
    4559           0 :         return 0;
    4560             : }
    4561             : 
    4562             : static PyGetSetDef py_srvsvc_NetSessCtr0_getsetters[] = {
    4563             :         {
    4564             :                 .name = discard_const_p(char, "count"),
    4565             :                 .get = py_srvsvc_NetSessCtr0_get_count,
    4566             :                 .set = py_srvsvc_NetSessCtr0_set_count,
    4567             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4568             :         },
    4569             :         {
    4570             :                 .name = discard_const_p(char, "array"),
    4571             :                 .get = py_srvsvc_NetSessCtr0_get_array,
    4572             :                 .set = py_srvsvc_NetSessCtr0_set_array,
    4573             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfo0")
    4574             :         },
    4575             :         { .name = NULL }
    4576             : };
    4577             : 
    4578           0 : static PyObject *py_srvsvc_NetSessCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4579             : {
    4580           0 :         return pytalloc_new(struct srvsvc_NetSessCtr0, type);
    4581             : }
    4582             : 
    4583             : 
    4584             : static PyTypeObject srvsvc_NetSessCtr0_Type = {
    4585             :         PyVarObject_HEAD_INIT(NULL, 0)
    4586             :         .tp_name = "srvsvc.NetSessCtr0",
    4587             :         .tp_getset = py_srvsvc_NetSessCtr0_getsetters,
    4588             :         .tp_methods = NULL,
    4589             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4590             :         .tp_new = py_srvsvc_NetSessCtr0_new,
    4591             : };
    4592             : 
    4593             : 
    4594           0 : static PyObject *py_srvsvc_NetSessInfo1_get_client(PyObject *obj, void *closure)
    4595             : {
    4596           0 :         struct srvsvc_NetSessInfo1 *object = pytalloc_get_ptr(obj);
    4597           0 :         PyObject *py_client;
    4598           0 :         if (object->client == NULL) {
    4599           0 :                 Py_RETURN_NONE;
    4600             :         }
    4601           0 :         if (object->client == NULL) {
    4602           0 :                 py_client = Py_None;
    4603           0 :                 Py_INCREF(py_client);
    4604             :         } else {
    4605           0 :                 if (object->client == NULL) {
    4606           0 :                         py_client = Py_None;
    4607           0 :                         Py_INCREF(py_client);
    4608             :                 } else {
    4609           0 :                         py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
    4610             :                 }
    4611             :         }
    4612           0 :         return py_client;
    4613             : }
    4614             : 
    4615           0 : static int py_srvsvc_NetSessInfo1_set_client(PyObject *py_obj, PyObject *value, void *closure)
    4616             : {
    4617           0 :         struct srvsvc_NetSessInfo1 *object = pytalloc_get_ptr(py_obj);
    4618           0 :         if (value == NULL) {
    4619           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->client");
    4620           0 :                 return -1;
    4621             :         }
    4622           0 :         if (value == Py_None) {
    4623           0 :                 object->client = NULL;
    4624             :         } else {
    4625           0 :                 object->client = NULL;
    4626             :                 {
    4627           0 :                         const char *test_str;
    4628           0 :                         const char *talloc_str;
    4629           0 :                         PyObject *unicode = NULL;
    4630           0 :                         if (PyUnicode_Check(value)) {
    4631           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    4632           0 :                                 if (unicode == NULL) {
    4633           0 :                                         return -1;
    4634             :                                 }
    4635           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    4636           0 :                         } else if (PyBytes_Check(value)) {
    4637           0 :                                 test_str = PyBytes_AS_STRING(value);
    4638             :                         } else {
    4639           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    4640           0 :                                 return -1;
    4641             :                         }
    4642           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    4643           0 :                         if (unicode != NULL) {
    4644           0 :                                 Py_DECREF(unicode);
    4645             :                         }
    4646           0 :                         if (talloc_str == NULL) {
    4647           0 :                                 PyErr_NoMemory();
    4648           0 :                                 return -1;
    4649             :                         }
    4650           0 :                         object->client = talloc_str;
    4651             :                 }
    4652             :         }
    4653           0 :         return 0;
    4654             : }
    4655             : 
    4656           0 : static PyObject *py_srvsvc_NetSessInfo1_get_user(PyObject *obj, void *closure)
    4657             : {
    4658           0 :         struct srvsvc_NetSessInfo1 *object = pytalloc_get_ptr(obj);
    4659           0 :         PyObject *py_user;
    4660           0 :         if (object->user == NULL) {
    4661           0 :                 Py_RETURN_NONE;
    4662             :         }
    4663           0 :         if (object->user == NULL) {
    4664           0 :                 py_user = Py_None;
    4665           0 :                 Py_INCREF(py_user);
    4666             :         } else {
    4667           0 :                 if (object->user == NULL) {
    4668           0 :                         py_user = Py_None;
    4669           0 :                         Py_INCREF(py_user);
    4670             :                 } else {
    4671           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
    4672             :                 }
    4673             :         }
    4674           0 :         return py_user;
    4675             : }
    4676             : 
    4677           0 : static int py_srvsvc_NetSessInfo1_set_user(PyObject *py_obj, PyObject *value, void *closure)
    4678             : {
    4679           0 :         struct srvsvc_NetSessInfo1 *object = pytalloc_get_ptr(py_obj);
    4680           0 :         if (value == NULL) {
    4681           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user");
    4682           0 :                 return -1;
    4683             :         }
    4684           0 :         if (value == Py_None) {
    4685           0 :                 object->user = NULL;
    4686             :         } else {
    4687           0 :                 object->user = NULL;
    4688             :                 {
    4689           0 :                         const char *test_str;
    4690           0 :                         const char *talloc_str;
    4691           0 :                         PyObject *unicode = NULL;
    4692           0 :                         if (PyUnicode_Check(value)) {
    4693           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    4694           0 :                                 if (unicode == NULL) {
    4695           0 :                                         return -1;
    4696             :                                 }
    4697           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    4698           0 :                         } else if (PyBytes_Check(value)) {
    4699           0 :                                 test_str = PyBytes_AS_STRING(value);
    4700             :                         } else {
    4701           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    4702           0 :                                 return -1;
    4703             :                         }
    4704           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    4705           0 :                         if (unicode != NULL) {
    4706           0 :                                 Py_DECREF(unicode);
    4707             :                         }
    4708           0 :                         if (talloc_str == NULL) {
    4709           0 :                                 PyErr_NoMemory();
    4710           0 :                                 return -1;
    4711             :                         }
    4712           0 :                         object->user = talloc_str;
    4713             :                 }
    4714             :         }
    4715           0 :         return 0;
    4716             : }
    4717             : 
    4718           0 : static PyObject *py_srvsvc_NetSessInfo1_get_num_open(PyObject *obj, void *closure)
    4719             : {
    4720           0 :         struct srvsvc_NetSessInfo1 *object = pytalloc_get_ptr(obj);
    4721           0 :         PyObject *py_num_open;
    4722           0 :         py_num_open = PyLong_FromUnsignedLongLong((uint32_t)(object->num_open));
    4723           0 :         return py_num_open;
    4724             : }
    4725             : 
    4726           0 : static int py_srvsvc_NetSessInfo1_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
    4727             : {
    4728           0 :         struct srvsvc_NetSessInfo1 *object = pytalloc_get_ptr(py_obj);
    4729           0 :         if (value == NULL) {
    4730           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_open");
    4731           0 :                 return -1;
    4732             :         }
    4733             :         {
    4734           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
    4735           0 :                 if (PyLong_Check(value)) {
    4736           0 :                         unsigned long long test_var;
    4737           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4738           0 :                         if (PyErr_Occurred() != NULL) {
    4739           0 :                                 return -1;
    4740             :                         }
    4741           0 :                         if (test_var > uint_max) {
    4742           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4743             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4744           0 :                                 return -1;
    4745             :                         }
    4746           0 :                         object->num_open = test_var;
    4747             :                 } else {
    4748           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4749             :                           PyLong_Type.tp_name);
    4750           0 :                         return -1;
    4751             :                 }
    4752             :         }
    4753           0 :         return 0;
    4754             : }
    4755             : 
    4756           0 : static PyObject *py_srvsvc_NetSessInfo1_get_time(PyObject *obj, void *closure)
    4757             : {
    4758           0 :         struct srvsvc_NetSessInfo1 *object = pytalloc_get_ptr(obj);
    4759           0 :         PyObject *py_time;
    4760           0 :         py_time = PyLong_FromUnsignedLongLong((uint32_t)(object->time));
    4761           0 :         return py_time;
    4762             : }
    4763             : 
    4764           0 : static int py_srvsvc_NetSessInfo1_set_time(PyObject *py_obj, PyObject *value, void *closure)
    4765             : {
    4766           0 :         struct srvsvc_NetSessInfo1 *object = pytalloc_get_ptr(py_obj);
    4767           0 :         if (value == NULL) {
    4768           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->time");
    4769           0 :                 return -1;
    4770             :         }
    4771             :         {
    4772           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
    4773           0 :                 if (PyLong_Check(value)) {
    4774           0 :                         unsigned long long test_var;
    4775           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4776           0 :                         if (PyErr_Occurred() != NULL) {
    4777           0 :                                 return -1;
    4778             :                         }
    4779           0 :                         if (test_var > uint_max) {
    4780           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4781             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4782           0 :                                 return -1;
    4783             :                         }
    4784           0 :                         object->time = test_var;
    4785             :                 } else {
    4786           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4787             :                           PyLong_Type.tp_name);
    4788           0 :                         return -1;
    4789             :                 }
    4790             :         }
    4791           0 :         return 0;
    4792             : }
    4793             : 
    4794           0 : static PyObject *py_srvsvc_NetSessInfo1_get_idle_time(PyObject *obj, void *closure)
    4795             : {
    4796           0 :         struct srvsvc_NetSessInfo1 *object = pytalloc_get_ptr(obj);
    4797           0 :         PyObject *py_idle_time;
    4798           0 :         py_idle_time = PyLong_FromUnsignedLongLong((uint32_t)(object->idle_time));
    4799           0 :         return py_idle_time;
    4800             : }
    4801             : 
    4802           0 : static int py_srvsvc_NetSessInfo1_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
    4803             : {
    4804           0 :         struct srvsvc_NetSessInfo1 *object = pytalloc_get_ptr(py_obj);
    4805           0 :         if (value == NULL) {
    4806           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->idle_time");
    4807           0 :                 return -1;
    4808             :         }
    4809             :         {
    4810           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
    4811           0 :                 if (PyLong_Check(value)) {
    4812           0 :                         unsigned long long test_var;
    4813           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4814           0 :                         if (PyErr_Occurred() != NULL) {
    4815           0 :                                 return -1;
    4816             :                         }
    4817           0 :                         if (test_var > uint_max) {
    4818           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4819             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4820           0 :                                 return -1;
    4821             :                         }
    4822           0 :                         object->idle_time = test_var;
    4823             :                 } else {
    4824           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4825             :                           PyLong_Type.tp_name);
    4826           0 :                         return -1;
    4827             :                 }
    4828             :         }
    4829           0 :         return 0;
    4830             : }
    4831             : 
    4832           0 : static PyObject *py_srvsvc_NetSessInfo1_get_user_flags(PyObject *obj, void *closure)
    4833             : {
    4834           0 :         struct srvsvc_NetSessInfo1 *object = pytalloc_get_ptr(obj);
    4835           0 :         PyObject *py_user_flags;
    4836           0 :         py_user_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->user_flags));
    4837           0 :         return py_user_flags;
    4838             : }
    4839             : 
    4840           0 : static int py_srvsvc_NetSessInfo1_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
    4841             : {
    4842           0 :         struct srvsvc_NetSessInfo1 *object = pytalloc_get_ptr(py_obj);
    4843           0 :         if (value == NULL) {
    4844           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user_flags");
    4845           0 :                 return -1;
    4846             :         }
    4847             :         {
    4848           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
    4849           0 :                 if (PyLong_Check(value)) {
    4850           0 :                         unsigned long long test_var;
    4851           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4852           0 :                         if (PyErr_Occurred() != NULL) {
    4853           0 :                                 return -1;
    4854             :                         }
    4855           0 :                         if (test_var > uint_max) {
    4856           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4857             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4858           0 :                                 return -1;
    4859             :                         }
    4860           0 :                         object->user_flags = test_var;
    4861             :                 } else {
    4862           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4863             :                           PyLong_Type.tp_name);
    4864           0 :                         return -1;
    4865             :                 }
    4866             :         }
    4867           0 :         return 0;
    4868             : }
    4869             : 
    4870             : static PyGetSetDef py_srvsvc_NetSessInfo1_getsetters[] = {
    4871             :         {
    4872             :                 .name = discard_const_p(char, "client"),
    4873             :                 .get = py_srvsvc_NetSessInfo1_get_client,
    4874             :                 .set = py_srvsvc_NetSessInfo1_set_client,
    4875             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    4876             :         },
    4877             :         {
    4878             :                 .name = discard_const_p(char, "user"),
    4879             :                 .get = py_srvsvc_NetSessInfo1_get_user,
    4880             :                 .set = py_srvsvc_NetSessInfo1_set_user,
    4881             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    4882             :         },
    4883             :         {
    4884             :                 .name = discard_const_p(char, "num_open"),
    4885             :                 .get = py_srvsvc_NetSessInfo1_get_num_open,
    4886             :                 .set = py_srvsvc_NetSessInfo1_set_num_open,
    4887             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4888             :         },
    4889             :         {
    4890             :                 .name = discard_const_p(char, "time"),
    4891             :                 .get = py_srvsvc_NetSessInfo1_get_time,
    4892             :                 .set = py_srvsvc_NetSessInfo1_set_time,
    4893             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4894             :         },
    4895             :         {
    4896             :                 .name = discard_const_p(char, "idle_time"),
    4897             :                 .get = py_srvsvc_NetSessInfo1_get_idle_time,
    4898             :                 .set = py_srvsvc_NetSessInfo1_set_idle_time,
    4899             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4900             :         },
    4901             :         {
    4902             :                 .name = discard_const_p(char, "user_flags"),
    4903             :                 .get = py_srvsvc_NetSessInfo1_get_user_flags,
    4904             :                 .set = py_srvsvc_NetSessInfo1_set_user_flags,
    4905             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4906             :         },
    4907             :         { .name = NULL }
    4908             : };
    4909             : 
    4910           0 : static PyObject *py_srvsvc_NetSessInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4911             : {
    4912           0 :         return pytalloc_new(struct srvsvc_NetSessInfo1, type);
    4913             : }
    4914             : 
    4915             : 
    4916             : static PyTypeObject srvsvc_NetSessInfo1_Type = {
    4917             :         PyVarObject_HEAD_INIT(NULL, 0)
    4918             :         .tp_name = "srvsvc.NetSessInfo1",
    4919             :         .tp_getset = py_srvsvc_NetSessInfo1_getsetters,
    4920             :         .tp_methods = NULL,
    4921             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4922             :         .tp_new = py_srvsvc_NetSessInfo1_new,
    4923             : };
    4924             : 
    4925             : 
    4926           0 : static PyObject *py_srvsvc_NetSessCtr1_get_count(PyObject *obj, void *closure)
    4927             : {
    4928           0 :         struct srvsvc_NetSessCtr1 *object = pytalloc_get_ptr(obj);
    4929           0 :         PyObject *py_count;
    4930           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    4931           0 :         return py_count;
    4932             : }
    4933             : 
    4934           0 : static int py_srvsvc_NetSessCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
    4935             : {
    4936           0 :         struct srvsvc_NetSessCtr1 *object = pytalloc_get_ptr(py_obj);
    4937           0 :         if (value == NULL) {
    4938           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    4939           0 :                 return -1;
    4940             :         }
    4941             :         {
    4942           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    4943           0 :                 if (PyLong_Check(value)) {
    4944           0 :                         unsigned long long test_var;
    4945           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4946           0 :                         if (PyErr_Occurred() != NULL) {
    4947           0 :                                 return -1;
    4948             :                         }
    4949           0 :                         if (test_var > uint_max) {
    4950           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4951             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4952           0 :                                 return -1;
    4953             :                         }
    4954           0 :                         object->count = test_var;
    4955             :                 } else {
    4956           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4957             :                           PyLong_Type.tp_name);
    4958           0 :                         return -1;
    4959             :                 }
    4960             :         }
    4961           0 :         return 0;
    4962             : }
    4963             : 
    4964           0 : static PyObject *py_srvsvc_NetSessCtr1_get_array(PyObject *obj, void *closure)
    4965             : {
    4966           0 :         struct srvsvc_NetSessCtr1 *object = pytalloc_get_ptr(obj);
    4967           0 :         PyObject *py_array;
    4968           0 :         if (object->array == NULL) {
    4969           0 :                 Py_RETURN_NONE;
    4970             :         }
    4971           0 :         if (object->array == NULL) {
    4972           0 :                 py_array = Py_None;
    4973           0 :                 Py_INCREF(py_array);
    4974             :         } else {
    4975           0 :                 py_array = PyList_New(object->count);
    4976           0 :                 if (py_array == NULL) {
    4977           0 :                         return NULL;
    4978             :                 }
    4979             :                 {
    4980             :                         int array_cntr_1;
    4981           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    4982           0 :                                 PyObject *py_array_1;
    4983           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo1_Type, object->array, &(object->array)[array_cntr_1]);
    4984           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    4985             :                         }
    4986             :                 }
    4987             :         }
    4988           0 :         return py_array;
    4989             : }
    4990             : 
    4991           0 : static int py_srvsvc_NetSessCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
    4992             : {
    4993           0 :         struct srvsvc_NetSessCtr1 *object = pytalloc_get_ptr(py_obj);
    4994           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    4995           0 :         if (value == NULL) {
    4996           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    4997           0 :                 return -1;
    4998             :         }
    4999           0 :         if (value == Py_None) {
    5000           0 :                 object->array = NULL;
    5001             :         } else {
    5002           0 :                 object->array = NULL;
    5003           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5004             :                 {
    5005           0 :                         int array_cntr_1;
    5006           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    5007           0 :                         if (!object->array) { return -1; }
    5008           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    5009           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    5010           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    5011           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    5012           0 :                                         return -1;
    5013             :                                 }
    5014           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    5015           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    5016           0 :                                         PyErr_NoMemory();
    5017           0 :                                         return -1;
    5018             :                                 }
    5019           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    5020             :                         }
    5021             :                 }
    5022             :         }
    5023           0 :         return 0;
    5024             : }
    5025             : 
    5026             : static PyGetSetDef py_srvsvc_NetSessCtr1_getsetters[] = {
    5027             :         {
    5028             :                 .name = discard_const_p(char, "count"),
    5029             :                 .get = py_srvsvc_NetSessCtr1_get_count,
    5030             :                 .set = py_srvsvc_NetSessCtr1_set_count,
    5031             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5032             :         },
    5033             :         {
    5034             :                 .name = discard_const_p(char, "array"),
    5035             :                 .get = py_srvsvc_NetSessCtr1_get_array,
    5036             :                 .set = py_srvsvc_NetSessCtr1_set_array,
    5037             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfo1")
    5038             :         },
    5039             :         { .name = NULL }
    5040             : };
    5041             : 
    5042           0 : static PyObject *py_srvsvc_NetSessCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5043             : {
    5044           0 :         return pytalloc_new(struct srvsvc_NetSessCtr1, type);
    5045             : }
    5046             : 
    5047             : 
    5048             : static PyTypeObject srvsvc_NetSessCtr1_Type = {
    5049             :         PyVarObject_HEAD_INIT(NULL, 0)
    5050             :         .tp_name = "srvsvc.NetSessCtr1",
    5051             :         .tp_getset = py_srvsvc_NetSessCtr1_getsetters,
    5052             :         .tp_methods = NULL,
    5053             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5054             :         .tp_new = py_srvsvc_NetSessCtr1_new,
    5055             : };
    5056             : 
    5057             : 
    5058           0 : static PyObject *py_srvsvc_NetSessInfo2_get_client(PyObject *obj, void *closure)
    5059             : {
    5060           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(obj);
    5061           0 :         PyObject *py_client;
    5062           0 :         if (object->client == NULL) {
    5063           0 :                 Py_RETURN_NONE;
    5064             :         }
    5065           0 :         if (object->client == NULL) {
    5066           0 :                 py_client = Py_None;
    5067           0 :                 Py_INCREF(py_client);
    5068             :         } else {
    5069           0 :                 if (object->client == NULL) {
    5070           0 :                         py_client = Py_None;
    5071           0 :                         Py_INCREF(py_client);
    5072             :                 } else {
    5073           0 :                         py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
    5074             :                 }
    5075             :         }
    5076           0 :         return py_client;
    5077             : }
    5078             : 
    5079           0 : static int py_srvsvc_NetSessInfo2_set_client(PyObject *py_obj, PyObject *value, void *closure)
    5080             : {
    5081           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(py_obj);
    5082           0 :         if (value == NULL) {
    5083           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->client");
    5084           0 :                 return -1;
    5085             :         }
    5086           0 :         if (value == Py_None) {
    5087           0 :                 object->client = NULL;
    5088             :         } else {
    5089           0 :                 object->client = NULL;
    5090             :                 {
    5091           0 :                         const char *test_str;
    5092           0 :                         const char *talloc_str;
    5093           0 :                         PyObject *unicode = NULL;
    5094           0 :                         if (PyUnicode_Check(value)) {
    5095           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    5096           0 :                                 if (unicode == NULL) {
    5097           0 :                                         return -1;
    5098             :                                 }
    5099           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    5100           0 :                         } else if (PyBytes_Check(value)) {
    5101           0 :                                 test_str = PyBytes_AS_STRING(value);
    5102             :                         } else {
    5103           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    5104           0 :                                 return -1;
    5105             :                         }
    5106           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    5107           0 :                         if (unicode != NULL) {
    5108           0 :                                 Py_DECREF(unicode);
    5109             :                         }
    5110           0 :                         if (talloc_str == NULL) {
    5111           0 :                                 PyErr_NoMemory();
    5112           0 :                                 return -1;
    5113             :                         }
    5114           0 :                         object->client = talloc_str;
    5115             :                 }
    5116             :         }
    5117           0 :         return 0;
    5118             : }
    5119             : 
    5120           0 : static PyObject *py_srvsvc_NetSessInfo2_get_user(PyObject *obj, void *closure)
    5121             : {
    5122           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(obj);
    5123           0 :         PyObject *py_user;
    5124           0 :         if (object->user == NULL) {
    5125           0 :                 Py_RETURN_NONE;
    5126             :         }
    5127           0 :         if (object->user == NULL) {
    5128           0 :                 py_user = Py_None;
    5129           0 :                 Py_INCREF(py_user);
    5130             :         } else {
    5131           0 :                 if (object->user == NULL) {
    5132           0 :                         py_user = Py_None;
    5133           0 :                         Py_INCREF(py_user);
    5134             :                 } else {
    5135           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
    5136             :                 }
    5137             :         }
    5138           0 :         return py_user;
    5139             : }
    5140             : 
    5141           0 : static int py_srvsvc_NetSessInfo2_set_user(PyObject *py_obj, PyObject *value, void *closure)
    5142             : {
    5143           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(py_obj);
    5144           0 :         if (value == NULL) {
    5145           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user");
    5146           0 :                 return -1;
    5147             :         }
    5148           0 :         if (value == Py_None) {
    5149           0 :                 object->user = NULL;
    5150             :         } else {
    5151           0 :                 object->user = NULL;
    5152             :                 {
    5153           0 :                         const char *test_str;
    5154           0 :                         const char *talloc_str;
    5155           0 :                         PyObject *unicode = NULL;
    5156           0 :                         if (PyUnicode_Check(value)) {
    5157           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    5158           0 :                                 if (unicode == NULL) {
    5159           0 :                                         return -1;
    5160             :                                 }
    5161           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    5162           0 :                         } else if (PyBytes_Check(value)) {
    5163           0 :                                 test_str = PyBytes_AS_STRING(value);
    5164             :                         } else {
    5165           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    5166           0 :                                 return -1;
    5167             :                         }
    5168           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    5169           0 :                         if (unicode != NULL) {
    5170           0 :                                 Py_DECREF(unicode);
    5171             :                         }
    5172           0 :                         if (talloc_str == NULL) {
    5173           0 :                                 PyErr_NoMemory();
    5174           0 :                                 return -1;
    5175             :                         }
    5176           0 :                         object->user = talloc_str;
    5177             :                 }
    5178             :         }
    5179           0 :         return 0;
    5180             : }
    5181             : 
    5182           0 : static PyObject *py_srvsvc_NetSessInfo2_get_num_open(PyObject *obj, void *closure)
    5183             : {
    5184           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(obj);
    5185           0 :         PyObject *py_num_open;
    5186           0 :         py_num_open = PyLong_FromUnsignedLongLong((uint32_t)(object->num_open));
    5187           0 :         return py_num_open;
    5188             : }
    5189             : 
    5190           0 : static int py_srvsvc_NetSessInfo2_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
    5191             : {
    5192           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(py_obj);
    5193           0 :         if (value == NULL) {
    5194           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_open");
    5195           0 :                 return -1;
    5196             :         }
    5197             :         {
    5198           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
    5199           0 :                 if (PyLong_Check(value)) {
    5200           0 :                         unsigned long long test_var;
    5201           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5202           0 :                         if (PyErr_Occurred() != NULL) {
    5203           0 :                                 return -1;
    5204             :                         }
    5205           0 :                         if (test_var > uint_max) {
    5206           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5207             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5208           0 :                                 return -1;
    5209             :                         }
    5210           0 :                         object->num_open = test_var;
    5211             :                 } else {
    5212           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5213             :                           PyLong_Type.tp_name);
    5214           0 :                         return -1;
    5215             :                 }
    5216             :         }
    5217           0 :         return 0;
    5218             : }
    5219             : 
    5220           0 : static PyObject *py_srvsvc_NetSessInfo2_get_time(PyObject *obj, void *closure)
    5221             : {
    5222           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(obj);
    5223           0 :         PyObject *py_time;
    5224           0 :         py_time = PyLong_FromUnsignedLongLong((uint32_t)(object->time));
    5225           0 :         return py_time;
    5226             : }
    5227             : 
    5228           0 : static int py_srvsvc_NetSessInfo2_set_time(PyObject *py_obj, PyObject *value, void *closure)
    5229             : {
    5230           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(py_obj);
    5231           0 :         if (value == NULL) {
    5232           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->time");
    5233           0 :                 return -1;
    5234             :         }
    5235             :         {
    5236           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
    5237           0 :                 if (PyLong_Check(value)) {
    5238           0 :                         unsigned long long test_var;
    5239           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5240           0 :                         if (PyErr_Occurred() != NULL) {
    5241           0 :                                 return -1;
    5242             :                         }
    5243           0 :                         if (test_var > uint_max) {
    5244           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5245             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5246           0 :                                 return -1;
    5247             :                         }
    5248           0 :                         object->time = test_var;
    5249             :                 } else {
    5250           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5251             :                           PyLong_Type.tp_name);
    5252           0 :                         return -1;
    5253             :                 }
    5254             :         }
    5255           0 :         return 0;
    5256             : }
    5257             : 
    5258           0 : static PyObject *py_srvsvc_NetSessInfo2_get_idle_time(PyObject *obj, void *closure)
    5259             : {
    5260           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(obj);
    5261           0 :         PyObject *py_idle_time;
    5262           0 :         py_idle_time = PyLong_FromUnsignedLongLong((uint32_t)(object->idle_time));
    5263           0 :         return py_idle_time;
    5264             : }
    5265             : 
    5266           0 : static int py_srvsvc_NetSessInfo2_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
    5267             : {
    5268           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(py_obj);
    5269           0 :         if (value == NULL) {
    5270           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->idle_time");
    5271           0 :                 return -1;
    5272             :         }
    5273             :         {
    5274           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
    5275           0 :                 if (PyLong_Check(value)) {
    5276           0 :                         unsigned long long test_var;
    5277           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5278           0 :                         if (PyErr_Occurred() != NULL) {
    5279           0 :                                 return -1;
    5280             :                         }
    5281           0 :                         if (test_var > uint_max) {
    5282           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5283             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5284           0 :                                 return -1;
    5285             :                         }
    5286           0 :                         object->idle_time = test_var;
    5287             :                 } else {
    5288           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5289             :                           PyLong_Type.tp_name);
    5290           0 :                         return -1;
    5291             :                 }
    5292             :         }
    5293           0 :         return 0;
    5294             : }
    5295             : 
    5296           0 : static PyObject *py_srvsvc_NetSessInfo2_get_user_flags(PyObject *obj, void *closure)
    5297             : {
    5298           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(obj);
    5299           0 :         PyObject *py_user_flags;
    5300           0 :         py_user_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->user_flags));
    5301           0 :         return py_user_flags;
    5302             : }
    5303             : 
    5304           0 : static int py_srvsvc_NetSessInfo2_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
    5305             : {
    5306           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(py_obj);
    5307           0 :         if (value == NULL) {
    5308           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user_flags");
    5309           0 :                 return -1;
    5310             :         }
    5311             :         {
    5312           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
    5313           0 :                 if (PyLong_Check(value)) {
    5314           0 :                         unsigned long long test_var;
    5315           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5316           0 :                         if (PyErr_Occurred() != NULL) {
    5317           0 :                                 return -1;
    5318             :                         }
    5319           0 :                         if (test_var > uint_max) {
    5320           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5321             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5322           0 :                                 return -1;
    5323             :                         }
    5324           0 :                         object->user_flags = test_var;
    5325             :                 } else {
    5326           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5327             :                           PyLong_Type.tp_name);
    5328           0 :                         return -1;
    5329             :                 }
    5330             :         }
    5331           0 :         return 0;
    5332             : }
    5333             : 
    5334           0 : static PyObject *py_srvsvc_NetSessInfo2_get_client_type(PyObject *obj, void *closure)
    5335             : {
    5336           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(obj);
    5337           0 :         PyObject *py_client_type;
    5338           0 :         if (object->client_type == NULL) {
    5339           0 :                 Py_RETURN_NONE;
    5340             :         }
    5341           0 :         if (object->client_type == NULL) {
    5342           0 :                 py_client_type = Py_None;
    5343           0 :                 Py_INCREF(py_client_type);
    5344             :         } else {
    5345           0 :                 if (object->client_type == NULL) {
    5346           0 :                         py_client_type = Py_None;
    5347           0 :                         Py_INCREF(py_client_type);
    5348             :                 } else {
    5349           0 :                         py_client_type = PyUnicode_Decode(object->client_type, strlen(object->client_type), "utf-8", "ignore");
    5350             :                 }
    5351             :         }
    5352           0 :         return py_client_type;
    5353             : }
    5354             : 
    5355           0 : static int py_srvsvc_NetSessInfo2_set_client_type(PyObject *py_obj, PyObject *value, void *closure)
    5356             : {
    5357           0 :         struct srvsvc_NetSessInfo2 *object = pytalloc_get_ptr(py_obj);
    5358           0 :         if (value == NULL) {
    5359           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->client_type");
    5360           0 :                 return -1;
    5361             :         }
    5362           0 :         if (value == Py_None) {
    5363           0 :                 object->client_type = NULL;
    5364             :         } else {
    5365           0 :                 object->client_type = NULL;
    5366             :                 {
    5367           0 :                         const char *test_str;
    5368           0 :                         const char *talloc_str;
    5369           0 :                         PyObject *unicode = NULL;
    5370           0 :                         if (PyUnicode_Check(value)) {
    5371           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    5372           0 :                                 if (unicode == NULL) {
    5373           0 :                                         return -1;
    5374             :                                 }
    5375           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    5376           0 :                         } else if (PyBytes_Check(value)) {
    5377           0 :                                 test_str = PyBytes_AS_STRING(value);
    5378             :                         } else {
    5379           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    5380           0 :                                 return -1;
    5381             :                         }
    5382           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    5383           0 :                         if (unicode != NULL) {
    5384           0 :                                 Py_DECREF(unicode);
    5385             :                         }
    5386           0 :                         if (talloc_str == NULL) {
    5387           0 :                                 PyErr_NoMemory();
    5388           0 :                                 return -1;
    5389             :                         }
    5390           0 :                         object->client_type = talloc_str;
    5391             :                 }
    5392             :         }
    5393           0 :         return 0;
    5394             : }
    5395             : 
    5396             : static PyGetSetDef py_srvsvc_NetSessInfo2_getsetters[] = {
    5397             :         {
    5398             :                 .name = discard_const_p(char, "client"),
    5399             :                 .get = py_srvsvc_NetSessInfo2_get_client,
    5400             :                 .set = py_srvsvc_NetSessInfo2_set_client,
    5401             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    5402             :         },
    5403             :         {
    5404             :                 .name = discard_const_p(char, "user"),
    5405             :                 .get = py_srvsvc_NetSessInfo2_get_user,
    5406             :                 .set = py_srvsvc_NetSessInfo2_set_user,
    5407             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    5408             :         },
    5409             :         {
    5410             :                 .name = discard_const_p(char, "num_open"),
    5411             :                 .get = py_srvsvc_NetSessInfo2_get_num_open,
    5412             :                 .set = py_srvsvc_NetSessInfo2_set_num_open,
    5413             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5414             :         },
    5415             :         {
    5416             :                 .name = discard_const_p(char, "time"),
    5417             :                 .get = py_srvsvc_NetSessInfo2_get_time,
    5418             :                 .set = py_srvsvc_NetSessInfo2_set_time,
    5419             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5420             :         },
    5421             :         {
    5422             :                 .name = discard_const_p(char, "idle_time"),
    5423             :                 .get = py_srvsvc_NetSessInfo2_get_idle_time,
    5424             :                 .set = py_srvsvc_NetSessInfo2_set_idle_time,
    5425             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5426             :         },
    5427             :         {
    5428             :                 .name = discard_const_p(char, "user_flags"),
    5429             :                 .get = py_srvsvc_NetSessInfo2_get_user_flags,
    5430             :                 .set = py_srvsvc_NetSessInfo2_set_user_flags,
    5431             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5432             :         },
    5433             :         {
    5434             :                 .name = discard_const_p(char, "client_type"),
    5435             :                 .get = py_srvsvc_NetSessInfo2_get_client_type,
    5436             :                 .set = py_srvsvc_NetSessInfo2_set_client_type,
    5437             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    5438             :         },
    5439             :         { .name = NULL }
    5440             : };
    5441             : 
    5442           0 : static PyObject *py_srvsvc_NetSessInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5443             : {
    5444           0 :         return pytalloc_new(struct srvsvc_NetSessInfo2, type);
    5445             : }
    5446             : 
    5447             : 
    5448             : static PyTypeObject srvsvc_NetSessInfo2_Type = {
    5449             :         PyVarObject_HEAD_INIT(NULL, 0)
    5450             :         .tp_name = "srvsvc.NetSessInfo2",
    5451             :         .tp_getset = py_srvsvc_NetSessInfo2_getsetters,
    5452             :         .tp_methods = NULL,
    5453             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5454             :         .tp_new = py_srvsvc_NetSessInfo2_new,
    5455             : };
    5456             : 
    5457             : 
    5458           0 : static PyObject *py_srvsvc_NetSessCtr2_get_count(PyObject *obj, void *closure)
    5459             : {
    5460           0 :         struct srvsvc_NetSessCtr2 *object = pytalloc_get_ptr(obj);
    5461           0 :         PyObject *py_count;
    5462           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    5463           0 :         return py_count;
    5464             : }
    5465             : 
    5466           0 : static int py_srvsvc_NetSessCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
    5467             : {
    5468           0 :         struct srvsvc_NetSessCtr2 *object = pytalloc_get_ptr(py_obj);
    5469           0 :         if (value == NULL) {
    5470           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    5471           0 :                 return -1;
    5472             :         }
    5473             :         {
    5474           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    5475           0 :                 if (PyLong_Check(value)) {
    5476           0 :                         unsigned long long test_var;
    5477           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5478           0 :                         if (PyErr_Occurred() != NULL) {
    5479           0 :                                 return -1;
    5480             :                         }
    5481           0 :                         if (test_var > uint_max) {
    5482           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5483             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5484           0 :                                 return -1;
    5485             :                         }
    5486           0 :                         object->count = test_var;
    5487             :                 } else {
    5488           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5489             :                           PyLong_Type.tp_name);
    5490           0 :                         return -1;
    5491             :                 }
    5492             :         }
    5493           0 :         return 0;
    5494             : }
    5495             : 
    5496           0 : static PyObject *py_srvsvc_NetSessCtr2_get_array(PyObject *obj, void *closure)
    5497             : {
    5498           0 :         struct srvsvc_NetSessCtr2 *object = pytalloc_get_ptr(obj);
    5499           0 :         PyObject *py_array;
    5500           0 :         if (object->array == NULL) {
    5501           0 :                 Py_RETURN_NONE;
    5502             :         }
    5503           0 :         if (object->array == NULL) {
    5504           0 :                 py_array = Py_None;
    5505           0 :                 Py_INCREF(py_array);
    5506             :         } else {
    5507           0 :                 py_array = PyList_New(object->count);
    5508           0 :                 if (py_array == NULL) {
    5509           0 :                         return NULL;
    5510             :                 }
    5511             :                 {
    5512             :                         int array_cntr_1;
    5513           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    5514           0 :                                 PyObject *py_array_1;
    5515           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo2_Type, object->array, &(object->array)[array_cntr_1]);
    5516           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    5517             :                         }
    5518             :                 }
    5519             :         }
    5520           0 :         return py_array;
    5521             : }
    5522             : 
    5523           0 : static int py_srvsvc_NetSessCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
    5524             : {
    5525           0 :         struct srvsvc_NetSessCtr2 *object = pytalloc_get_ptr(py_obj);
    5526           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    5527           0 :         if (value == NULL) {
    5528           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    5529           0 :                 return -1;
    5530             :         }
    5531           0 :         if (value == Py_None) {
    5532           0 :                 object->array = NULL;
    5533             :         } else {
    5534           0 :                 object->array = NULL;
    5535           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5536             :                 {
    5537           0 :                         int array_cntr_1;
    5538           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    5539           0 :                         if (!object->array) { return -1; }
    5540           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    5541           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    5542           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    5543           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    5544           0 :                                         return -1;
    5545             :                                 }
    5546           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    5547           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    5548           0 :                                         PyErr_NoMemory();
    5549           0 :                                         return -1;
    5550             :                                 }
    5551           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    5552             :                         }
    5553             :                 }
    5554             :         }
    5555           0 :         return 0;
    5556             : }
    5557             : 
    5558             : static PyGetSetDef py_srvsvc_NetSessCtr2_getsetters[] = {
    5559             :         {
    5560             :                 .name = discard_const_p(char, "count"),
    5561             :                 .get = py_srvsvc_NetSessCtr2_get_count,
    5562             :                 .set = py_srvsvc_NetSessCtr2_set_count,
    5563             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5564             :         },
    5565             :         {
    5566             :                 .name = discard_const_p(char, "array"),
    5567             :                 .get = py_srvsvc_NetSessCtr2_get_array,
    5568             :                 .set = py_srvsvc_NetSessCtr2_set_array,
    5569             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfo2")
    5570             :         },
    5571             :         { .name = NULL }
    5572             : };
    5573             : 
    5574           0 : static PyObject *py_srvsvc_NetSessCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5575             : {
    5576           0 :         return pytalloc_new(struct srvsvc_NetSessCtr2, type);
    5577             : }
    5578             : 
    5579             : 
    5580             : static PyTypeObject srvsvc_NetSessCtr2_Type = {
    5581             :         PyVarObject_HEAD_INIT(NULL, 0)
    5582             :         .tp_name = "srvsvc.NetSessCtr2",
    5583             :         .tp_getset = py_srvsvc_NetSessCtr2_getsetters,
    5584             :         .tp_methods = NULL,
    5585             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5586             :         .tp_new = py_srvsvc_NetSessCtr2_new,
    5587             : };
    5588             : 
    5589             : 
    5590           0 : static PyObject *py_srvsvc_NetSessInfo10_get_client(PyObject *obj, void *closure)
    5591             : {
    5592           0 :         struct srvsvc_NetSessInfo10 *object = pytalloc_get_ptr(obj);
    5593           0 :         PyObject *py_client;
    5594           0 :         if (object->client == NULL) {
    5595           0 :                 Py_RETURN_NONE;
    5596             :         }
    5597           0 :         if (object->client == NULL) {
    5598           0 :                 py_client = Py_None;
    5599           0 :                 Py_INCREF(py_client);
    5600             :         } else {
    5601           0 :                 if (object->client == NULL) {
    5602           0 :                         py_client = Py_None;
    5603           0 :                         Py_INCREF(py_client);
    5604             :                 } else {
    5605           0 :                         py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
    5606             :                 }
    5607             :         }
    5608           0 :         return py_client;
    5609             : }
    5610             : 
    5611           0 : static int py_srvsvc_NetSessInfo10_set_client(PyObject *py_obj, PyObject *value, void *closure)
    5612             : {
    5613           0 :         struct srvsvc_NetSessInfo10 *object = pytalloc_get_ptr(py_obj);
    5614           0 :         if (value == NULL) {
    5615           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->client");
    5616           0 :                 return -1;
    5617             :         }
    5618           0 :         if (value == Py_None) {
    5619           0 :                 object->client = NULL;
    5620             :         } else {
    5621           0 :                 object->client = NULL;
    5622             :                 {
    5623           0 :                         const char *test_str;
    5624           0 :                         const char *talloc_str;
    5625           0 :                         PyObject *unicode = NULL;
    5626           0 :                         if (PyUnicode_Check(value)) {
    5627           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    5628           0 :                                 if (unicode == NULL) {
    5629           0 :                                         return -1;
    5630             :                                 }
    5631           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    5632           0 :                         } else if (PyBytes_Check(value)) {
    5633           0 :                                 test_str = PyBytes_AS_STRING(value);
    5634             :                         } else {
    5635           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    5636           0 :                                 return -1;
    5637             :                         }
    5638           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    5639           0 :                         if (unicode != NULL) {
    5640           0 :                                 Py_DECREF(unicode);
    5641             :                         }
    5642           0 :                         if (talloc_str == NULL) {
    5643           0 :                                 PyErr_NoMemory();
    5644           0 :                                 return -1;
    5645             :                         }
    5646           0 :                         object->client = talloc_str;
    5647             :                 }
    5648             :         }
    5649           0 :         return 0;
    5650             : }
    5651             : 
    5652           0 : static PyObject *py_srvsvc_NetSessInfo10_get_user(PyObject *obj, void *closure)
    5653             : {
    5654           0 :         struct srvsvc_NetSessInfo10 *object = pytalloc_get_ptr(obj);
    5655           0 :         PyObject *py_user;
    5656           0 :         if (object->user == NULL) {
    5657           0 :                 Py_RETURN_NONE;
    5658             :         }
    5659           0 :         if (object->user == NULL) {
    5660           0 :                 py_user = Py_None;
    5661           0 :                 Py_INCREF(py_user);
    5662             :         } else {
    5663           0 :                 if (object->user == NULL) {
    5664           0 :                         py_user = Py_None;
    5665           0 :                         Py_INCREF(py_user);
    5666             :                 } else {
    5667           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
    5668             :                 }
    5669             :         }
    5670           0 :         return py_user;
    5671             : }
    5672             : 
    5673           0 : static int py_srvsvc_NetSessInfo10_set_user(PyObject *py_obj, PyObject *value, void *closure)
    5674             : {
    5675           0 :         struct srvsvc_NetSessInfo10 *object = pytalloc_get_ptr(py_obj);
    5676           0 :         if (value == NULL) {
    5677           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user");
    5678           0 :                 return -1;
    5679             :         }
    5680           0 :         if (value == Py_None) {
    5681           0 :                 object->user = NULL;
    5682             :         } else {
    5683           0 :                 object->user = NULL;
    5684             :                 {
    5685           0 :                         const char *test_str;
    5686           0 :                         const char *talloc_str;
    5687           0 :                         PyObject *unicode = NULL;
    5688           0 :                         if (PyUnicode_Check(value)) {
    5689           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    5690           0 :                                 if (unicode == NULL) {
    5691           0 :                                         return -1;
    5692             :                                 }
    5693           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    5694           0 :                         } else if (PyBytes_Check(value)) {
    5695           0 :                                 test_str = PyBytes_AS_STRING(value);
    5696             :                         } else {
    5697           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    5698           0 :                                 return -1;
    5699             :                         }
    5700           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    5701           0 :                         if (unicode != NULL) {
    5702           0 :                                 Py_DECREF(unicode);
    5703             :                         }
    5704           0 :                         if (talloc_str == NULL) {
    5705           0 :                                 PyErr_NoMemory();
    5706           0 :                                 return -1;
    5707             :                         }
    5708           0 :                         object->user = talloc_str;
    5709             :                 }
    5710             :         }
    5711           0 :         return 0;
    5712             : }
    5713             : 
    5714           0 : static PyObject *py_srvsvc_NetSessInfo10_get_time(PyObject *obj, void *closure)
    5715             : {
    5716           0 :         struct srvsvc_NetSessInfo10 *object = pytalloc_get_ptr(obj);
    5717           0 :         PyObject *py_time;
    5718           0 :         py_time = PyLong_FromUnsignedLongLong((uint32_t)(object->time));
    5719           0 :         return py_time;
    5720             : }
    5721             : 
    5722           0 : static int py_srvsvc_NetSessInfo10_set_time(PyObject *py_obj, PyObject *value, void *closure)
    5723             : {
    5724           0 :         struct srvsvc_NetSessInfo10 *object = pytalloc_get_ptr(py_obj);
    5725           0 :         if (value == NULL) {
    5726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->time");
    5727           0 :                 return -1;
    5728             :         }
    5729             :         {
    5730           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
    5731           0 :                 if (PyLong_Check(value)) {
    5732           0 :                         unsigned long long test_var;
    5733           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5734           0 :                         if (PyErr_Occurred() != NULL) {
    5735           0 :                                 return -1;
    5736             :                         }
    5737           0 :                         if (test_var > uint_max) {
    5738           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5739             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5740           0 :                                 return -1;
    5741             :                         }
    5742           0 :                         object->time = test_var;
    5743             :                 } else {
    5744           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5745             :                           PyLong_Type.tp_name);
    5746           0 :                         return -1;
    5747             :                 }
    5748             :         }
    5749           0 :         return 0;
    5750             : }
    5751             : 
    5752           0 : static PyObject *py_srvsvc_NetSessInfo10_get_idle_time(PyObject *obj, void *closure)
    5753             : {
    5754           0 :         struct srvsvc_NetSessInfo10 *object = pytalloc_get_ptr(obj);
    5755           0 :         PyObject *py_idle_time;
    5756           0 :         py_idle_time = PyLong_FromUnsignedLongLong((uint32_t)(object->idle_time));
    5757           0 :         return py_idle_time;
    5758             : }
    5759             : 
    5760           0 : static int py_srvsvc_NetSessInfo10_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
    5761             : {
    5762           0 :         struct srvsvc_NetSessInfo10 *object = pytalloc_get_ptr(py_obj);
    5763           0 :         if (value == NULL) {
    5764           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->idle_time");
    5765           0 :                 return -1;
    5766             :         }
    5767             :         {
    5768           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
    5769           0 :                 if (PyLong_Check(value)) {
    5770           0 :                         unsigned long long test_var;
    5771           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5772           0 :                         if (PyErr_Occurred() != NULL) {
    5773           0 :                                 return -1;
    5774             :                         }
    5775           0 :                         if (test_var > uint_max) {
    5776           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5777             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5778           0 :                                 return -1;
    5779             :                         }
    5780           0 :                         object->idle_time = test_var;
    5781             :                 } else {
    5782           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5783             :                           PyLong_Type.tp_name);
    5784           0 :                         return -1;
    5785             :                 }
    5786             :         }
    5787           0 :         return 0;
    5788             : }
    5789             : 
    5790             : static PyGetSetDef py_srvsvc_NetSessInfo10_getsetters[] = {
    5791             :         {
    5792             :                 .name = discard_const_p(char, "client"),
    5793             :                 .get = py_srvsvc_NetSessInfo10_get_client,
    5794             :                 .set = py_srvsvc_NetSessInfo10_set_client,
    5795             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    5796             :         },
    5797             :         {
    5798             :                 .name = discard_const_p(char, "user"),
    5799             :                 .get = py_srvsvc_NetSessInfo10_get_user,
    5800             :                 .set = py_srvsvc_NetSessInfo10_set_user,
    5801             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    5802             :         },
    5803             :         {
    5804             :                 .name = discard_const_p(char, "time"),
    5805             :                 .get = py_srvsvc_NetSessInfo10_get_time,
    5806             :                 .set = py_srvsvc_NetSessInfo10_set_time,
    5807             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5808             :         },
    5809             :         {
    5810             :                 .name = discard_const_p(char, "idle_time"),
    5811             :                 .get = py_srvsvc_NetSessInfo10_get_idle_time,
    5812             :                 .set = py_srvsvc_NetSessInfo10_set_idle_time,
    5813             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5814             :         },
    5815             :         { .name = NULL }
    5816             : };
    5817             : 
    5818           0 : static PyObject *py_srvsvc_NetSessInfo10_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5819             : {
    5820           0 :         return pytalloc_new(struct srvsvc_NetSessInfo10, type);
    5821             : }
    5822             : 
    5823             : 
    5824             : static PyTypeObject srvsvc_NetSessInfo10_Type = {
    5825             :         PyVarObject_HEAD_INIT(NULL, 0)
    5826             :         .tp_name = "srvsvc.NetSessInfo10",
    5827             :         .tp_getset = py_srvsvc_NetSessInfo10_getsetters,
    5828             :         .tp_methods = NULL,
    5829             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5830             :         .tp_new = py_srvsvc_NetSessInfo10_new,
    5831             : };
    5832             : 
    5833             : 
    5834           0 : static PyObject *py_srvsvc_NetSessCtr10_get_count(PyObject *obj, void *closure)
    5835             : {
    5836           0 :         struct srvsvc_NetSessCtr10 *object = pytalloc_get_ptr(obj);
    5837           0 :         PyObject *py_count;
    5838           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    5839           0 :         return py_count;
    5840             : }
    5841             : 
    5842           0 : static int py_srvsvc_NetSessCtr10_set_count(PyObject *py_obj, PyObject *value, void *closure)
    5843             : {
    5844           0 :         struct srvsvc_NetSessCtr10 *object = pytalloc_get_ptr(py_obj);
    5845           0 :         if (value == NULL) {
    5846           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    5847           0 :                 return -1;
    5848             :         }
    5849             :         {
    5850           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    5851           0 :                 if (PyLong_Check(value)) {
    5852           0 :                         unsigned long long test_var;
    5853           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5854           0 :                         if (PyErr_Occurred() != NULL) {
    5855           0 :                                 return -1;
    5856             :                         }
    5857           0 :                         if (test_var > uint_max) {
    5858           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5859             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5860           0 :                                 return -1;
    5861             :                         }
    5862           0 :                         object->count = test_var;
    5863             :                 } else {
    5864           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5865             :                           PyLong_Type.tp_name);
    5866           0 :                         return -1;
    5867             :                 }
    5868             :         }
    5869           0 :         return 0;
    5870             : }
    5871             : 
    5872           0 : static PyObject *py_srvsvc_NetSessCtr10_get_array(PyObject *obj, void *closure)
    5873             : {
    5874           0 :         struct srvsvc_NetSessCtr10 *object = pytalloc_get_ptr(obj);
    5875           0 :         PyObject *py_array;
    5876           0 :         if (object->array == NULL) {
    5877           0 :                 Py_RETURN_NONE;
    5878             :         }
    5879           0 :         if (object->array == NULL) {
    5880           0 :                 py_array = Py_None;
    5881           0 :                 Py_INCREF(py_array);
    5882             :         } else {
    5883           0 :                 py_array = PyList_New(object->count);
    5884           0 :                 if (py_array == NULL) {
    5885           0 :                         return NULL;
    5886             :                 }
    5887             :                 {
    5888             :                         int array_cntr_1;
    5889           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    5890           0 :                                 PyObject *py_array_1;
    5891           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo10_Type, object->array, &(object->array)[array_cntr_1]);
    5892           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    5893             :                         }
    5894             :                 }
    5895             :         }
    5896           0 :         return py_array;
    5897             : }
    5898             : 
    5899           0 : static int py_srvsvc_NetSessCtr10_set_array(PyObject *py_obj, PyObject *value, void *closure)
    5900             : {
    5901           0 :         struct srvsvc_NetSessCtr10 *object = pytalloc_get_ptr(py_obj);
    5902           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    5903           0 :         if (value == NULL) {
    5904           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    5905           0 :                 return -1;
    5906             :         }
    5907           0 :         if (value == Py_None) {
    5908           0 :                 object->array = NULL;
    5909             :         } else {
    5910           0 :                 object->array = NULL;
    5911           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5912             :                 {
    5913           0 :                         int array_cntr_1;
    5914           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    5915           0 :                         if (!object->array) { return -1; }
    5916           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    5917           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    5918           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    5919           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    5920           0 :                                         return -1;
    5921             :                                 }
    5922           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessInfo10_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    5923           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    5924           0 :                                         PyErr_NoMemory();
    5925           0 :                                         return -1;
    5926             :                                 }
    5927           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    5928             :                         }
    5929             :                 }
    5930             :         }
    5931           0 :         return 0;
    5932             : }
    5933             : 
    5934             : static PyGetSetDef py_srvsvc_NetSessCtr10_getsetters[] = {
    5935             :         {
    5936             :                 .name = discard_const_p(char, "count"),
    5937             :                 .get = py_srvsvc_NetSessCtr10_get_count,
    5938             :                 .set = py_srvsvc_NetSessCtr10_set_count,
    5939             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5940             :         },
    5941             :         {
    5942             :                 .name = discard_const_p(char, "array"),
    5943             :                 .get = py_srvsvc_NetSessCtr10_get_array,
    5944             :                 .set = py_srvsvc_NetSessCtr10_set_array,
    5945             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfo10")
    5946             :         },
    5947             :         { .name = NULL }
    5948             : };
    5949             : 
    5950           0 : static PyObject *py_srvsvc_NetSessCtr10_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5951             : {
    5952           0 :         return pytalloc_new(struct srvsvc_NetSessCtr10, type);
    5953             : }
    5954             : 
    5955             : 
    5956             : static PyTypeObject srvsvc_NetSessCtr10_Type = {
    5957             :         PyVarObject_HEAD_INIT(NULL, 0)
    5958             :         .tp_name = "srvsvc.NetSessCtr10",
    5959             :         .tp_getset = py_srvsvc_NetSessCtr10_getsetters,
    5960             :         .tp_methods = NULL,
    5961             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5962             :         .tp_new = py_srvsvc_NetSessCtr10_new,
    5963             : };
    5964             : 
    5965             : 
    5966           0 : static PyObject *py_srvsvc_NetSessInfo502_get_client(PyObject *obj, void *closure)
    5967             : {
    5968           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(obj);
    5969           0 :         PyObject *py_client;
    5970           0 :         if (object->client == NULL) {
    5971           0 :                 Py_RETURN_NONE;
    5972             :         }
    5973           0 :         if (object->client == NULL) {
    5974           0 :                 py_client = Py_None;
    5975           0 :                 Py_INCREF(py_client);
    5976             :         } else {
    5977           0 :                 if (object->client == NULL) {
    5978           0 :                         py_client = Py_None;
    5979           0 :                         Py_INCREF(py_client);
    5980             :                 } else {
    5981           0 :                         py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
    5982             :                 }
    5983             :         }
    5984           0 :         return py_client;
    5985             : }
    5986             : 
    5987           0 : static int py_srvsvc_NetSessInfo502_set_client(PyObject *py_obj, PyObject *value, void *closure)
    5988             : {
    5989           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(py_obj);
    5990           0 :         if (value == NULL) {
    5991           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->client");
    5992           0 :                 return -1;
    5993             :         }
    5994           0 :         if (value == Py_None) {
    5995           0 :                 object->client = NULL;
    5996             :         } else {
    5997           0 :                 object->client = NULL;
    5998             :                 {
    5999           0 :                         const char *test_str;
    6000           0 :                         const char *talloc_str;
    6001           0 :                         PyObject *unicode = NULL;
    6002           0 :                         if (PyUnicode_Check(value)) {
    6003           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6004           0 :                                 if (unicode == NULL) {
    6005           0 :                                         return -1;
    6006             :                                 }
    6007           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6008           0 :                         } else if (PyBytes_Check(value)) {
    6009           0 :                                 test_str = PyBytes_AS_STRING(value);
    6010             :                         } else {
    6011           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6012           0 :                                 return -1;
    6013             :                         }
    6014           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6015           0 :                         if (unicode != NULL) {
    6016           0 :                                 Py_DECREF(unicode);
    6017             :                         }
    6018           0 :                         if (talloc_str == NULL) {
    6019           0 :                                 PyErr_NoMemory();
    6020           0 :                                 return -1;
    6021             :                         }
    6022           0 :                         object->client = talloc_str;
    6023             :                 }
    6024             :         }
    6025           0 :         return 0;
    6026             : }
    6027             : 
    6028           0 : static PyObject *py_srvsvc_NetSessInfo502_get_user(PyObject *obj, void *closure)
    6029             : {
    6030           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(obj);
    6031           0 :         PyObject *py_user;
    6032           0 :         if (object->user == NULL) {
    6033           0 :                 Py_RETURN_NONE;
    6034             :         }
    6035           0 :         if (object->user == NULL) {
    6036           0 :                 py_user = Py_None;
    6037           0 :                 Py_INCREF(py_user);
    6038             :         } else {
    6039           0 :                 if (object->user == NULL) {
    6040           0 :                         py_user = Py_None;
    6041           0 :                         Py_INCREF(py_user);
    6042             :                 } else {
    6043           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
    6044             :                 }
    6045             :         }
    6046           0 :         return py_user;
    6047             : }
    6048             : 
    6049           0 : static int py_srvsvc_NetSessInfo502_set_user(PyObject *py_obj, PyObject *value, void *closure)
    6050             : {
    6051           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(py_obj);
    6052           0 :         if (value == NULL) {
    6053           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user");
    6054           0 :                 return -1;
    6055             :         }
    6056           0 :         if (value == Py_None) {
    6057           0 :                 object->user = NULL;
    6058             :         } else {
    6059           0 :                 object->user = NULL;
    6060             :                 {
    6061           0 :                         const char *test_str;
    6062           0 :                         const char *talloc_str;
    6063           0 :                         PyObject *unicode = NULL;
    6064           0 :                         if (PyUnicode_Check(value)) {
    6065           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6066           0 :                                 if (unicode == NULL) {
    6067           0 :                                         return -1;
    6068             :                                 }
    6069           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6070           0 :                         } else if (PyBytes_Check(value)) {
    6071           0 :                                 test_str = PyBytes_AS_STRING(value);
    6072             :                         } else {
    6073           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6074           0 :                                 return -1;
    6075             :                         }
    6076           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6077           0 :                         if (unicode != NULL) {
    6078           0 :                                 Py_DECREF(unicode);
    6079             :                         }
    6080           0 :                         if (talloc_str == NULL) {
    6081           0 :                                 PyErr_NoMemory();
    6082           0 :                                 return -1;
    6083             :                         }
    6084           0 :                         object->user = talloc_str;
    6085             :                 }
    6086             :         }
    6087           0 :         return 0;
    6088             : }
    6089             : 
    6090           0 : static PyObject *py_srvsvc_NetSessInfo502_get_num_open(PyObject *obj, void *closure)
    6091             : {
    6092           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(obj);
    6093           0 :         PyObject *py_num_open;
    6094           0 :         py_num_open = PyLong_FromUnsignedLongLong((uint32_t)(object->num_open));
    6095           0 :         return py_num_open;
    6096             : }
    6097             : 
    6098           0 : static int py_srvsvc_NetSessInfo502_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
    6099             : {
    6100           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(py_obj);
    6101           0 :         if (value == NULL) {
    6102           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_open");
    6103           0 :                 return -1;
    6104             :         }
    6105             :         {
    6106           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
    6107           0 :                 if (PyLong_Check(value)) {
    6108           0 :                         unsigned long long test_var;
    6109           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6110           0 :                         if (PyErr_Occurred() != NULL) {
    6111           0 :                                 return -1;
    6112             :                         }
    6113           0 :                         if (test_var > uint_max) {
    6114           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6115             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6116           0 :                                 return -1;
    6117             :                         }
    6118           0 :                         object->num_open = test_var;
    6119             :                 } else {
    6120           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6121             :                           PyLong_Type.tp_name);
    6122           0 :                         return -1;
    6123             :                 }
    6124             :         }
    6125           0 :         return 0;
    6126             : }
    6127             : 
    6128           0 : static PyObject *py_srvsvc_NetSessInfo502_get_time(PyObject *obj, void *closure)
    6129             : {
    6130           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(obj);
    6131           0 :         PyObject *py_time;
    6132           0 :         py_time = PyLong_FromUnsignedLongLong((uint32_t)(object->time));
    6133           0 :         return py_time;
    6134             : }
    6135             : 
    6136           0 : static int py_srvsvc_NetSessInfo502_set_time(PyObject *py_obj, PyObject *value, void *closure)
    6137             : {
    6138           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(py_obj);
    6139           0 :         if (value == NULL) {
    6140           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->time");
    6141           0 :                 return -1;
    6142             :         }
    6143             :         {
    6144           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
    6145           0 :                 if (PyLong_Check(value)) {
    6146           0 :                         unsigned long long test_var;
    6147           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6148           0 :                         if (PyErr_Occurred() != NULL) {
    6149           0 :                                 return -1;
    6150             :                         }
    6151           0 :                         if (test_var > uint_max) {
    6152           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6153             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6154           0 :                                 return -1;
    6155             :                         }
    6156           0 :                         object->time = test_var;
    6157             :                 } else {
    6158           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6159             :                           PyLong_Type.tp_name);
    6160           0 :                         return -1;
    6161             :                 }
    6162             :         }
    6163           0 :         return 0;
    6164             : }
    6165             : 
    6166           0 : static PyObject *py_srvsvc_NetSessInfo502_get_idle_time(PyObject *obj, void *closure)
    6167             : {
    6168           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(obj);
    6169           0 :         PyObject *py_idle_time;
    6170           0 :         py_idle_time = PyLong_FromUnsignedLongLong((uint32_t)(object->idle_time));
    6171           0 :         return py_idle_time;
    6172             : }
    6173             : 
    6174           0 : static int py_srvsvc_NetSessInfo502_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
    6175             : {
    6176           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(py_obj);
    6177           0 :         if (value == NULL) {
    6178           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->idle_time");
    6179           0 :                 return -1;
    6180             :         }
    6181             :         {
    6182           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
    6183           0 :                 if (PyLong_Check(value)) {
    6184           0 :                         unsigned long long test_var;
    6185           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6186           0 :                         if (PyErr_Occurred() != NULL) {
    6187           0 :                                 return -1;
    6188             :                         }
    6189           0 :                         if (test_var > uint_max) {
    6190           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6191             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6192           0 :                                 return -1;
    6193             :                         }
    6194           0 :                         object->idle_time = test_var;
    6195             :                 } else {
    6196           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6197             :                           PyLong_Type.tp_name);
    6198           0 :                         return -1;
    6199             :                 }
    6200             :         }
    6201           0 :         return 0;
    6202             : }
    6203             : 
    6204           0 : static PyObject *py_srvsvc_NetSessInfo502_get_user_flags(PyObject *obj, void *closure)
    6205             : {
    6206           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(obj);
    6207           0 :         PyObject *py_user_flags;
    6208           0 :         py_user_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->user_flags));
    6209           0 :         return py_user_flags;
    6210             : }
    6211             : 
    6212           0 : static int py_srvsvc_NetSessInfo502_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
    6213             : {
    6214           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(py_obj);
    6215           0 :         if (value == NULL) {
    6216           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user_flags");
    6217           0 :                 return -1;
    6218             :         }
    6219             :         {
    6220           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
    6221           0 :                 if (PyLong_Check(value)) {
    6222           0 :                         unsigned long long test_var;
    6223           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6224           0 :                         if (PyErr_Occurred() != NULL) {
    6225           0 :                                 return -1;
    6226             :                         }
    6227           0 :                         if (test_var > uint_max) {
    6228           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6229             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6230           0 :                                 return -1;
    6231             :                         }
    6232           0 :                         object->user_flags = test_var;
    6233             :                 } else {
    6234           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6235             :                           PyLong_Type.tp_name);
    6236           0 :                         return -1;
    6237             :                 }
    6238             :         }
    6239           0 :         return 0;
    6240             : }
    6241             : 
    6242           0 : static PyObject *py_srvsvc_NetSessInfo502_get_client_type(PyObject *obj, void *closure)
    6243             : {
    6244           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(obj);
    6245           0 :         PyObject *py_client_type;
    6246           0 :         if (object->client_type == NULL) {
    6247           0 :                 Py_RETURN_NONE;
    6248             :         }
    6249           0 :         if (object->client_type == NULL) {
    6250           0 :                 py_client_type = Py_None;
    6251           0 :                 Py_INCREF(py_client_type);
    6252             :         } else {
    6253           0 :                 if (object->client_type == NULL) {
    6254           0 :                         py_client_type = Py_None;
    6255           0 :                         Py_INCREF(py_client_type);
    6256             :                 } else {
    6257           0 :                         py_client_type = PyUnicode_Decode(object->client_type, strlen(object->client_type), "utf-8", "ignore");
    6258             :                 }
    6259             :         }
    6260           0 :         return py_client_type;
    6261             : }
    6262             : 
    6263           0 : static int py_srvsvc_NetSessInfo502_set_client_type(PyObject *py_obj, PyObject *value, void *closure)
    6264             : {
    6265           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(py_obj);
    6266           0 :         if (value == NULL) {
    6267           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->client_type");
    6268           0 :                 return -1;
    6269             :         }
    6270           0 :         if (value == Py_None) {
    6271           0 :                 object->client_type = NULL;
    6272             :         } else {
    6273           0 :                 object->client_type = NULL;
    6274             :                 {
    6275           0 :                         const char *test_str;
    6276           0 :                         const char *talloc_str;
    6277           0 :                         PyObject *unicode = NULL;
    6278           0 :                         if (PyUnicode_Check(value)) {
    6279           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6280           0 :                                 if (unicode == NULL) {
    6281           0 :                                         return -1;
    6282             :                                 }
    6283           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6284           0 :                         } else if (PyBytes_Check(value)) {
    6285           0 :                                 test_str = PyBytes_AS_STRING(value);
    6286             :                         } else {
    6287           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6288           0 :                                 return -1;
    6289             :                         }
    6290           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6291           0 :                         if (unicode != NULL) {
    6292           0 :                                 Py_DECREF(unicode);
    6293             :                         }
    6294           0 :                         if (talloc_str == NULL) {
    6295           0 :                                 PyErr_NoMemory();
    6296           0 :                                 return -1;
    6297             :                         }
    6298           0 :                         object->client_type = talloc_str;
    6299             :                 }
    6300             :         }
    6301           0 :         return 0;
    6302             : }
    6303             : 
    6304           0 : static PyObject *py_srvsvc_NetSessInfo502_get_transport(PyObject *obj, void *closure)
    6305             : {
    6306           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(obj);
    6307           0 :         PyObject *py_transport;
    6308           0 :         if (object->transport == NULL) {
    6309           0 :                 Py_RETURN_NONE;
    6310             :         }
    6311           0 :         if (object->transport == NULL) {
    6312           0 :                 py_transport = Py_None;
    6313           0 :                 Py_INCREF(py_transport);
    6314             :         } else {
    6315           0 :                 if (object->transport == NULL) {
    6316           0 :                         py_transport = Py_None;
    6317           0 :                         Py_INCREF(py_transport);
    6318             :                 } else {
    6319           0 :                         py_transport = PyUnicode_Decode(object->transport, strlen(object->transport), "utf-8", "ignore");
    6320             :                 }
    6321             :         }
    6322           0 :         return py_transport;
    6323             : }
    6324             : 
    6325           0 : static int py_srvsvc_NetSessInfo502_set_transport(PyObject *py_obj, PyObject *value, void *closure)
    6326             : {
    6327           0 :         struct srvsvc_NetSessInfo502 *object = pytalloc_get_ptr(py_obj);
    6328           0 :         if (value == NULL) {
    6329           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->transport");
    6330           0 :                 return -1;
    6331             :         }
    6332           0 :         if (value == Py_None) {
    6333           0 :                 object->transport = NULL;
    6334             :         } else {
    6335           0 :                 object->transport = NULL;
    6336             :                 {
    6337           0 :                         const char *test_str;
    6338           0 :                         const char *talloc_str;
    6339           0 :                         PyObject *unicode = NULL;
    6340           0 :                         if (PyUnicode_Check(value)) {
    6341           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6342           0 :                                 if (unicode == NULL) {
    6343           0 :                                         return -1;
    6344             :                                 }
    6345           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6346           0 :                         } else if (PyBytes_Check(value)) {
    6347           0 :                                 test_str = PyBytes_AS_STRING(value);
    6348             :                         } else {
    6349           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6350           0 :                                 return -1;
    6351             :                         }
    6352           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6353           0 :                         if (unicode != NULL) {
    6354           0 :                                 Py_DECREF(unicode);
    6355             :                         }
    6356           0 :                         if (talloc_str == NULL) {
    6357           0 :                                 PyErr_NoMemory();
    6358           0 :                                 return -1;
    6359             :                         }
    6360           0 :                         object->transport = talloc_str;
    6361             :                 }
    6362             :         }
    6363           0 :         return 0;
    6364             : }
    6365             : 
    6366             : static PyGetSetDef py_srvsvc_NetSessInfo502_getsetters[] = {
    6367             :         {
    6368             :                 .name = discard_const_p(char, "client"),
    6369             :                 .get = py_srvsvc_NetSessInfo502_get_client,
    6370             :                 .set = py_srvsvc_NetSessInfo502_set_client,
    6371             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6372             :         },
    6373             :         {
    6374             :                 .name = discard_const_p(char, "user"),
    6375             :                 .get = py_srvsvc_NetSessInfo502_get_user,
    6376             :                 .set = py_srvsvc_NetSessInfo502_set_user,
    6377             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6378             :         },
    6379             :         {
    6380             :                 .name = discard_const_p(char, "num_open"),
    6381             :                 .get = py_srvsvc_NetSessInfo502_get_num_open,
    6382             :                 .set = py_srvsvc_NetSessInfo502_set_num_open,
    6383             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6384             :         },
    6385             :         {
    6386             :                 .name = discard_const_p(char, "time"),
    6387             :                 .get = py_srvsvc_NetSessInfo502_get_time,
    6388             :                 .set = py_srvsvc_NetSessInfo502_set_time,
    6389             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6390             :         },
    6391             :         {
    6392             :                 .name = discard_const_p(char, "idle_time"),
    6393             :                 .get = py_srvsvc_NetSessInfo502_get_idle_time,
    6394             :                 .set = py_srvsvc_NetSessInfo502_set_idle_time,
    6395             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6396             :         },
    6397             :         {
    6398             :                 .name = discard_const_p(char, "user_flags"),
    6399             :                 .get = py_srvsvc_NetSessInfo502_get_user_flags,
    6400             :                 .set = py_srvsvc_NetSessInfo502_set_user_flags,
    6401             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6402             :         },
    6403             :         {
    6404             :                 .name = discard_const_p(char, "client_type"),
    6405             :                 .get = py_srvsvc_NetSessInfo502_get_client_type,
    6406             :                 .set = py_srvsvc_NetSessInfo502_set_client_type,
    6407             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6408             :         },
    6409             :         {
    6410             :                 .name = discard_const_p(char, "transport"),
    6411             :                 .get = py_srvsvc_NetSessInfo502_get_transport,
    6412             :                 .set = py_srvsvc_NetSessInfo502_set_transport,
    6413             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6414             :         },
    6415             :         { .name = NULL }
    6416             : };
    6417             : 
    6418           0 : static PyObject *py_srvsvc_NetSessInfo502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6419             : {
    6420           0 :         return pytalloc_new(struct srvsvc_NetSessInfo502, type);
    6421             : }
    6422             : 
    6423             : 
    6424             : static PyTypeObject srvsvc_NetSessInfo502_Type = {
    6425             :         PyVarObject_HEAD_INIT(NULL, 0)
    6426             :         .tp_name = "srvsvc.NetSessInfo502",
    6427             :         .tp_getset = py_srvsvc_NetSessInfo502_getsetters,
    6428             :         .tp_methods = NULL,
    6429             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6430             :         .tp_new = py_srvsvc_NetSessInfo502_new,
    6431             : };
    6432             : 
    6433             : 
    6434           0 : static PyObject *py_srvsvc_NetSessCtr502_get_count(PyObject *obj, void *closure)
    6435             : {
    6436           0 :         struct srvsvc_NetSessCtr502 *object = pytalloc_get_ptr(obj);
    6437           0 :         PyObject *py_count;
    6438           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    6439           0 :         return py_count;
    6440             : }
    6441             : 
    6442           0 : static int py_srvsvc_NetSessCtr502_set_count(PyObject *py_obj, PyObject *value, void *closure)
    6443             : {
    6444           0 :         struct srvsvc_NetSessCtr502 *object = pytalloc_get_ptr(py_obj);
    6445           0 :         if (value == NULL) {
    6446           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    6447           0 :                 return -1;
    6448             :         }
    6449             :         {
    6450           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    6451           0 :                 if (PyLong_Check(value)) {
    6452           0 :                         unsigned long long test_var;
    6453           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6454           0 :                         if (PyErr_Occurred() != NULL) {
    6455           0 :                                 return -1;
    6456             :                         }
    6457           0 :                         if (test_var > uint_max) {
    6458           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6459             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6460           0 :                                 return -1;
    6461             :                         }
    6462           0 :                         object->count = test_var;
    6463             :                 } else {
    6464           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6465             :                           PyLong_Type.tp_name);
    6466           0 :                         return -1;
    6467             :                 }
    6468             :         }
    6469           0 :         return 0;
    6470             : }
    6471             : 
    6472           0 : static PyObject *py_srvsvc_NetSessCtr502_get_array(PyObject *obj, void *closure)
    6473             : {
    6474           0 :         struct srvsvc_NetSessCtr502 *object = pytalloc_get_ptr(obj);
    6475           0 :         PyObject *py_array;
    6476           0 :         if (object->array == NULL) {
    6477           0 :                 Py_RETURN_NONE;
    6478             :         }
    6479           0 :         if (object->array == NULL) {
    6480           0 :                 py_array = Py_None;
    6481           0 :                 Py_INCREF(py_array);
    6482             :         } else {
    6483           0 :                 py_array = PyList_New(object->count);
    6484           0 :                 if (py_array == NULL) {
    6485           0 :                         return NULL;
    6486             :                 }
    6487             :                 {
    6488             :                         int array_cntr_1;
    6489           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    6490           0 :                                 PyObject *py_array_1;
    6491           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo502_Type, object->array, &(object->array)[array_cntr_1]);
    6492           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    6493             :                         }
    6494             :                 }
    6495             :         }
    6496           0 :         return py_array;
    6497             : }
    6498             : 
    6499           0 : static int py_srvsvc_NetSessCtr502_set_array(PyObject *py_obj, PyObject *value, void *closure)
    6500             : {
    6501           0 :         struct srvsvc_NetSessCtr502 *object = pytalloc_get_ptr(py_obj);
    6502           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    6503           0 :         if (value == NULL) {
    6504           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    6505           0 :                 return -1;
    6506             :         }
    6507           0 :         if (value == Py_None) {
    6508           0 :                 object->array = NULL;
    6509             :         } else {
    6510           0 :                 object->array = NULL;
    6511           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    6512             :                 {
    6513           0 :                         int array_cntr_1;
    6514           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    6515           0 :                         if (!object->array) { return -1; }
    6516           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    6517           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    6518           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    6519           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    6520           0 :                                         return -1;
    6521             :                                 }
    6522           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessInfo502_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    6523           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    6524           0 :                                         PyErr_NoMemory();
    6525           0 :                                         return -1;
    6526             :                                 }
    6527           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    6528             :                         }
    6529             :                 }
    6530             :         }
    6531           0 :         return 0;
    6532             : }
    6533             : 
    6534             : static PyGetSetDef py_srvsvc_NetSessCtr502_getsetters[] = {
    6535             :         {
    6536             :                 .name = discard_const_p(char, "count"),
    6537             :                 .get = py_srvsvc_NetSessCtr502_get_count,
    6538             :                 .set = py_srvsvc_NetSessCtr502_set_count,
    6539             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6540             :         },
    6541             :         {
    6542             :                 .name = discard_const_p(char, "array"),
    6543             :                 .get = py_srvsvc_NetSessCtr502_get_array,
    6544             :                 .set = py_srvsvc_NetSessCtr502_set_array,
    6545             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfo502")
    6546             :         },
    6547             :         { .name = NULL }
    6548             : };
    6549             : 
    6550           0 : static PyObject *py_srvsvc_NetSessCtr502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6551             : {
    6552           0 :         return pytalloc_new(struct srvsvc_NetSessCtr502, type);
    6553             : }
    6554             : 
    6555             : 
    6556             : static PyTypeObject srvsvc_NetSessCtr502_Type = {
    6557             :         PyVarObject_HEAD_INIT(NULL, 0)
    6558             :         .tp_name = "srvsvc.NetSessCtr502",
    6559             :         .tp_getset = py_srvsvc_NetSessCtr502_getsetters,
    6560             :         .tp_methods = NULL,
    6561             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6562             :         .tp_new = py_srvsvc_NetSessCtr502_new,
    6563             : };
    6564             : 
    6565           0 : static PyObject *py_import_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSessCtr *in)
    6566             : {
    6567           0 :         PyObject *ret;
    6568             : 
    6569           0 :         switch (level) {
    6570           0 :                 case 0:
    6571           0 :                         if (in->ctr0 == NULL) {
    6572           0 :                                 ret = Py_None;
    6573           0 :                                 Py_INCREF(ret);
    6574             :                         } else {
    6575           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr0_Type, in->ctr0, in->ctr0);
    6576             :                         }
    6577           0 :                         return ret;
    6578             : 
    6579           0 :                 case 1:
    6580           0 :                         if (in->ctr1 == NULL) {
    6581           0 :                                 ret = Py_None;
    6582           0 :                                 Py_INCREF(ret);
    6583             :                         } else {
    6584           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr1_Type, in->ctr1, in->ctr1);
    6585             :                         }
    6586           0 :                         return ret;
    6587             : 
    6588           0 :                 case 2:
    6589           0 :                         if (in->ctr2 == NULL) {
    6590           0 :                                 ret = Py_None;
    6591           0 :                                 Py_INCREF(ret);
    6592             :                         } else {
    6593           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr2_Type, in->ctr2, in->ctr2);
    6594             :                         }
    6595           0 :                         return ret;
    6596             : 
    6597           0 :                 case 10:
    6598           0 :                         if (in->ctr10 == NULL) {
    6599           0 :                                 ret = Py_None;
    6600           0 :                                 Py_INCREF(ret);
    6601             :                         } else {
    6602           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr10_Type, in->ctr10, in->ctr10);
    6603             :                         }
    6604           0 :                         return ret;
    6605             : 
    6606           0 :                 case 502:
    6607           0 :                         if (in->ctr502 == NULL) {
    6608           0 :                                 ret = Py_None;
    6609           0 :                                 Py_INCREF(ret);
    6610             :                         } else {
    6611           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr502_Type, in->ctr502, in->ctr502);
    6612             :                         }
    6613           0 :                         return ret;
    6614             : 
    6615           0 :                 default:
    6616           0 :                         ret = Py_None;
    6617           0 :                         Py_INCREF(ret);
    6618           0 :                         return ret;
    6619             : 
    6620             :         }
    6621             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    6622             :         return NULL;
    6623             : }
    6624             : 
    6625           0 : static union srvsvc_NetSessCtr *py_export_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    6626             : {
    6627           0 :         union srvsvc_NetSessCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetSessCtr);
    6628           0 :         switch (level) {
    6629           0 :                 case 0:
    6630           0 :                         if (in == NULL) {
    6631           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr0");
    6632           0 :                                 talloc_free(ret); return NULL;
    6633             :                         }
    6634           0 :                         if (in == Py_None) {
    6635           0 :                                 ret->ctr0 = NULL;
    6636             :                         } else {
    6637           0 :                                 ret->ctr0 = NULL;
    6638           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessCtr0_Type, in, talloc_free(ret); return NULL;);
    6639           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    6640           0 :                                         PyErr_NoMemory();
    6641           0 :                                         talloc_free(ret); return NULL;
    6642             :                                 }
    6643           0 :                                 ret->ctr0 = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(in);
    6644             :                         }
    6645           0 :                         break;
    6646             : 
    6647           0 :                 case 1:
    6648           0 :                         if (in == NULL) {
    6649           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr1");
    6650           0 :                                 talloc_free(ret); return NULL;
    6651             :                         }
    6652           0 :                         if (in == Py_None) {
    6653           0 :                                 ret->ctr1 = NULL;
    6654             :                         } else {
    6655           0 :                                 ret->ctr1 = NULL;
    6656           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessCtr1_Type, in, talloc_free(ret); return NULL;);
    6657           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    6658           0 :                                         PyErr_NoMemory();
    6659           0 :                                         talloc_free(ret); return NULL;
    6660             :                                 }
    6661           0 :                                 ret->ctr1 = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(in);
    6662             :                         }
    6663           0 :                         break;
    6664             : 
    6665           0 :                 case 2:
    6666           0 :                         if (in == NULL) {
    6667           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr2");
    6668           0 :                                 talloc_free(ret); return NULL;
    6669             :                         }
    6670           0 :                         if (in == Py_None) {
    6671           0 :                                 ret->ctr2 = NULL;
    6672             :                         } else {
    6673           0 :                                 ret->ctr2 = NULL;
    6674           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessCtr2_Type, in, talloc_free(ret); return NULL;);
    6675           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    6676           0 :                                         PyErr_NoMemory();
    6677           0 :                                         talloc_free(ret); return NULL;
    6678             :                                 }
    6679           0 :                                 ret->ctr2 = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(in);
    6680             :                         }
    6681           0 :                         break;
    6682             : 
    6683           0 :                 case 10:
    6684           0 :                         if (in == NULL) {
    6685           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr10");
    6686           0 :                                 talloc_free(ret); return NULL;
    6687             :                         }
    6688           0 :                         if (in == Py_None) {
    6689           0 :                                 ret->ctr10 = NULL;
    6690             :                         } else {
    6691           0 :                                 ret->ctr10 = NULL;
    6692           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessCtr10_Type, in, talloc_free(ret); return NULL;);
    6693           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    6694           0 :                                         PyErr_NoMemory();
    6695           0 :                                         talloc_free(ret); return NULL;
    6696             :                                 }
    6697           0 :                                 ret->ctr10 = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(in);
    6698             :                         }
    6699           0 :                         break;
    6700             : 
    6701           0 :                 case 502:
    6702           0 :                         if (in == NULL) {
    6703           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr502");
    6704           0 :                                 talloc_free(ret); return NULL;
    6705             :                         }
    6706           0 :                         if (in == Py_None) {
    6707           0 :                                 ret->ctr502 = NULL;
    6708             :                         } else {
    6709           0 :                                 ret->ctr502 = NULL;
    6710           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessCtr502_Type, in, talloc_free(ret); return NULL;);
    6711           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    6712           0 :                                         PyErr_NoMemory();
    6713           0 :                                         talloc_free(ret); return NULL;
    6714             :                                 }
    6715           0 :                                 ret->ctr502 = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(in);
    6716             :                         }
    6717           0 :                         break;
    6718             : 
    6719           0 :                 default:
    6720           0 :                         break;
    6721             : 
    6722             :         }
    6723             : 
    6724           0 :         return ret;
    6725             : }
    6726             : 
    6727           0 : static PyObject *py_srvsvc_NetSessCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6728             : {
    6729           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    6730           0 :         PyObject *mem_ctx_obj = NULL;
    6731           0 :         TALLOC_CTX *mem_ctx = NULL;
    6732           0 :         int level = 0;
    6733           0 :         PyObject *in_obj = NULL;
    6734           0 :         union srvsvc_NetSessCtr *in = NULL;
    6735             : 
    6736           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    6737             :                 discard_const_p(char *, kwnames),
    6738             :                 &mem_ctx_obj,
    6739             :                 &level,
    6740             :                 &in_obj)) {
    6741           0 :                 return NULL;
    6742             :         }
    6743           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    6744           0 :         if (mem_ctx == NULL) {
    6745           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    6746           0 :                 return NULL;
    6747             :         }
    6748           0 :         in = (union srvsvc_NetSessCtr *)pytalloc_get_ptr(in_obj);
    6749           0 :         if (in == NULL) {
    6750           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetSessCtr!");
    6751           0 :                 return NULL;
    6752             :         }
    6753             : 
    6754           0 :         return py_import_srvsvc_NetSessCtr(mem_ctx, level, in);
    6755             : }
    6756             : 
    6757           0 : static PyObject *py_srvsvc_NetSessCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6758             : {
    6759           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    6760           0 :         PyObject *mem_ctx_obj = NULL;
    6761           0 :         TALLOC_CTX *mem_ctx = NULL;
    6762           0 :         int level = 0;
    6763           0 :         PyObject *in = NULL;
    6764           0 :         union srvsvc_NetSessCtr *out = NULL;
    6765             : 
    6766           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    6767             :                 discard_const_p(char *, kwnames),
    6768             :                 &mem_ctx_obj,
    6769             :                 &level,
    6770             :                 &in)) {
    6771           0 :                 return NULL;
    6772             :         }
    6773           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    6774           0 :         if (mem_ctx == NULL) {
    6775           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    6776           0 :                 return NULL;
    6777             :         }
    6778             : 
    6779           0 :         out = py_export_srvsvc_NetSessCtr(mem_ctx, level, in);
    6780           0 :         if (out == NULL) {
    6781           0 :                 return NULL;
    6782             :         }
    6783             : 
    6784           0 :         return pytalloc_GenericObject_reference(out);
    6785             : }
    6786             : 
    6787             : static PyMethodDef py_srvsvc_NetSessCtr_methods[] = {
    6788             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessCtr_import),
    6789             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    6790             :                 "T.__import__(mem_ctx, level, in) => ret." },
    6791             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessCtr_export),
    6792             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    6793             :                 "T.__export__(mem_ctx, level, in) => ret." },
    6794             :         { NULL, NULL, 0, NULL }
    6795             : };
    6796             : 
    6797           0 : static PyObject *py_srvsvc_NetSessCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6798             : {
    6799           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    6800           0 :         return NULL;
    6801             : }
    6802             : 
    6803             : 
    6804             : static PyTypeObject srvsvc_NetSessCtr_Type = {
    6805             :         PyVarObject_HEAD_INIT(NULL, 0)
    6806             :         .tp_name = "srvsvc.NetSessCtr",
    6807             :         .tp_getset = NULL,
    6808             :         .tp_methods = py_srvsvc_NetSessCtr_methods,
    6809             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6810             :         .tp_new = py_srvsvc_NetSessCtr_new,
    6811             : };
    6812             : 
    6813             : 
    6814           0 : static PyObject *py_srvsvc_NetSessInfoCtr_get_level(PyObject *obj, void *closure)
    6815             : {
    6816           0 :         struct srvsvc_NetSessInfoCtr *object = pytalloc_get_ptr(obj);
    6817           0 :         PyObject *py_level;
    6818           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->level));
    6819           0 :         return py_level;
    6820             : }
    6821             : 
    6822           0 : static int py_srvsvc_NetSessInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
    6823             : {
    6824           0 :         struct srvsvc_NetSessInfoCtr *object = pytalloc_get_ptr(py_obj);
    6825           0 :         if (value == NULL) {
    6826           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->level");
    6827           0 :                 return -1;
    6828             :         }
    6829             :         {
    6830           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    6831           0 :                 if (PyLong_Check(value)) {
    6832           0 :                         unsigned long long test_var;
    6833           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6834           0 :                         if (PyErr_Occurred() != NULL) {
    6835           0 :                                 return -1;
    6836             :                         }
    6837           0 :                         if (test_var > uint_max) {
    6838           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6839             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6840           0 :                                 return -1;
    6841             :                         }
    6842           0 :                         object->level = test_var;
    6843             :                 } else {
    6844           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6845             :                           PyLong_Type.tp_name);
    6846           0 :                         return -1;
    6847             :                 }
    6848             :         }
    6849           0 :         return 0;
    6850             : }
    6851             : 
    6852           0 : static PyObject *py_srvsvc_NetSessInfoCtr_get_ctr(PyObject *obj, void *closure)
    6853             : {
    6854           0 :         struct srvsvc_NetSessInfoCtr *object = pytalloc_get_ptr(obj);
    6855           0 :         PyObject *py_ctr;
    6856           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetSessCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetSessCtr");
    6857           0 :         if (py_ctr == NULL) {
    6858           0 :                 return NULL;
    6859             :         }
    6860           0 :         return py_ctr;
    6861             : }
    6862             : 
    6863           0 : static int py_srvsvc_NetSessInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    6864             : {
    6865           0 :         struct srvsvc_NetSessInfoCtr *object = pytalloc_get_ptr(py_obj);
    6866           0 :         if (value == NULL) {
    6867           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ctr");
    6868           0 :                 return -1;
    6869             :         }
    6870             :         {
    6871           0 :                 union srvsvc_NetSessCtr *ctr_switch_0;
    6872           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");
    6873           0 :                 if (ctr_switch_0 == NULL) {
    6874           0 :                         return -1;
    6875             :                 }
    6876           0 :                 object->ctr = *ctr_switch_0;
    6877             :         }
    6878           0 :         return 0;
    6879             : }
    6880             : 
    6881             : static PyGetSetDef py_srvsvc_NetSessInfoCtr_getsetters[] = {
    6882             :         {
    6883             :                 .name = discard_const_p(char, "level"),
    6884             :                 .get = py_srvsvc_NetSessInfoCtr_get_level,
    6885             :                 .set = py_srvsvc_NetSessInfoCtr_set_level,
    6886             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6887             :         },
    6888             :         {
    6889             :                 .name = discard_const_p(char, "ctr"),
    6890             :                 .get = py_srvsvc_NetSessInfoCtr_get_ctr,
    6891             :                 .set = py_srvsvc_NetSessInfoCtr_set_ctr,
    6892             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessCtr")
    6893             :         },
    6894             :         { .name = NULL }
    6895             : };
    6896             : 
    6897           0 : static PyObject *py_srvsvc_NetSessInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6898             : {
    6899           0 :         return pytalloc_new(struct srvsvc_NetSessInfoCtr, type);
    6900             : }
    6901             : 
    6902             : 
    6903             : static PyTypeObject srvsvc_NetSessInfoCtr_Type = {
    6904             :         PyVarObject_HEAD_INIT(NULL, 0)
    6905             :         .tp_name = "srvsvc.NetSessInfoCtr",
    6906             :         .tp_getset = py_srvsvc_NetSessInfoCtr_getsetters,
    6907             :         .tp_methods = NULL,
    6908             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6909             :         .tp_new = py_srvsvc_NetSessInfoCtr_new,
    6910             : };
    6911             : 
    6912             : 
    6913           0 : static PyObject *py_srvsvc_NetShareInfo0_get_name(PyObject *obj, void *closure)
    6914             : {
    6915           0 :         struct srvsvc_NetShareInfo0 *object = pytalloc_get_ptr(obj);
    6916           0 :         PyObject *py_name;
    6917           0 :         if (object->name == NULL) {
    6918           0 :                 Py_RETURN_NONE;
    6919             :         }
    6920           0 :         if (object->name == NULL) {
    6921           0 :                 py_name = Py_None;
    6922           0 :                 Py_INCREF(py_name);
    6923             :         } else {
    6924           0 :                 if (object->name == NULL) {
    6925           0 :                         py_name = Py_None;
    6926           0 :                         Py_INCREF(py_name);
    6927             :                 } else {
    6928           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    6929             :                 }
    6930             :         }
    6931           0 :         return py_name;
    6932             : }
    6933             : 
    6934           0 : static int py_srvsvc_NetShareInfo0_set_name(PyObject *py_obj, PyObject *value, void *closure)
    6935             : {
    6936           0 :         struct srvsvc_NetShareInfo0 *object = pytalloc_get_ptr(py_obj);
    6937           0 :         if (value == NULL) {
    6938           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->name");
    6939           0 :                 return -1;
    6940             :         }
    6941           0 :         if (value == Py_None) {
    6942           0 :                 object->name = NULL;
    6943             :         } else {
    6944           0 :                 object->name = NULL;
    6945             :                 {
    6946           0 :                         const char *test_str;
    6947           0 :                         const char *talloc_str;
    6948           0 :                         PyObject *unicode = NULL;
    6949           0 :                         if (PyUnicode_Check(value)) {
    6950           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6951           0 :                                 if (unicode == NULL) {
    6952           0 :                                         return -1;
    6953             :                                 }
    6954           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6955           0 :                         } else if (PyBytes_Check(value)) {
    6956           0 :                                 test_str = PyBytes_AS_STRING(value);
    6957             :                         } else {
    6958           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6959           0 :                                 return -1;
    6960             :                         }
    6961           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6962           0 :                         if (unicode != NULL) {
    6963           0 :                                 Py_DECREF(unicode);
    6964             :                         }
    6965           0 :                         if (talloc_str == NULL) {
    6966           0 :                                 PyErr_NoMemory();
    6967           0 :                                 return -1;
    6968             :                         }
    6969           0 :                         object->name = talloc_str;
    6970             :                 }
    6971             :         }
    6972           0 :         return 0;
    6973             : }
    6974             : 
    6975             : static PyGetSetDef py_srvsvc_NetShareInfo0_getsetters[] = {
    6976             :         {
    6977             :                 .name = discard_const_p(char, "name"),
    6978             :                 .get = py_srvsvc_NetShareInfo0_get_name,
    6979             :                 .set = py_srvsvc_NetShareInfo0_set_name,
    6980             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6981             :         },
    6982             :         { .name = NULL }
    6983             : };
    6984             : 
    6985           0 : static PyObject *py_srvsvc_NetShareInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6986             : {
    6987           0 :         return pytalloc_new(struct srvsvc_NetShareInfo0, type);
    6988             : }
    6989             : 
    6990             : 
    6991             : static PyTypeObject srvsvc_NetShareInfo0_Type = {
    6992             :         PyVarObject_HEAD_INIT(NULL, 0)
    6993             :         .tp_name = "srvsvc.NetShareInfo0",
    6994             :         .tp_getset = py_srvsvc_NetShareInfo0_getsetters,
    6995             :         .tp_methods = NULL,
    6996             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6997             :         .tp_new = py_srvsvc_NetShareInfo0_new,
    6998             : };
    6999             : 
    7000             : 
    7001           0 : static PyObject *py_srvsvc_NetShareCtr0_get_count(PyObject *obj, void *closure)
    7002             : {
    7003           0 :         struct srvsvc_NetShareCtr0 *object = pytalloc_get_ptr(obj);
    7004           0 :         PyObject *py_count;
    7005           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    7006           0 :         return py_count;
    7007             : }
    7008             : 
    7009           0 : static int py_srvsvc_NetShareCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
    7010             : {
    7011           0 :         struct srvsvc_NetShareCtr0 *object = pytalloc_get_ptr(py_obj);
    7012           0 :         if (value == NULL) {
    7013           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    7014           0 :                 return -1;
    7015             :         }
    7016             :         {
    7017           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    7018           0 :                 if (PyLong_Check(value)) {
    7019           0 :                         unsigned long long test_var;
    7020           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7021           0 :                         if (PyErr_Occurred() != NULL) {
    7022           0 :                                 return -1;
    7023             :                         }
    7024           0 :                         if (test_var > uint_max) {
    7025           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7026             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7027           0 :                                 return -1;
    7028             :                         }
    7029           0 :                         object->count = test_var;
    7030             :                 } else {
    7031           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7032             :                           PyLong_Type.tp_name);
    7033           0 :                         return -1;
    7034             :                 }
    7035             :         }
    7036           0 :         return 0;
    7037             : }
    7038             : 
    7039           0 : static PyObject *py_srvsvc_NetShareCtr0_get_array(PyObject *obj, void *closure)
    7040             : {
    7041           0 :         struct srvsvc_NetShareCtr0 *object = pytalloc_get_ptr(obj);
    7042           0 :         PyObject *py_array;
    7043           0 :         if (object->array == NULL) {
    7044           0 :                 Py_RETURN_NONE;
    7045             :         }
    7046           0 :         if (object->array == NULL) {
    7047           0 :                 py_array = Py_None;
    7048           0 :                 Py_INCREF(py_array);
    7049             :         } else {
    7050           0 :                 py_array = PyList_New(object->count);
    7051           0 :                 if (py_array == NULL) {
    7052           0 :                         return NULL;
    7053             :                 }
    7054             :                 {
    7055             :                         int array_cntr_1;
    7056           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    7057           0 :                                 PyObject *py_array_1;
    7058           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo0_Type, object->array, &(object->array)[array_cntr_1]);
    7059           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    7060             :                         }
    7061             :                 }
    7062             :         }
    7063           0 :         return py_array;
    7064             : }
    7065             : 
    7066           0 : static int py_srvsvc_NetShareCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
    7067             : {
    7068           0 :         struct srvsvc_NetShareCtr0 *object = pytalloc_get_ptr(py_obj);
    7069           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    7070           0 :         if (value == NULL) {
    7071           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    7072           0 :                 return -1;
    7073             :         }
    7074           0 :         if (value == Py_None) {
    7075           0 :                 object->array = NULL;
    7076             :         } else {
    7077           0 :                 object->array = NULL;
    7078           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7079             :                 {
    7080           0 :                         int array_cntr_1;
    7081           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    7082           0 :                         if (!object->array) { return -1; }
    7083           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    7084           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    7085           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    7086           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    7087           0 :                                         return -1;
    7088             :                                 }
    7089           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    7090           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    7091           0 :                                         PyErr_NoMemory();
    7092           0 :                                         return -1;
    7093             :                                 }
    7094           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetShareInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    7095             :                         }
    7096             :                 }
    7097             :         }
    7098           0 :         return 0;
    7099             : }
    7100             : 
    7101             : static PyGetSetDef py_srvsvc_NetShareCtr0_getsetters[] = {
    7102             :         {
    7103             :                 .name = discard_const_p(char, "count"),
    7104             :                 .get = py_srvsvc_NetShareCtr0_get_count,
    7105             :                 .set = py_srvsvc_NetShareCtr0_set_count,
    7106             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7107             :         },
    7108             :         {
    7109             :                 .name = discard_const_p(char, "array"),
    7110             :                 .get = py_srvsvc_NetShareCtr0_get_array,
    7111             :                 .set = py_srvsvc_NetShareCtr0_set_array,
    7112             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo0")
    7113             :         },
    7114             :         { .name = NULL }
    7115             : };
    7116             : 
    7117           0 : static PyObject *py_srvsvc_NetShareCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7118             : {
    7119           0 :         return pytalloc_new(struct srvsvc_NetShareCtr0, type);
    7120             : }
    7121             : 
    7122             : 
    7123             : static PyTypeObject srvsvc_NetShareCtr0_Type = {
    7124             :         PyVarObject_HEAD_INIT(NULL, 0)
    7125             :         .tp_name = "srvsvc.NetShareCtr0",
    7126             :         .tp_getset = py_srvsvc_NetShareCtr0_getsetters,
    7127             :         .tp_methods = NULL,
    7128             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7129             :         .tp_new = py_srvsvc_NetShareCtr0_new,
    7130             : };
    7131             : 
    7132             : 
    7133           0 : static PyObject *py_srvsvc_NetShareInfo1_get_name(PyObject *obj, void *closure)
    7134             : {
    7135           0 :         struct srvsvc_NetShareInfo1 *object = pytalloc_get_ptr(obj);
    7136           0 :         PyObject *py_name;
    7137           0 :         if (object->name == NULL) {
    7138           0 :                 Py_RETURN_NONE;
    7139             :         }
    7140           0 :         if (object->name == NULL) {
    7141           0 :                 py_name = Py_None;
    7142           0 :                 Py_INCREF(py_name);
    7143             :         } else {
    7144           0 :                 if (object->name == NULL) {
    7145           0 :                         py_name = Py_None;
    7146           0 :                         Py_INCREF(py_name);
    7147             :                 } else {
    7148           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    7149             :                 }
    7150             :         }
    7151           0 :         return py_name;
    7152             : }
    7153             : 
    7154           0 : static int py_srvsvc_NetShareInfo1_set_name(PyObject *py_obj, PyObject *value, void *closure)
    7155             : {
    7156           0 :         struct srvsvc_NetShareInfo1 *object = pytalloc_get_ptr(py_obj);
    7157           0 :         if (value == NULL) {
    7158           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->name");
    7159           0 :                 return -1;
    7160             :         }
    7161           0 :         if (value == Py_None) {
    7162           0 :                 object->name = NULL;
    7163             :         } else {
    7164           0 :                 object->name = NULL;
    7165             :                 {
    7166           0 :                         const char *test_str;
    7167           0 :                         const char *talloc_str;
    7168           0 :                         PyObject *unicode = NULL;
    7169           0 :                         if (PyUnicode_Check(value)) {
    7170           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7171           0 :                                 if (unicode == NULL) {
    7172           0 :                                         return -1;
    7173             :                                 }
    7174           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7175           0 :                         } else if (PyBytes_Check(value)) {
    7176           0 :                                 test_str = PyBytes_AS_STRING(value);
    7177             :                         } else {
    7178           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7179           0 :                                 return -1;
    7180             :                         }
    7181           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7182           0 :                         if (unicode != NULL) {
    7183           0 :                                 Py_DECREF(unicode);
    7184             :                         }
    7185           0 :                         if (talloc_str == NULL) {
    7186           0 :                                 PyErr_NoMemory();
    7187           0 :                                 return -1;
    7188             :                         }
    7189           0 :                         object->name = talloc_str;
    7190             :                 }
    7191             :         }
    7192           0 :         return 0;
    7193             : }
    7194             : 
    7195           0 : static PyObject *py_srvsvc_NetShareInfo1_get_type(PyObject *obj, void *closure)
    7196             : {
    7197           0 :         struct srvsvc_NetShareInfo1 *object = pytalloc_get_ptr(obj);
    7198           0 :         PyObject *py_type;
    7199           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)(object->type));
    7200           0 :         return py_type;
    7201             : }
    7202             : 
    7203           0 : static int py_srvsvc_NetShareInfo1_set_type(PyObject *py_obj, PyObject *value, void *closure)
    7204             : {
    7205           0 :         struct srvsvc_NetShareInfo1 *object = pytalloc_get_ptr(py_obj);
    7206           0 :         if (value == NULL) {
    7207           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->type");
    7208           0 :                 return -1;
    7209             :         }
    7210             :         {
    7211           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
    7212           0 :                 if (PyLong_Check(value)) {
    7213           0 :                         unsigned long long test_var;
    7214           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7215           0 :                         if (PyErr_Occurred() != NULL) {
    7216           0 :                                 return -1;
    7217             :                         }
    7218           0 :                         if (test_var > uint_max) {
    7219           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7220             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7221           0 :                                 return -1;
    7222             :                         }
    7223           0 :                         object->type = test_var;
    7224             :                 } else {
    7225           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7226             :                           PyLong_Type.tp_name);
    7227           0 :                         return -1;
    7228             :                 }
    7229             :         }
    7230           0 :         return 0;
    7231             : }
    7232             : 
    7233           0 : static PyObject *py_srvsvc_NetShareInfo1_get_comment(PyObject *obj, void *closure)
    7234             : {
    7235           0 :         struct srvsvc_NetShareInfo1 *object = pytalloc_get_ptr(obj);
    7236           0 :         PyObject *py_comment;
    7237           0 :         if (object->comment == NULL) {
    7238           0 :                 Py_RETURN_NONE;
    7239             :         }
    7240           0 :         if (object->comment == NULL) {
    7241           0 :                 py_comment = Py_None;
    7242           0 :                 Py_INCREF(py_comment);
    7243             :         } else {
    7244           0 :                 if (object->comment == NULL) {
    7245           0 :                         py_comment = Py_None;
    7246           0 :                         Py_INCREF(py_comment);
    7247             :                 } else {
    7248           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
    7249             :                 }
    7250             :         }
    7251           0 :         return py_comment;
    7252             : }
    7253             : 
    7254           0 : static int py_srvsvc_NetShareInfo1_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    7255             : {
    7256           0 :         struct srvsvc_NetShareInfo1 *object = pytalloc_get_ptr(py_obj);
    7257           0 :         if (value == NULL) {
    7258           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
    7259           0 :                 return -1;
    7260             :         }
    7261           0 :         if (value == Py_None) {
    7262           0 :                 object->comment = NULL;
    7263             :         } else {
    7264           0 :                 object->comment = NULL;
    7265             :                 {
    7266           0 :                         const char *test_str;
    7267           0 :                         const char *talloc_str;
    7268           0 :                         PyObject *unicode = NULL;
    7269           0 :                         if (PyUnicode_Check(value)) {
    7270           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7271           0 :                                 if (unicode == NULL) {
    7272           0 :                                         return -1;
    7273             :                                 }
    7274           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7275           0 :                         } else if (PyBytes_Check(value)) {
    7276           0 :                                 test_str = PyBytes_AS_STRING(value);
    7277             :                         } else {
    7278           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7279           0 :                                 return -1;
    7280             :                         }
    7281           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7282           0 :                         if (unicode != NULL) {
    7283           0 :                                 Py_DECREF(unicode);
    7284             :                         }
    7285           0 :                         if (talloc_str == NULL) {
    7286           0 :                                 PyErr_NoMemory();
    7287           0 :                                 return -1;
    7288             :                         }
    7289           0 :                         object->comment = talloc_str;
    7290             :                 }
    7291             :         }
    7292           0 :         return 0;
    7293             : }
    7294             : 
    7295             : static PyGetSetDef py_srvsvc_NetShareInfo1_getsetters[] = {
    7296             :         {
    7297             :                 .name = discard_const_p(char, "name"),
    7298             :                 .get = py_srvsvc_NetShareInfo1_get_name,
    7299             :                 .set = py_srvsvc_NetShareInfo1_set_name,
    7300             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7301             :         },
    7302             :         {
    7303             :                 .name = discard_const_p(char, "type"),
    7304             :                 .get = py_srvsvc_NetShareInfo1_get_type,
    7305             :                 .set = py_srvsvc_NetShareInfo1_set_type,
    7306             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_ShareType")
    7307             :         },
    7308             :         {
    7309             :                 .name = discard_const_p(char, "comment"),
    7310             :                 .get = py_srvsvc_NetShareInfo1_get_comment,
    7311             :                 .set = py_srvsvc_NetShareInfo1_set_comment,
    7312             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7313             :         },
    7314             :         { .name = NULL }
    7315             : };
    7316             : 
    7317           0 : static PyObject *py_srvsvc_NetShareInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7318             : {
    7319           0 :         return pytalloc_new(struct srvsvc_NetShareInfo1, type);
    7320             : }
    7321             : 
    7322             : 
    7323             : static PyTypeObject srvsvc_NetShareInfo1_Type = {
    7324             :         PyVarObject_HEAD_INIT(NULL, 0)
    7325             :         .tp_name = "srvsvc.NetShareInfo1",
    7326             :         .tp_getset = py_srvsvc_NetShareInfo1_getsetters,
    7327             :         .tp_methods = NULL,
    7328             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7329             :         .tp_new = py_srvsvc_NetShareInfo1_new,
    7330             : };
    7331             : 
    7332             : 
    7333           0 : static PyObject *py_srvsvc_NetShareCtr1_get_count(PyObject *obj, void *closure)
    7334             : {
    7335           0 :         struct srvsvc_NetShareCtr1 *object = pytalloc_get_ptr(obj);
    7336           0 :         PyObject *py_count;
    7337           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    7338           0 :         return py_count;
    7339             : }
    7340             : 
    7341           0 : static int py_srvsvc_NetShareCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
    7342             : {
    7343           0 :         struct srvsvc_NetShareCtr1 *object = pytalloc_get_ptr(py_obj);
    7344           0 :         if (value == NULL) {
    7345           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    7346           0 :                 return -1;
    7347             :         }
    7348             :         {
    7349           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    7350           0 :                 if (PyLong_Check(value)) {
    7351           0 :                         unsigned long long test_var;
    7352           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7353           0 :                         if (PyErr_Occurred() != NULL) {
    7354           0 :                                 return -1;
    7355             :                         }
    7356           0 :                         if (test_var > uint_max) {
    7357           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7358             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7359           0 :                                 return -1;
    7360             :                         }
    7361           0 :                         object->count = test_var;
    7362             :                 } else {
    7363           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7364             :                           PyLong_Type.tp_name);
    7365           0 :                         return -1;
    7366             :                 }
    7367             :         }
    7368           0 :         return 0;
    7369             : }
    7370             : 
    7371           0 : static PyObject *py_srvsvc_NetShareCtr1_get_array(PyObject *obj, void *closure)
    7372             : {
    7373           0 :         struct srvsvc_NetShareCtr1 *object = pytalloc_get_ptr(obj);
    7374           0 :         PyObject *py_array;
    7375           0 :         if (object->array == NULL) {
    7376           0 :                 Py_RETURN_NONE;
    7377             :         }
    7378           0 :         if (object->array == NULL) {
    7379           0 :                 py_array = Py_None;
    7380           0 :                 Py_INCREF(py_array);
    7381             :         } else {
    7382           0 :                 py_array = PyList_New(object->count);
    7383           0 :                 if (py_array == NULL) {
    7384           0 :                         return NULL;
    7385             :                 }
    7386             :                 {
    7387             :                         int array_cntr_1;
    7388           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    7389           0 :                                 PyObject *py_array_1;
    7390           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1_Type, object->array, &(object->array)[array_cntr_1]);
    7391           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    7392             :                         }
    7393             :                 }
    7394             :         }
    7395           0 :         return py_array;
    7396             : }
    7397             : 
    7398           0 : static int py_srvsvc_NetShareCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
    7399             : {
    7400           0 :         struct srvsvc_NetShareCtr1 *object = pytalloc_get_ptr(py_obj);
    7401           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    7402           0 :         if (value == NULL) {
    7403           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    7404           0 :                 return -1;
    7405             :         }
    7406           0 :         if (value == Py_None) {
    7407           0 :                 object->array = NULL;
    7408             :         } else {
    7409           0 :                 object->array = NULL;
    7410           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7411             :                 {
    7412           0 :                         int array_cntr_1;
    7413           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    7414           0 :                         if (!object->array) { return -1; }
    7415           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    7416           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    7417           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    7418           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    7419           0 :                                         return -1;
    7420             :                                 }
    7421           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    7422           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    7423           0 :                                         PyErr_NoMemory();
    7424           0 :                                         return -1;
    7425             :                                 }
    7426           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    7427             :                         }
    7428             :                 }
    7429             :         }
    7430           0 :         return 0;
    7431             : }
    7432             : 
    7433             : static PyGetSetDef py_srvsvc_NetShareCtr1_getsetters[] = {
    7434             :         {
    7435             :                 .name = discard_const_p(char, "count"),
    7436             :                 .get = py_srvsvc_NetShareCtr1_get_count,
    7437             :                 .set = py_srvsvc_NetShareCtr1_set_count,
    7438             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7439             :         },
    7440             :         {
    7441             :                 .name = discard_const_p(char, "array"),
    7442             :                 .get = py_srvsvc_NetShareCtr1_get_array,
    7443             :                 .set = py_srvsvc_NetShareCtr1_set_array,
    7444             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo1")
    7445             :         },
    7446             :         { .name = NULL }
    7447             : };
    7448             : 
    7449           0 : static PyObject *py_srvsvc_NetShareCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7450             : {
    7451           0 :         return pytalloc_new(struct srvsvc_NetShareCtr1, type);
    7452             : }
    7453             : 
    7454             : 
    7455             : static PyTypeObject srvsvc_NetShareCtr1_Type = {
    7456             :         PyVarObject_HEAD_INIT(NULL, 0)
    7457             :         .tp_name = "srvsvc.NetShareCtr1",
    7458             :         .tp_getset = py_srvsvc_NetShareCtr1_getsetters,
    7459             :         .tp_methods = NULL,
    7460             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7461             :         .tp_new = py_srvsvc_NetShareCtr1_new,
    7462             : };
    7463             : 
    7464             : 
    7465           0 : static PyObject *py_srvsvc_NetShareInfo2_get_name(PyObject *obj, void *closure)
    7466             : {
    7467           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(obj);
    7468           0 :         PyObject *py_name;
    7469           0 :         if (object->name == NULL) {
    7470           0 :                 Py_RETURN_NONE;
    7471             :         }
    7472           0 :         if (object->name == NULL) {
    7473           0 :                 py_name = Py_None;
    7474           0 :                 Py_INCREF(py_name);
    7475             :         } else {
    7476           0 :                 if (object->name == NULL) {
    7477           0 :                         py_name = Py_None;
    7478           0 :                         Py_INCREF(py_name);
    7479             :                 } else {
    7480           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    7481             :                 }
    7482             :         }
    7483           0 :         return py_name;
    7484             : }
    7485             : 
    7486           0 : static int py_srvsvc_NetShareInfo2_set_name(PyObject *py_obj, PyObject *value, void *closure)
    7487             : {
    7488           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(py_obj);
    7489           0 :         if (value == NULL) {
    7490           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->name");
    7491           0 :                 return -1;
    7492             :         }
    7493           0 :         if (value == Py_None) {
    7494           0 :                 object->name = NULL;
    7495             :         } else {
    7496           0 :                 object->name = NULL;
    7497             :                 {
    7498           0 :                         const char *test_str;
    7499           0 :                         const char *talloc_str;
    7500           0 :                         PyObject *unicode = NULL;
    7501           0 :                         if (PyUnicode_Check(value)) {
    7502           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7503           0 :                                 if (unicode == NULL) {
    7504           0 :                                         return -1;
    7505             :                                 }
    7506           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7507           0 :                         } else if (PyBytes_Check(value)) {
    7508           0 :                                 test_str = PyBytes_AS_STRING(value);
    7509             :                         } else {
    7510           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7511           0 :                                 return -1;
    7512             :                         }
    7513           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7514           0 :                         if (unicode != NULL) {
    7515           0 :                                 Py_DECREF(unicode);
    7516             :                         }
    7517           0 :                         if (talloc_str == NULL) {
    7518           0 :                                 PyErr_NoMemory();
    7519           0 :                                 return -1;
    7520             :                         }
    7521           0 :                         object->name = talloc_str;
    7522             :                 }
    7523             :         }
    7524           0 :         return 0;
    7525             : }
    7526             : 
    7527           0 : static PyObject *py_srvsvc_NetShareInfo2_get_type(PyObject *obj, void *closure)
    7528             : {
    7529           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(obj);
    7530           0 :         PyObject *py_type;
    7531           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)(object->type));
    7532           0 :         return py_type;
    7533             : }
    7534             : 
    7535           0 : static int py_srvsvc_NetShareInfo2_set_type(PyObject *py_obj, PyObject *value, void *closure)
    7536             : {
    7537           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(py_obj);
    7538           0 :         if (value == NULL) {
    7539           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->type");
    7540           0 :                 return -1;
    7541             :         }
    7542             :         {
    7543           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
    7544           0 :                 if (PyLong_Check(value)) {
    7545           0 :                         unsigned long long test_var;
    7546           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7547           0 :                         if (PyErr_Occurred() != NULL) {
    7548           0 :                                 return -1;
    7549             :                         }
    7550           0 :                         if (test_var > uint_max) {
    7551           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7552             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7553           0 :                                 return -1;
    7554             :                         }
    7555           0 :                         object->type = test_var;
    7556             :                 } else {
    7557           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7558             :                           PyLong_Type.tp_name);
    7559           0 :                         return -1;
    7560             :                 }
    7561             :         }
    7562           0 :         return 0;
    7563             : }
    7564             : 
    7565           0 : static PyObject *py_srvsvc_NetShareInfo2_get_comment(PyObject *obj, void *closure)
    7566             : {
    7567           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(obj);
    7568           0 :         PyObject *py_comment;
    7569           0 :         if (object->comment == NULL) {
    7570           0 :                 Py_RETURN_NONE;
    7571             :         }
    7572           0 :         if (object->comment == NULL) {
    7573           0 :                 py_comment = Py_None;
    7574           0 :                 Py_INCREF(py_comment);
    7575             :         } else {
    7576           0 :                 if (object->comment == NULL) {
    7577           0 :                         py_comment = Py_None;
    7578           0 :                         Py_INCREF(py_comment);
    7579             :                 } else {
    7580           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
    7581             :                 }
    7582             :         }
    7583           0 :         return py_comment;
    7584             : }
    7585             : 
    7586           0 : static int py_srvsvc_NetShareInfo2_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    7587             : {
    7588           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(py_obj);
    7589           0 :         if (value == NULL) {
    7590           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
    7591           0 :                 return -1;
    7592             :         }
    7593           0 :         if (value == Py_None) {
    7594           0 :                 object->comment = NULL;
    7595             :         } else {
    7596           0 :                 object->comment = NULL;
    7597             :                 {
    7598           0 :                         const char *test_str;
    7599           0 :                         const char *talloc_str;
    7600           0 :                         PyObject *unicode = NULL;
    7601           0 :                         if (PyUnicode_Check(value)) {
    7602           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7603           0 :                                 if (unicode == NULL) {
    7604           0 :                                         return -1;
    7605             :                                 }
    7606           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7607           0 :                         } else if (PyBytes_Check(value)) {
    7608           0 :                                 test_str = PyBytes_AS_STRING(value);
    7609             :                         } else {
    7610           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7611           0 :                                 return -1;
    7612             :                         }
    7613           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7614           0 :                         if (unicode != NULL) {
    7615           0 :                                 Py_DECREF(unicode);
    7616             :                         }
    7617           0 :                         if (talloc_str == NULL) {
    7618           0 :                                 PyErr_NoMemory();
    7619           0 :                                 return -1;
    7620             :                         }
    7621           0 :                         object->comment = talloc_str;
    7622             :                 }
    7623             :         }
    7624           0 :         return 0;
    7625             : }
    7626             : 
    7627           0 : static PyObject *py_srvsvc_NetShareInfo2_get_permissions(PyObject *obj, void *closure)
    7628             : {
    7629           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(obj);
    7630           0 :         PyObject *py_permissions;
    7631           0 :         py_permissions = PyLong_FromUnsignedLongLong((uint32_t)(object->permissions));
    7632           0 :         return py_permissions;
    7633             : }
    7634             : 
    7635           0 : static int py_srvsvc_NetShareInfo2_set_permissions(PyObject *py_obj, PyObject *value, void *closure)
    7636             : {
    7637           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(py_obj);
    7638           0 :         if (value == NULL) {
    7639           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->permissions");
    7640           0 :                 return -1;
    7641             :         }
    7642             :         {
    7643           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permissions));
    7644           0 :                 if (PyLong_Check(value)) {
    7645           0 :                         unsigned long long test_var;
    7646           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7647           0 :                         if (PyErr_Occurred() != NULL) {
    7648           0 :                                 return -1;
    7649             :                         }
    7650           0 :                         if (test_var > uint_max) {
    7651           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7652             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7653           0 :                                 return -1;
    7654             :                         }
    7655           0 :                         object->permissions = test_var;
    7656             :                 } else {
    7657           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7658             :                           PyLong_Type.tp_name);
    7659           0 :                         return -1;
    7660             :                 }
    7661             :         }
    7662           0 :         return 0;
    7663             : }
    7664             : 
    7665           0 : static PyObject *py_srvsvc_NetShareInfo2_get_max_users(PyObject *obj, void *closure)
    7666             : {
    7667           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(obj);
    7668           0 :         PyObject *py_max_users;
    7669           0 :         py_max_users = PyLong_FromUnsignedLongLong((uint32_t)(object->max_users));
    7670           0 :         return py_max_users;
    7671             : }
    7672             : 
    7673           0 : static int py_srvsvc_NetShareInfo2_set_max_users(PyObject *py_obj, PyObject *value, void *closure)
    7674             : {
    7675           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(py_obj);
    7676           0 :         if (value == NULL) {
    7677           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->max_users");
    7678           0 :                 return -1;
    7679             :         }
    7680             :         {
    7681           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_users));
    7682           0 :                 if (PyLong_Check(value)) {
    7683           0 :                         unsigned long long test_var;
    7684           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7685           0 :                         if (PyErr_Occurred() != NULL) {
    7686           0 :                                 return -1;
    7687             :                         }
    7688           0 :                         if (test_var > uint_max) {
    7689           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7690             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7691           0 :                                 return -1;
    7692             :                         }
    7693           0 :                         object->max_users = test_var;
    7694             :                 } else {
    7695           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7696             :                           PyLong_Type.tp_name);
    7697           0 :                         return -1;
    7698             :                 }
    7699             :         }
    7700           0 :         return 0;
    7701             : }
    7702             : 
    7703           0 : static PyObject *py_srvsvc_NetShareInfo2_get_current_users(PyObject *obj, void *closure)
    7704             : {
    7705           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(obj);
    7706           0 :         PyObject *py_current_users;
    7707           0 :         py_current_users = PyLong_FromUnsignedLongLong((uint32_t)(object->current_users));
    7708           0 :         return py_current_users;
    7709             : }
    7710             : 
    7711           0 : static int py_srvsvc_NetShareInfo2_set_current_users(PyObject *py_obj, PyObject *value, void *closure)
    7712             : {
    7713           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(py_obj);
    7714           0 :         if (value == NULL) {
    7715           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->current_users");
    7716           0 :                 return -1;
    7717             :         }
    7718             :         {
    7719           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_users));
    7720           0 :                 if (PyLong_Check(value)) {
    7721           0 :                         unsigned long long test_var;
    7722           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7723           0 :                         if (PyErr_Occurred() != NULL) {
    7724           0 :                                 return -1;
    7725             :                         }
    7726           0 :                         if (test_var > uint_max) {
    7727           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7728             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7729           0 :                                 return -1;
    7730             :                         }
    7731           0 :                         object->current_users = test_var;
    7732             :                 } else {
    7733           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7734             :                           PyLong_Type.tp_name);
    7735           0 :                         return -1;
    7736             :                 }
    7737             :         }
    7738           0 :         return 0;
    7739             : }
    7740             : 
    7741           0 : static PyObject *py_srvsvc_NetShareInfo2_get_path(PyObject *obj, void *closure)
    7742             : {
    7743           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(obj);
    7744           0 :         PyObject *py_path;
    7745           0 :         if (object->path == NULL) {
    7746           0 :                 Py_RETURN_NONE;
    7747             :         }
    7748           0 :         if (object->path == NULL) {
    7749           0 :                 py_path = Py_None;
    7750           0 :                 Py_INCREF(py_path);
    7751             :         } else {
    7752           0 :                 if (object->path == NULL) {
    7753           0 :                         py_path = Py_None;
    7754           0 :                         Py_INCREF(py_path);
    7755             :                 } else {
    7756           0 :                         py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
    7757             :                 }
    7758             :         }
    7759           0 :         return py_path;
    7760             : }
    7761             : 
    7762           0 : static int py_srvsvc_NetShareInfo2_set_path(PyObject *py_obj, PyObject *value, void *closure)
    7763             : {
    7764           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(py_obj);
    7765           0 :         if (value == NULL) {
    7766           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->path");
    7767           0 :                 return -1;
    7768             :         }
    7769           0 :         if (value == Py_None) {
    7770           0 :                 object->path = NULL;
    7771             :         } else {
    7772           0 :                 object->path = NULL;
    7773             :                 {
    7774           0 :                         const char *test_str;
    7775           0 :                         const char *talloc_str;
    7776           0 :                         PyObject *unicode = NULL;
    7777           0 :                         if (PyUnicode_Check(value)) {
    7778           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7779           0 :                                 if (unicode == NULL) {
    7780           0 :                                         return -1;
    7781             :                                 }
    7782           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7783           0 :                         } else if (PyBytes_Check(value)) {
    7784           0 :                                 test_str = PyBytes_AS_STRING(value);
    7785             :                         } else {
    7786           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7787           0 :                                 return -1;
    7788             :                         }
    7789           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7790           0 :                         if (unicode != NULL) {
    7791           0 :                                 Py_DECREF(unicode);
    7792             :                         }
    7793           0 :                         if (talloc_str == NULL) {
    7794           0 :                                 PyErr_NoMemory();
    7795           0 :                                 return -1;
    7796             :                         }
    7797           0 :                         object->path = talloc_str;
    7798             :                 }
    7799             :         }
    7800           0 :         return 0;
    7801             : }
    7802             : 
    7803           0 : static PyObject *py_srvsvc_NetShareInfo2_get_password(PyObject *obj, void *closure)
    7804             : {
    7805           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(obj);
    7806           0 :         PyObject *py_password;
    7807           0 :         if (object->password == NULL) {
    7808           0 :                 Py_RETURN_NONE;
    7809             :         }
    7810           0 :         if (object->password == NULL) {
    7811           0 :                 py_password = Py_None;
    7812           0 :                 Py_INCREF(py_password);
    7813             :         } else {
    7814           0 :                 if (object->password == NULL) {
    7815           0 :                         py_password = Py_None;
    7816           0 :                         Py_INCREF(py_password);
    7817             :                 } else {
    7818           0 :                         py_password = PyUnicode_Decode(object->password, strlen(object->password), "utf-8", "ignore");
    7819             :                 }
    7820             :         }
    7821           0 :         return py_password;
    7822             : }
    7823             : 
    7824           0 : static int py_srvsvc_NetShareInfo2_set_password(PyObject *py_obj, PyObject *value, void *closure)
    7825             : {
    7826           0 :         struct srvsvc_NetShareInfo2 *object = pytalloc_get_ptr(py_obj);
    7827           0 :         if (value == NULL) {
    7828           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->password");
    7829           0 :                 return -1;
    7830             :         }
    7831           0 :         if (value == Py_None) {
    7832           0 :                 object->password = NULL;
    7833             :         } else {
    7834           0 :                 object->password = NULL;
    7835             :                 {
    7836           0 :                         const char *test_str;
    7837           0 :                         const char *talloc_str;
    7838           0 :                         PyObject *unicode = NULL;
    7839           0 :                         if (PyUnicode_Check(value)) {
    7840           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7841           0 :                                 if (unicode == NULL) {
    7842           0 :                                         return -1;
    7843             :                                 }
    7844           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7845           0 :                         } else if (PyBytes_Check(value)) {
    7846           0 :                                 test_str = PyBytes_AS_STRING(value);
    7847             :                         } else {
    7848           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7849           0 :                                 return -1;
    7850             :                         }
    7851           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7852           0 :                         if (unicode != NULL) {
    7853           0 :                                 Py_DECREF(unicode);
    7854             :                         }
    7855           0 :                         if (talloc_str == NULL) {
    7856           0 :                                 PyErr_NoMemory();
    7857           0 :                                 return -1;
    7858             :                         }
    7859           0 :                         object->password = talloc_str;
    7860             :                 }
    7861             :         }
    7862           0 :         return 0;
    7863             : }
    7864             : 
    7865             : static PyGetSetDef py_srvsvc_NetShareInfo2_getsetters[] = {
    7866             :         {
    7867             :                 .name = discard_const_p(char, "name"),
    7868             :                 .get = py_srvsvc_NetShareInfo2_get_name,
    7869             :                 .set = py_srvsvc_NetShareInfo2_set_name,
    7870             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7871             :         },
    7872             :         {
    7873             :                 .name = discard_const_p(char, "type"),
    7874             :                 .get = py_srvsvc_NetShareInfo2_get_type,
    7875             :                 .set = py_srvsvc_NetShareInfo2_set_type,
    7876             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_ShareType")
    7877             :         },
    7878             :         {
    7879             :                 .name = discard_const_p(char, "comment"),
    7880             :                 .get = py_srvsvc_NetShareInfo2_get_comment,
    7881             :                 .set = py_srvsvc_NetShareInfo2_set_comment,
    7882             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7883             :         },
    7884             :         {
    7885             :                 .name = discard_const_p(char, "permissions"),
    7886             :                 .get = py_srvsvc_NetShareInfo2_get_permissions,
    7887             :                 .set = py_srvsvc_NetShareInfo2_set_permissions,
    7888             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7889             :         },
    7890             :         {
    7891             :                 .name = discard_const_p(char, "max_users"),
    7892             :                 .get = py_srvsvc_NetShareInfo2_get_max_users,
    7893             :                 .set = py_srvsvc_NetShareInfo2_set_max_users,
    7894             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7895             :         },
    7896             :         {
    7897             :                 .name = discard_const_p(char, "current_users"),
    7898             :                 .get = py_srvsvc_NetShareInfo2_get_current_users,
    7899             :                 .set = py_srvsvc_NetShareInfo2_set_current_users,
    7900             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7901             :         },
    7902             :         {
    7903             :                 .name = discard_const_p(char, "path"),
    7904             :                 .get = py_srvsvc_NetShareInfo2_get_path,
    7905             :                 .set = py_srvsvc_NetShareInfo2_set_path,
    7906             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7907             :         },
    7908             :         {
    7909             :                 .name = discard_const_p(char, "password"),
    7910             :                 .get = py_srvsvc_NetShareInfo2_get_password,
    7911             :                 .set = py_srvsvc_NetShareInfo2_set_password,
    7912             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7913             :         },
    7914             :         { .name = NULL }
    7915             : };
    7916             : 
    7917           0 : static PyObject *py_srvsvc_NetShareInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7918             : {
    7919           0 :         return pytalloc_new(struct srvsvc_NetShareInfo2, type);
    7920             : }
    7921             : 
    7922             : 
    7923             : static PyTypeObject srvsvc_NetShareInfo2_Type = {
    7924             :         PyVarObject_HEAD_INIT(NULL, 0)
    7925             :         .tp_name = "srvsvc.NetShareInfo2",
    7926             :         .tp_getset = py_srvsvc_NetShareInfo2_getsetters,
    7927             :         .tp_methods = NULL,
    7928             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7929             :         .tp_new = py_srvsvc_NetShareInfo2_new,
    7930             : };
    7931             : 
    7932             : 
    7933           0 : static PyObject *py_srvsvc_NetShareCtr2_get_count(PyObject *obj, void *closure)
    7934             : {
    7935           0 :         struct srvsvc_NetShareCtr2 *object = pytalloc_get_ptr(obj);
    7936           0 :         PyObject *py_count;
    7937           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    7938           0 :         return py_count;
    7939             : }
    7940             : 
    7941           0 : static int py_srvsvc_NetShareCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
    7942             : {
    7943           0 :         struct srvsvc_NetShareCtr2 *object = pytalloc_get_ptr(py_obj);
    7944           0 :         if (value == NULL) {
    7945           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    7946           0 :                 return -1;
    7947             :         }
    7948             :         {
    7949           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    7950           0 :                 if (PyLong_Check(value)) {
    7951           0 :                         unsigned long long test_var;
    7952           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7953           0 :                         if (PyErr_Occurred() != NULL) {
    7954           0 :                                 return -1;
    7955             :                         }
    7956           0 :                         if (test_var > uint_max) {
    7957           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7958             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7959           0 :                                 return -1;
    7960             :                         }
    7961           0 :                         object->count = test_var;
    7962             :                 } else {
    7963           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7964             :                           PyLong_Type.tp_name);
    7965           0 :                         return -1;
    7966             :                 }
    7967             :         }
    7968           0 :         return 0;
    7969             : }
    7970             : 
    7971           0 : static PyObject *py_srvsvc_NetShareCtr2_get_array(PyObject *obj, void *closure)
    7972             : {
    7973           0 :         struct srvsvc_NetShareCtr2 *object = pytalloc_get_ptr(obj);
    7974           0 :         PyObject *py_array;
    7975           0 :         if (object->array == NULL) {
    7976           0 :                 Py_RETURN_NONE;
    7977             :         }
    7978           0 :         if (object->array == NULL) {
    7979           0 :                 py_array = Py_None;
    7980           0 :                 Py_INCREF(py_array);
    7981             :         } else {
    7982           0 :                 py_array = PyList_New(object->count);
    7983           0 :                 if (py_array == NULL) {
    7984           0 :                         return NULL;
    7985             :                 }
    7986             :                 {
    7987             :                         int array_cntr_1;
    7988           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    7989           0 :                                 PyObject *py_array_1;
    7990           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo2_Type, object->array, &(object->array)[array_cntr_1]);
    7991           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    7992             :                         }
    7993             :                 }
    7994             :         }
    7995           0 :         return py_array;
    7996             : }
    7997             : 
    7998           0 : static int py_srvsvc_NetShareCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
    7999             : {
    8000           0 :         struct srvsvc_NetShareCtr2 *object = pytalloc_get_ptr(py_obj);
    8001           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    8002           0 :         if (value == NULL) {
    8003           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    8004           0 :                 return -1;
    8005             :         }
    8006           0 :         if (value == Py_None) {
    8007           0 :                 object->array = NULL;
    8008             :         } else {
    8009           0 :                 object->array = NULL;
    8010           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    8011             :                 {
    8012           0 :                         int array_cntr_1;
    8013           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    8014           0 :                         if (!object->array) { return -1; }
    8015           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    8016           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    8017           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    8018           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    8019           0 :                                         return -1;
    8020             :                                 }
    8021           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    8022           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    8023           0 :                                         PyErr_NoMemory();
    8024           0 :                                         return -1;
    8025             :                                 }
    8026           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    8027             :                         }
    8028             :                 }
    8029             :         }
    8030           0 :         return 0;
    8031             : }
    8032             : 
    8033             : static PyGetSetDef py_srvsvc_NetShareCtr2_getsetters[] = {
    8034             :         {
    8035             :                 .name = discard_const_p(char, "count"),
    8036             :                 .get = py_srvsvc_NetShareCtr2_get_count,
    8037             :                 .set = py_srvsvc_NetShareCtr2_set_count,
    8038             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8039             :         },
    8040             :         {
    8041             :                 .name = discard_const_p(char, "array"),
    8042             :                 .get = py_srvsvc_NetShareCtr2_get_array,
    8043             :                 .set = py_srvsvc_NetShareCtr2_set_array,
    8044             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo2")
    8045             :         },
    8046             :         { .name = NULL }
    8047             : };
    8048             : 
    8049           0 : static PyObject *py_srvsvc_NetShareCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8050             : {
    8051           0 :         return pytalloc_new(struct srvsvc_NetShareCtr2, type);
    8052             : }
    8053             : 
    8054             : 
    8055             : static PyTypeObject srvsvc_NetShareCtr2_Type = {
    8056             :         PyVarObject_HEAD_INIT(NULL, 0)
    8057             :         .tp_name = "srvsvc.NetShareCtr2",
    8058             :         .tp_getset = py_srvsvc_NetShareCtr2_getsetters,
    8059             :         .tp_methods = NULL,
    8060             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8061             :         .tp_new = py_srvsvc_NetShareCtr2_new,
    8062             : };
    8063             : 
    8064             : 
    8065           0 : static PyObject *py_srvsvc_NetShareInfo501_get_name(PyObject *obj, void *closure)
    8066             : {
    8067           0 :         struct srvsvc_NetShareInfo501 *object = pytalloc_get_ptr(obj);
    8068           0 :         PyObject *py_name;
    8069           0 :         if (object->name == NULL) {
    8070           0 :                 Py_RETURN_NONE;
    8071             :         }
    8072           0 :         if (object->name == NULL) {
    8073           0 :                 py_name = Py_None;
    8074           0 :                 Py_INCREF(py_name);
    8075             :         } else {
    8076           0 :                 if (object->name == NULL) {
    8077           0 :                         py_name = Py_None;
    8078           0 :                         Py_INCREF(py_name);
    8079             :                 } else {
    8080           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    8081             :                 }
    8082             :         }
    8083           0 :         return py_name;
    8084             : }
    8085             : 
    8086           0 : static int py_srvsvc_NetShareInfo501_set_name(PyObject *py_obj, PyObject *value, void *closure)
    8087             : {
    8088           0 :         struct srvsvc_NetShareInfo501 *object = pytalloc_get_ptr(py_obj);
    8089           0 :         if (value == NULL) {
    8090           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->name");
    8091           0 :                 return -1;
    8092             :         }
    8093           0 :         if (value == Py_None) {
    8094           0 :                 object->name = NULL;
    8095             :         } else {
    8096           0 :                 object->name = NULL;
    8097             :                 {
    8098           0 :                         const char *test_str;
    8099           0 :                         const char *talloc_str;
    8100           0 :                         PyObject *unicode = NULL;
    8101           0 :                         if (PyUnicode_Check(value)) {
    8102           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    8103           0 :                                 if (unicode == NULL) {
    8104           0 :                                         return -1;
    8105             :                                 }
    8106           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    8107           0 :                         } else if (PyBytes_Check(value)) {
    8108           0 :                                 test_str = PyBytes_AS_STRING(value);
    8109             :                         } else {
    8110           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    8111           0 :                                 return -1;
    8112             :                         }
    8113           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    8114           0 :                         if (unicode != NULL) {
    8115           0 :                                 Py_DECREF(unicode);
    8116             :                         }
    8117           0 :                         if (talloc_str == NULL) {
    8118           0 :                                 PyErr_NoMemory();
    8119           0 :                                 return -1;
    8120             :                         }
    8121           0 :                         object->name = talloc_str;
    8122             :                 }
    8123             :         }
    8124           0 :         return 0;
    8125             : }
    8126             : 
    8127           0 : static PyObject *py_srvsvc_NetShareInfo501_get_type(PyObject *obj, void *closure)
    8128             : {
    8129           0 :         struct srvsvc_NetShareInfo501 *object = pytalloc_get_ptr(obj);
    8130           0 :         PyObject *py_type;
    8131           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)(object->type));
    8132           0 :         return py_type;
    8133             : }
    8134             : 
    8135           0 : static int py_srvsvc_NetShareInfo501_set_type(PyObject *py_obj, PyObject *value, void *closure)
    8136             : {
    8137           0 :         struct srvsvc_NetShareInfo501 *object = pytalloc_get_ptr(py_obj);
    8138           0 :         if (value == NULL) {
    8139           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->type");
    8140           0 :                 return -1;
    8141             :         }
    8142             :         {
    8143           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
    8144           0 :                 if (PyLong_Check(value)) {
    8145           0 :                         unsigned long long test_var;
    8146           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8147           0 :                         if (PyErr_Occurred() != NULL) {
    8148           0 :                                 return -1;
    8149             :                         }
    8150           0 :                         if (test_var > uint_max) {
    8151           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8152             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8153           0 :                                 return -1;
    8154             :                         }
    8155           0 :                         object->type = test_var;
    8156             :                 } else {
    8157           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8158             :                           PyLong_Type.tp_name);
    8159           0 :                         return -1;
    8160             :                 }
    8161             :         }
    8162           0 :         return 0;
    8163             : }
    8164             : 
    8165           0 : static PyObject *py_srvsvc_NetShareInfo501_get_comment(PyObject *obj, void *closure)
    8166             : {
    8167           0 :         struct srvsvc_NetShareInfo501 *object = pytalloc_get_ptr(obj);
    8168           0 :         PyObject *py_comment;
    8169           0 :         if (object->comment == NULL) {
    8170           0 :                 Py_RETURN_NONE;
    8171             :         }
    8172           0 :         if (object->comment == NULL) {
    8173           0 :                 py_comment = Py_None;
    8174           0 :                 Py_INCREF(py_comment);
    8175             :         } else {
    8176           0 :                 if (object->comment == NULL) {
    8177           0 :                         py_comment = Py_None;
    8178           0 :                         Py_INCREF(py_comment);
    8179             :                 } else {
    8180           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
    8181             :                 }
    8182             :         }
    8183           0 :         return py_comment;
    8184             : }
    8185             : 
    8186           0 : static int py_srvsvc_NetShareInfo501_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    8187             : {
    8188           0 :         struct srvsvc_NetShareInfo501 *object = pytalloc_get_ptr(py_obj);
    8189           0 :         if (value == NULL) {
    8190           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
    8191           0 :                 return -1;
    8192             :         }
    8193           0 :         if (value == Py_None) {
    8194           0 :                 object->comment = NULL;
    8195             :         } else {
    8196           0 :                 object->comment = NULL;
    8197             :                 {
    8198           0 :                         const char *test_str;
    8199           0 :                         const char *talloc_str;
    8200           0 :                         PyObject *unicode = NULL;
    8201           0 :                         if (PyUnicode_Check(value)) {
    8202           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    8203           0 :                                 if (unicode == NULL) {
    8204           0 :                                         return -1;
    8205             :                                 }
    8206           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    8207           0 :                         } else if (PyBytes_Check(value)) {
    8208           0 :                                 test_str = PyBytes_AS_STRING(value);
    8209             :                         } else {
    8210           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    8211           0 :                                 return -1;
    8212             :                         }
    8213           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    8214           0 :                         if (unicode != NULL) {
    8215           0 :                                 Py_DECREF(unicode);
    8216             :                         }
    8217           0 :                         if (talloc_str == NULL) {
    8218           0 :                                 PyErr_NoMemory();
    8219           0 :                                 return -1;
    8220             :                         }
    8221           0 :                         object->comment = talloc_str;
    8222             :                 }
    8223             :         }
    8224           0 :         return 0;
    8225             : }
    8226             : 
    8227           0 : static PyObject *py_srvsvc_NetShareInfo501_get_csc_policy(PyObject *obj, void *closure)
    8228             : {
    8229           0 :         struct srvsvc_NetShareInfo501 *object = pytalloc_get_ptr(obj);
    8230           0 :         PyObject *py_csc_policy;
    8231           0 :         py_csc_policy = PyLong_FromUnsignedLongLong((uint32_t)(object->csc_policy));
    8232           0 :         return py_csc_policy;
    8233             : }
    8234             : 
    8235           0 : static int py_srvsvc_NetShareInfo501_set_csc_policy(PyObject *py_obj, PyObject *value, void *closure)
    8236             : {
    8237           0 :         struct srvsvc_NetShareInfo501 *object = pytalloc_get_ptr(py_obj);
    8238           0 :         if (value == NULL) {
    8239           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->csc_policy");
    8240           0 :                 return -1;
    8241             :         }
    8242             :         {
    8243           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->csc_policy));
    8244           0 :                 if (PyLong_Check(value)) {
    8245           0 :                         unsigned long long test_var;
    8246           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8247           0 :                         if (PyErr_Occurred() != NULL) {
    8248           0 :                                 return -1;
    8249             :                         }
    8250           0 :                         if (test_var > uint_max) {
    8251           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8252             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8253           0 :                                 return -1;
    8254             :                         }
    8255           0 :                         object->csc_policy = test_var;
    8256             :                 } else {
    8257           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8258             :                           PyLong_Type.tp_name);
    8259           0 :                         return -1;
    8260             :                 }
    8261             :         }
    8262           0 :         return 0;
    8263             : }
    8264             : 
    8265             : static PyGetSetDef py_srvsvc_NetShareInfo501_getsetters[] = {
    8266             :         {
    8267             :                 .name = discard_const_p(char, "name"),
    8268             :                 .get = py_srvsvc_NetShareInfo501_get_name,
    8269             :                 .set = py_srvsvc_NetShareInfo501_set_name,
    8270             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8271             :         },
    8272             :         {
    8273             :                 .name = discard_const_p(char, "type"),
    8274             :                 .get = py_srvsvc_NetShareInfo501_get_type,
    8275             :                 .set = py_srvsvc_NetShareInfo501_set_type,
    8276             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_ShareType")
    8277             :         },
    8278             :         {
    8279             :                 .name = discard_const_p(char, "comment"),
    8280             :                 .get = py_srvsvc_NetShareInfo501_get_comment,
    8281             :                 .set = py_srvsvc_NetShareInfo501_set_comment,
    8282             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8283             :         },
    8284             :         {
    8285             :                 .name = discard_const_p(char, "csc_policy"),
    8286             :                 .get = py_srvsvc_NetShareInfo501_get_csc_policy,
    8287             :                 .set = py_srvsvc_NetShareInfo501_set_csc_policy,
    8288             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8289             :         },
    8290             :         { .name = NULL }
    8291             : };
    8292             : 
    8293           0 : static PyObject *py_srvsvc_NetShareInfo501_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8294             : {
    8295           0 :         return pytalloc_new(struct srvsvc_NetShareInfo501, type);
    8296             : }
    8297             : 
    8298             : 
    8299             : static PyTypeObject srvsvc_NetShareInfo501_Type = {
    8300             :         PyVarObject_HEAD_INIT(NULL, 0)
    8301             :         .tp_name = "srvsvc.NetShareInfo501",
    8302             :         .tp_getset = py_srvsvc_NetShareInfo501_getsetters,
    8303             :         .tp_methods = NULL,
    8304             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8305             :         .tp_new = py_srvsvc_NetShareInfo501_new,
    8306             : };
    8307             : 
    8308             : 
    8309           0 : static PyObject *py_srvsvc_NetShareCtr501_get_count(PyObject *obj, void *closure)
    8310             : {
    8311           0 :         struct srvsvc_NetShareCtr501 *object = pytalloc_get_ptr(obj);
    8312           0 :         PyObject *py_count;
    8313           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    8314           0 :         return py_count;
    8315             : }
    8316             : 
    8317           0 : static int py_srvsvc_NetShareCtr501_set_count(PyObject *py_obj, PyObject *value, void *closure)
    8318             : {
    8319           0 :         struct srvsvc_NetShareCtr501 *object = pytalloc_get_ptr(py_obj);
    8320           0 :         if (value == NULL) {
    8321           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    8322           0 :                 return -1;
    8323             :         }
    8324             :         {
    8325           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    8326           0 :                 if (PyLong_Check(value)) {
    8327           0 :                         unsigned long long test_var;
    8328           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8329           0 :                         if (PyErr_Occurred() != NULL) {
    8330           0 :                                 return -1;
    8331             :                         }
    8332           0 :                         if (test_var > uint_max) {
    8333           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8334             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8335           0 :                                 return -1;
    8336             :                         }
    8337           0 :                         object->count = test_var;
    8338             :                 } else {
    8339           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8340             :                           PyLong_Type.tp_name);
    8341           0 :                         return -1;
    8342             :                 }
    8343             :         }
    8344           0 :         return 0;
    8345             : }
    8346             : 
    8347           0 : static PyObject *py_srvsvc_NetShareCtr501_get_array(PyObject *obj, void *closure)
    8348             : {
    8349           0 :         struct srvsvc_NetShareCtr501 *object = pytalloc_get_ptr(obj);
    8350           0 :         PyObject *py_array;
    8351           0 :         if (object->array == NULL) {
    8352           0 :                 Py_RETURN_NONE;
    8353             :         }
    8354           0 :         if (object->array == NULL) {
    8355           0 :                 py_array = Py_None;
    8356           0 :                 Py_INCREF(py_array);
    8357             :         } else {
    8358           0 :                 py_array = PyList_New(object->count);
    8359           0 :                 if (py_array == NULL) {
    8360           0 :                         return NULL;
    8361             :                 }
    8362             :                 {
    8363             :                         int array_cntr_1;
    8364           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    8365           0 :                                 PyObject *py_array_1;
    8366           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo501_Type, object->array, &(object->array)[array_cntr_1]);
    8367           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    8368             :                         }
    8369             :                 }
    8370             :         }
    8371           0 :         return py_array;
    8372             : }
    8373             : 
    8374           0 : static int py_srvsvc_NetShareCtr501_set_array(PyObject *py_obj, PyObject *value, void *closure)
    8375             : {
    8376           0 :         struct srvsvc_NetShareCtr501 *object = pytalloc_get_ptr(py_obj);
    8377           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    8378           0 :         if (value == NULL) {
    8379           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    8380           0 :                 return -1;
    8381             :         }
    8382           0 :         if (value == Py_None) {
    8383           0 :                 object->array = NULL;
    8384             :         } else {
    8385           0 :                 object->array = NULL;
    8386           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    8387             :                 {
    8388           0 :                         int array_cntr_1;
    8389           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    8390           0 :                         if (!object->array) { return -1; }
    8391           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    8392           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    8393           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    8394           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    8395           0 :                                         return -1;
    8396             :                                 }
    8397           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo501_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    8398           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    8399           0 :                                         PyErr_NoMemory();
    8400           0 :                                         return -1;
    8401             :                                 }
    8402           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    8403             :                         }
    8404             :                 }
    8405             :         }
    8406           0 :         return 0;
    8407             : }
    8408             : 
    8409             : static PyGetSetDef py_srvsvc_NetShareCtr501_getsetters[] = {
    8410             :         {
    8411             :                 .name = discard_const_p(char, "count"),
    8412             :                 .get = py_srvsvc_NetShareCtr501_get_count,
    8413             :                 .set = py_srvsvc_NetShareCtr501_set_count,
    8414             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8415             :         },
    8416             :         {
    8417             :                 .name = discard_const_p(char, "array"),
    8418             :                 .get = py_srvsvc_NetShareCtr501_get_array,
    8419             :                 .set = py_srvsvc_NetShareCtr501_set_array,
    8420             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo501")
    8421             :         },
    8422             :         { .name = NULL }
    8423             : };
    8424             : 
    8425           0 : static PyObject *py_srvsvc_NetShareCtr501_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8426             : {
    8427           0 :         return pytalloc_new(struct srvsvc_NetShareCtr501, type);
    8428             : }
    8429             : 
    8430             : 
    8431             : static PyTypeObject srvsvc_NetShareCtr501_Type = {
    8432             :         PyVarObject_HEAD_INIT(NULL, 0)
    8433             :         .tp_name = "srvsvc.NetShareCtr501",
    8434             :         .tp_getset = py_srvsvc_NetShareCtr501_getsetters,
    8435             :         .tp_methods = NULL,
    8436             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8437             :         .tp_new = py_srvsvc_NetShareCtr501_new,
    8438             : };
    8439             : 
    8440             : 
    8441           0 : static PyObject *py_srvsvc_NetShareInfo502_get_name(PyObject *obj, void *closure)
    8442             : {
    8443           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(obj);
    8444           0 :         PyObject *py_name;
    8445           0 :         if (object->name == NULL) {
    8446           0 :                 Py_RETURN_NONE;
    8447             :         }
    8448           0 :         if (object->name == NULL) {
    8449           0 :                 py_name = Py_None;
    8450           0 :                 Py_INCREF(py_name);
    8451             :         } else {
    8452           0 :                 if (object->name == NULL) {
    8453           0 :                         py_name = Py_None;
    8454           0 :                         Py_INCREF(py_name);
    8455             :                 } else {
    8456           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    8457             :                 }
    8458             :         }
    8459           0 :         return py_name;
    8460             : }
    8461             : 
    8462           0 : static int py_srvsvc_NetShareInfo502_set_name(PyObject *py_obj, PyObject *value, void *closure)
    8463             : {
    8464           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(py_obj);
    8465           0 :         if (value == NULL) {
    8466           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->name");
    8467           0 :                 return -1;
    8468             :         }
    8469           0 :         if (value == Py_None) {
    8470           0 :                 object->name = NULL;
    8471             :         } else {
    8472           0 :                 object->name = NULL;
    8473             :                 {
    8474           0 :                         const char *test_str;
    8475           0 :                         const char *talloc_str;
    8476           0 :                         PyObject *unicode = NULL;
    8477           0 :                         if (PyUnicode_Check(value)) {
    8478           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    8479           0 :                                 if (unicode == NULL) {
    8480           0 :                                         return -1;
    8481             :                                 }
    8482           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    8483           0 :                         } else if (PyBytes_Check(value)) {
    8484           0 :                                 test_str = PyBytes_AS_STRING(value);
    8485             :                         } else {
    8486           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    8487           0 :                                 return -1;
    8488             :                         }
    8489           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    8490           0 :                         if (unicode != NULL) {
    8491           0 :                                 Py_DECREF(unicode);
    8492             :                         }
    8493           0 :                         if (talloc_str == NULL) {
    8494           0 :                                 PyErr_NoMemory();
    8495           0 :                                 return -1;
    8496             :                         }
    8497           0 :                         object->name = talloc_str;
    8498             :                 }
    8499             :         }
    8500           0 :         return 0;
    8501             : }
    8502             : 
    8503           0 : static PyObject *py_srvsvc_NetShareInfo502_get_type(PyObject *obj, void *closure)
    8504             : {
    8505           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(obj);
    8506           0 :         PyObject *py_type;
    8507           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)(object->type));
    8508           0 :         return py_type;
    8509             : }
    8510             : 
    8511           0 : static int py_srvsvc_NetShareInfo502_set_type(PyObject *py_obj, PyObject *value, void *closure)
    8512             : {
    8513           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(py_obj);
    8514           0 :         if (value == NULL) {
    8515           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->type");
    8516           0 :                 return -1;
    8517             :         }
    8518             :         {
    8519           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
    8520           0 :                 if (PyLong_Check(value)) {
    8521           0 :                         unsigned long long test_var;
    8522           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8523           0 :                         if (PyErr_Occurred() != NULL) {
    8524           0 :                                 return -1;
    8525             :                         }
    8526           0 :                         if (test_var > uint_max) {
    8527           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8528             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8529           0 :                                 return -1;
    8530             :                         }
    8531           0 :                         object->type = test_var;
    8532             :                 } else {
    8533           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8534             :                           PyLong_Type.tp_name);
    8535           0 :                         return -1;
    8536             :                 }
    8537             :         }
    8538           0 :         return 0;
    8539             : }
    8540             : 
    8541           0 : static PyObject *py_srvsvc_NetShareInfo502_get_comment(PyObject *obj, void *closure)
    8542             : {
    8543           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(obj);
    8544           0 :         PyObject *py_comment;
    8545           0 :         if (object->comment == NULL) {
    8546           0 :                 Py_RETURN_NONE;
    8547             :         }
    8548           0 :         if (object->comment == NULL) {
    8549           0 :                 py_comment = Py_None;
    8550           0 :                 Py_INCREF(py_comment);
    8551             :         } else {
    8552           0 :                 if (object->comment == NULL) {
    8553           0 :                         py_comment = Py_None;
    8554           0 :                         Py_INCREF(py_comment);
    8555             :                 } else {
    8556           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
    8557             :                 }
    8558             :         }
    8559           0 :         return py_comment;
    8560             : }
    8561             : 
    8562           0 : static int py_srvsvc_NetShareInfo502_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    8563             : {
    8564           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(py_obj);
    8565           0 :         if (value == NULL) {
    8566           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
    8567           0 :                 return -1;
    8568             :         }
    8569           0 :         if (value == Py_None) {
    8570           0 :                 object->comment = NULL;
    8571             :         } else {
    8572           0 :                 object->comment = NULL;
    8573             :                 {
    8574           0 :                         const char *test_str;
    8575           0 :                         const char *talloc_str;
    8576           0 :                         PyObject *unicode = NULL;
    8577           0 :                         if (PyUnicode_Check(value)) {
    8578           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    8579           0 :                                 if (unicode == NULL) {
    8580           0 :                                         return -1;
    8581             :                                 }
    8582           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    8583           0 :                         } else if (PyBytes_Check(value)) {
    8584           0 :                                 test_str = PyBytes_AS_STRING(value);
    8585             :                         } else {
    8586           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    8587           0 :                                 return -1;
    8588             :                         }
    8589           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    8590           0 :                         if (unicode != NULL) {
    8591           0 :                                 Py_DECREF(unicode);
    8592             :                         }
    8593           0 :                         if (talloc_str == NULL) {
    8594           0 :                                 PyErr_NoMemory();
    8595           0 :                                 return -1;
    8596             :                         }
    8597           0 :                         object->comment = talloc_str;
    8598             :                 }
    8599             :         }
    8600           0 :         return 0;
    8601             : }
    8602             : 
    8603           0 : static PyObject *py_srvsvc_NetShareInfo502_get_permissions(PyObject *obj, void *closure)
    8604             : {
    8605           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(obj);
    8606           0 :         PyObject *py_permissions;
    8607           0 :         py_permissions = PyLong_FromUnsignedLongLong((uint32_t)(object->permissions));
    8608           0 :         return py_permissions;
    8609             : }
    8610             : 
    8611           0 : static int py_srvsvc_NetShareInfo502_set_permissions(PyObject *py_obj, PyObject *value, void *closure)
    8612             : {
    8613           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(py_obj);
    8614           0 :         if (value == NULL) {
    8615           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->permissions");
    8616           0 :                 return -1;
    8617             :         }
    8618             :         {
    8619           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permissions));
    8620           0 :                 if (PyLong_Check(value)) {
    8621           0 :                         unsigned long long test_var;
    8622           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8623           0 :                         if (PyErr_Occurred() != NULL) {
    8624           0 :                                 return -1;
    8625             :                         }
    8626           0 :                         if (test_var > uint_max) {
    8627           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8628             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8629           0 :                                 return -1;
    8630             :                         }
    8631           0 :                         object->permissions = test_var;
    8632             :                 } else {
    8633           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8634             :                           PyLong_Type.tp_name);
    8635           0 :                         return -1;
    8636             :                 }
    8637             :         }
    8638           0 :         return 0;
    8639             : }
    8640             : 
    8641           0 : static PyObject *py_srvsvc_NetShareInfo502_get_max_users(PyObject *obj, void *closure)
    8642             : {
    8643           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(obj);
    8644           0 :         PyObject *py_max_users;
    8645           0 :         py_max_users = PyLong_FromUnsignedLongLong((uint32_t)(object->max_users));
    8646           0 :         return py_max_users;
    8647             : }
    8648             : 
    8649           0 : static int py_srvsvc_NetShareInfo502_set_max_users(PyObject *py_obj, PyObject *value, void *closure)
    8650             : {
    8651           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(py_obj);
    8652           0 :         if (value == NULL) {
    8653           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->max_users");
    8654           0 :                 return -1;
    8655             :         }
    8656             :         {
    8657           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_users));
    8658           0 :                 if (PyLong_Check(value)) {
    8659           0 :                         unsigned long long test_var;
    8660           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8661           0 :                         if (PyErr_Occurred() != NULL) {
    8662           0 :                                 return -1;
    8663             :                         }
    8664           0 :                         if (test_var > uint_max) {
    8665           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8666             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8667           0 :                                 return -1;
    8668             :                         }
    8669           0 :                         object->max_users = test_var;
    8670             :                 } else {
    8671           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8672             :                           PyLong_Type.tp_name);
    8673           0 :                         return -1;
    8674             :                 }
    8675             :         }
    8676           0 :         return 0;
    8677             : }
    8678             : 
    8679           0 : static PyObject *py_srvsvc_NetShareInfo502_get_current_users(PyObject *obj, void *closure)
    8680             : {
    8681           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(obj);
    8682           0 :         PyObject *py_current_users;
    8683           0 :         py_current_users = PyLong_FromUnsignedLongLong((uint32_t)(object->current_users));
    8684           0 :         return py_current_users;
    8685             : }
    8686             : 
    8687           0 : static int py_srvsvc_NetShareInfo502_set_current_users(PyObject *py_obj, PyObject *value, void *closure)
    8688             : {
    8689           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(py_obj);
    8690           0 :         if (value == NULL) {
    8691           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->current_users");
    8692           0 :                 return -1;
    8693             :         }
    8694             :         {
    8695           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_users));
    8696           0 :                 if (PyLong_Check(value)) {
    8697           0 :                         unsigned long long test_var;
    8698           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8699           0 :                         if (PyErr_Occurred() != NULL) {
    8700           0 :                                 return -1;
    8701             :                         }
    8702           0 :                         if (test_var > uint_max) {
    8703           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8704             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8705           0 :                                 return -1;
    8706             :                         }
    8707           0 :                         object->current_users = test_var;
    8708             :                 } else {
    8709           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8710             :                           PyLong_Type.tp_name);
    8711           0 :                         return -1;
    8712             :                 }
    8713             :         }
    8714           0 :         return 0;
    8715             : }
    8716             : 
    8717           0 : static PyObject *py_srvsvc_NetShareInfo502_get_path(PyObject *obj, void *closure)
    8718             : {
    8719           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(obj);
    8720           0 :         PyObject *py_path;
    8721           0 :         if (object->path == NULL) {
    8722           0 :                 Py_RETURN_NONE;
    8723             :         }
    8724           0 :         if (object->path == NULL) {
    8725           0 :                 py_path = Py_None;
    8726           0 :                 Py_INCREF(py_path);
    8727             :         } else {
    8728           0 :                 if (object->path == NULL) {
    8729           0 :                         py_path = Py_None;
    8730           0 :                         Py_INCREF(py_path);
    8731             :                 } else {
    8732           0 :                         py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
    8733             :                 }
    8734             :         }
    8735           0 :         return py_path;
    8736             : }
    8737             : 
    8738           0 : static int py_srvsvc_NetShareInfo502_set_path(PyObject *py_obj, PyObject *value, void *closure)
    8739             : {
    8740           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(py_obj);
    8741           0 :         if (value == NULL) {
    8742           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->path");
    8743           0 :                 return -1;
    8744             :         }
    8745           0 :         if (value == Py_None) {
    8746           0 :                 object->path = NULL;
    8747             :         } else {
    8748           0 :                 object->path = NULL;
    8749             :                 {
    8750           0 :                         const char *test_str;
    8751           0 :                         const char *talloc_str;
    8752           0 :                         PyObject *unicode = NULL;
    8753           0 :                         if (PyUnicode_Check(value)) {
    8754           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    8755           0 :                                 if (unicode == NULL) {
    8756           0 :                                         return -1;
    8757             :                                 }
    8758           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    8759           0 :                         } else if (PyBytes_Check(value)) {
    8760           0 :                                 test_str = PyBytes_AS_STRING(value);
    8761             :                         } else {
    8762           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    8763           0 :                                 return -1;
    8764             :                         }
    8765           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    8766           0 :                         if (unicode != NULL) {
    8767           0 :                                 Py_DECREF(unicode);
    8768             :                         }
    8769           0 :                         if (talloc_str == NULL) {
    8770           0 :                                 PyErr_NoMemory();
    8771           0 :                                 return -1;
    8772             :                         }
    8773           0 :                         object->path = talloc_str;
    8774             :                 }
    8775             :         }
    8776           0 :         return 0;
    8777             : }
    8778             : 
    8779           0 : static PyObject *py_srvsvc_NetShareInfo502_get_password(PyObject *obj, void *closure)
    8780             : {
    8781           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(obj);
    8782           0 :         PyObject *py_password;
    8783           0 :         if (object->password == NULL) {
    8784           0 :                 Py_RETURN_NONE;
    8785             :         }
    8786           0 :         if (object->password == NULL) {
    8787           0 :                 py_password = Py_None;
    8788           0 :                 Py_INCREF(py_password);
    8789             :         } else {
    8790           0 :                 if (object->password == NULL) {
    8791           0 :                         py_password = Py_None;
    8792           0 :                         Py_INCREF(py_password);
    8793             :                 } else {
    8794           0 :                         py_password = PyUnicode_Decode(object->password, strlen(object->password), "utf-8", "ignore");
    8795             :                 }
    8796             :         }
    8797           0 :         return py_password;
    8798             : }
    8799             : 
    8800           0 : static int py_srvsvc_NetShareInfo502_set_password(PyObject *py_obj, PyObject *value, void *closure)
    8801             : {
    8802           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(py_obj);
    8803           0 :         if (value == NULL) {
    8804           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->password");
    8805           0 :                 return -1;
    8806             :         }
    8807           0 :         if (value == Py_None) {
    8808           0 :                 object->password = NULL;
    8809             :         } else {
    8810           0 :                 object->password = NULL;
    8811             :                 {
    8812           0 :                         const char *test_str;
    8813           0 :                         const char *talloc_str;
    8814           0 :                         PyObject *unicode = NULL;
    8815           0 :                         if (PyUnicode_Check(value)) {
    8816           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    8817           0 :                                 if (unicode == NULL) {
    8818           0 :                                         return -1;
    8819             :                                 }
    8820           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    8821           0 :                         } else if (PyBytes_Check(value)) {
    8822           0 :                                 test_str = PyBytes_AS_STRING(value);
    8823             :                         } else {
    8824           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    8825           0 :                                 return -1;
    8826             :                         }
    8827           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    8828           0 :                         if (unicode != NULL) {
    8829           0 :                                 Py_DECREF(unicode);
    8830             :                         }
    8831           0 :                         if (talloc_str == NULL) {
    8832           0 :                                 PyErr_NoMemory();
    8833           0 :                                 return -1;
    8834             :                         }
    8835           0 :                         object->password = talloc_str;
    8836             :                 }
    8837             :         }
    8838           0 :         return 0;
    8839             : }
    8840             : 
    8841           0 : static PyObject *py_srvsvc_NetShareInfo502_get_sd_buf(PyObject *obj, void *closure)
    8842             : {
    8843           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(obj);
    8844           0 :         PyObject *py_sd_buf;
    8845           0 :         py_sd_buf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sd_buf);
    8846           0 :         return py_sd_buf;
    8847             : }
    8848             : 
    8849           0 : static int py_srvsvc_NetShareInfo502_set_sd_buf(PyObject *py_obj, PyObject *value, void *closure)
    8850             : {
    8851           0 :         struct srvsvc_NetShareInfo502 *object = pytalloc_get_ptr(py_obj);
    8852           0 :         if (value == NULL) {
    8853           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sd_buf");
    8854           0 :                 return -1;
    8855             :         }
    8856           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
    8857           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8858           0 :                 PyErr_NoMemory();
    8859           0 :                 return -1;
    8860             :         }
    8861           0 :         object->sd_buf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
    8862           0 :         return 0;
    8863             : }
    8864             : 
    8865             : static PyGetSetDef py_srvsvc_NetShareInfo502_getsetters[] = {
    8866             :         {
    8867             :                 .name = discard_const_p(char, "name"),
    8868             :                 .get = py_srvsvc_NetShareInfo502_get_name,
    8869             :                 .set = py_srvsvc_NetShareInfo502_set_name,
    8870             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8871             :         },
    8872             :         {
    8873             :                 .name = discard_const_p(char, "type"),
    8874             :                 .get = py_srvsvc_NetShareInfo502_get_type,
    8875             :                 .set = py_srvsvc_NetShareInfo502_set_type,
    8876             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_ShareType")
    8877             :         },
    8878             :         {
    8879             :                 .name = discard_const_p(char, "comment"),
    8880             :                 .get = py_srvsvc_NetShareInfo502_get_comment,
    8881             :                 .set = py_srvsvc_NetShareInfo502_set_comment,
    8882             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8883             :         },
    8884             :         {
    8885             :                 .name = discard_const_p(char, "permissions"),
    8886             :                 .get = py_srvsvc_NetShareInfo502_get_permissions,
    8887             :                 .set = py_srvsvc_NetShareInfo502_set_permissions,
    8888             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8889             :         },
    8890             :         {
    8891             :                 .name = discard_const_p(char, "max_users"),
    8892             :                 .get = py_srvsvc_NetShareInfo502_get_max_users,
    8893             :                 .set = py_srvsvc_NetShareInfo502_set_max_users,
    8894             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8895             :         },
    8896             :         {
    8897             :                 .name = discard_const_p(char, "current_users"),
    8898             :                 .get = py_srvsvc_NetShareInfo502_get_current_users,
    8899             :                 .set = py_srvsvc_NetShareInfo502_set_current_users,
    8900             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8901             :         },
    8902             :         {
    8903             :                 .name = discard_const_p(char, "path"),
    8904             :                 .get = py_srvsvc_NetShareInfo502_get_path,
    8905             :                 .set = py_srvsvc_NetShareInfo502_set_path,
    8906             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8907             :         },
    8908             :         {
    8909             :                 .name = discard_const_p(char, "password"),
    8910             :                 .get = py_srvsvc_NetShareInfo502_get_password,
    8911             :                 .set = py_srvsvc_NetShareInfo502_set_password,
    8912             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8913             :         },
    8914             :         {
    8915             :                 .name = discard_const_p(char, "sd_buf"),
    8916             :                 .get = py_srvsvc_NetShareInfo502_get_sd_buf,
    8917             :                 .set = py_srvsvc_NetShareInfo502_set_sd_buf,
    8918             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
    8919             :         },
    8920             :         { .name = NULL }
    8921             : };
    8922             : 
    8923           0 : static PyObject *py_srvsvc_NetShareInfo502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8924             : {
    8925           0 :         return pytalloc_new(struct srvsvc_NetShareInfo502, type);
    8926             : }
    8927             : 
    8928             : 
    8929             : static PyTypeObject srvsvc_NetShareInfo502_Type = {
    8930             :         PyVarObject_HEAD_INIT(NULL, 0)
    8931             :         .tp_name = "srvsvc.NetShareInfo502",
    8932             :         .tp_getset = py_srvsvc_NetShareInfo502_getsetters,
    8933             :         .tp_methods = NULL,
    8934             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8935             :         .tp_new = py_srvsvc_NetShareInfo502_new,
    8936             : };
    8937             : 
    8938             : 
    8939           0 : static PyObject *py_srvsvc_NetShareCtr502_get_count(PyObject *obj, void *closure)
    8940             : {
    8941           0 :         struct srvsvc_NetShareCtr502 *object = pytalloc_get_ptr(obj);
    8942           0 :         PyObject *py_count;
    8943           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    8944           0 :         return py_count;
    8945             : }
    8946             : 
    8947           0 : static int py_srvsvc_NetShareCtr502_set_count(PyObject *py_obj, PyObject *value, void *closure)
    8948             : {
    8949           0 :         struct srvsvc_NetShareCtr502 *object = pytalloc_get_ptr(py_obj);
    8950           0 :         if (value == NULL) {
    8951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    8952           0 :                 return -1;
    8953             :         }
    8954             :         {
    8955           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    8956           0 :                 if (PyLong_Check(value)) {
    8957           0 :                         unsigned long long test_var;
    8958           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8959           0 :                         if (PyErr_Occurred() != NULL) {
    8960           0 :                                 return -1;
    8961             :                         }
    8962           0 :                         if (test_var > uint_max) {
    8963           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8964             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8965           0 :                                 return -1;
    8966             :                         }
    8967           0 :                         object->count = test_var;
    8968             :                 } else {
    8969           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8970             :                           PyLong_Type.tp_name);
    8971           0 :                         return -1;
    8972             :                 }
    8973             :         }
    8974           0 :         return 0;
    8975             : }
    8976             : 
    8977           0 : static PyObject *py_srvsvc_NetShareCtr502_get_array(PyObject *obj, void *closure)
    8978             : {
    8979           0 :         struct srvsvc_NetShareCtr502 *object = pytalloc_get_ptr(obj);
    8980           0 :         PyObject *py_array;
    8981           0 :         if (object->array == NULL) {
    8982           0 :                 Py_RETURN_NONE;
    8983             :         }
    8984           0 :         if (object->array == NULL) {
    8985           0 :                 py_array = Py_None;
    8986           0 :                 Py_INCREF(py_array);
    8987             :         } else {
    8988           0 :                 py_array = PyList_New(object->count);
    8989           0 :                 if (py_array == NULL) {
    8990           0 :                         return NULL;
    8991             :                 }
    8992             :                 {
    8993             :                         int array_cntr_1;
    8994           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    8995           0 :                                 PyObject *py_array_1;
    8996           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo502_Type, object->array, &(object->array)[array_cntr_1]);
    8997           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    8998             :                         }
    8999             :                 }
    9000             :         }
    9001           0 :         return py_array;
    9002             : }
    9003             : 
    9004           0 : static int py_srvsvc_NetShareCtr502_set_array(PyObject *py_obj, PyObject *value, void *closure)
    9005             : {
    9006           0 :         struct srvsvc_NetShareCtr502 *object = pytalloc_get_ptr(py_obj);
    9007           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    9008           0 :         if (value == NULL) {
    9009           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    9010           0 :                 return -1;
    9011             :         }
    9012           0 :         if (value == Py_None) {
    9013           0 :                 object->array = NULL;
    9014             :         } else {
    9015           0 :                 object->array = NULL;
    9016           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9017             :                 {
    9018           0 :                         int array_cntr_1;
    9019           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    9020           0 :                         if (!object->array) { return -1; }
    9021           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    9022           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    9023           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    9024           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    9025           0 :                                         return -1;
    9026             :                                 }
    9027           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo502_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    9028           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    9029           0 :                                         PyErr_NoMemory();
    9030           0 :                                         return -1;
    9031             :                                 }
    9032           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    9033             :                         }
    9034             :                 }
    9035             :         }
    9036           0 :         return 0;
    9037             : }
    9038             : 
    9039             : static PyGetSetDef py_srvsvc_NetShareCtr502_getsetters[] = {
    9040             :         {
    9041             :                 .name = discard_const_p(char, "count"),
    9042             :                 .get = py_srvsvc_NetShareCtr502_get_count,
    9043             :                 .set = py_srvsvc_NetShareCtr502_set_count,
    9044             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9045             :         },
    9046             :         {
    9047             :                 .name = discard_const_p(char, "array"),
    9048             :                 .get = py_srvsvc_NetShareCtr502_get_array,
    9049             :                 .set = py_srvsvc_NetShareCtr502_set_array,
    9050             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo502")
    9051             :         },
    9052             :         { .name = NULL }
    9053             : };
    9054             : 
    9055           0 : static PyObject *py_srvsvc_NetShareCtr502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9056             : {
    9057           0 :         return pytalloc_new(struct srvsvc_NetShareCtr502, type);
    9058             : }
    9059             : 
    9060             : 
    9061             : static PyTypeObject srvsvc_NetShareCtr502_Type = {
    9062             :         PyVarObject_HEAD_INIT(NULL, 0)
    9063             :         .tp_name = "srvsvc.NetShareCtr502",
    9064             :         .tp_getset = py_srvsvc_NetShareCtr502_getsetters,
    9065             :         .tp_methods = NULL,
    9066             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9067             :         .tp_new = py_srvsvc_NetShareCtr502_new,
    9068             : };
    9069             : 
    9070             : 
    9071           0 : static PyObject *py_srvsvc_NetShareInfo1004_get_comment(PyObject *obj, void *closure)
    9072             : {
    9073           0 :         struct srvsvc_NetShareInfo1004 *object = pytalloc_get_ptr(obj);
    9074           0 :         PyObject *py_comment;
    9075           0 :         if (object->comment == NULL) {
    9076           0 :                 Py_RETURN_NONE;
    9077             :         }
    9078           0 :         if (object->comment == NULL) {
    9079           0 :                 py_comment = Py_None;
    9080           0 :                 Py_INCREF(py_comment);
    9081             :         } else {
    9082           0 :                 if (object->comment == NULL) {
    9083           0 :                         py_comment = Py_None;
    9084           0 :                         Py_INCREF(py_comment);
    9085             :                 } else {
    9086           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
    9087             :                 }
    9088             :         }
    9089           0 :         return py_comment;
    9090             : }
    9091             : 
    9092           0 : static int py_srvsvc_NetShareInfo1004_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    9093             : {
    9094           0 :         struct srvsvc_NetShareInfo1004 *object = pytalloc_get_ptr(py_obj);
    9095           0 :         if (value == NULL) {
    9096           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
    9097           0 :                 return -1;
    9098             :         }
    9099           0 :         if (value == Py_None) {
    9100           0 :                 object->comment = NULL;
    9101             :         } else {
    9102           0 :                 object->comment = NULL;
    9103             :                 {
    9104           0 :                         const char *test_str;
    9105           0 :                         const char *talloc_str;
    9106           0 :                         PyObject *unicode = NULL;
    9107           0 :                         if (PyUnicode_Check(value)) {
    9108           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    9109           0 :                                 if (unicode == NULL) {
    9110           0 :                                         return -1;
    9111             :                                 }
    9112           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    9113           0 :                         } else if (PyBytes_Check(value)) {
    9114           0 :                                 test_str = PyBytes_AS_STRING(value);
    9115             :                         } else {
    9116           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    9117           0 :                                 return -1;
    9118             :                         }
    9119           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    9120           0 :                         if (unicode != NULL) {
    9121           0 :                                 Py_DECREF(unicode);
    9122             :                         }
    9123           0 :                         if (talloc_str == NULL) {
    9124           0 :                                 PyErr_NoMemory();
    9125           0 :                                 return -1;
    9126             :                         }
    9127           0 :                         object->comment = talloc_str;
    9128             :                 }
    9129             :         }
    9130           0 :         return 0;
    9131             : }
    9132             : 
    9133             : static PyGetSetDef py_srvsvc_NetShareInfo1004_getsetters[] = {
    9134             :         {
    9135             :                 .name = discard_const_p(char, "comment"),
    9136             :                 .get = py_srvsvc_NetShareInfo1004_get_comment,
    9137             :                 .set = py_srvsvc_NetShareInfo1004_set_comment,
    9138             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9139             :         },
    9140             :         { .name = NULL }
    9141             : };
    9142             : 
    9143           0 : static PyObject *py_srvsvc_NetShareInfo1004_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9144             : {
    9145           0 :         return pytalloc_new(struct srvsvc_NetShareInfo1004, type);
    9146             : }
    9147             : 
    9148             : 
    9149             : static PyTypeObject srvsvc_NetShareInfo1004_Type = {
    9150             :         PyVarObject_HEAD_INIT(NULL, 0)
    9151             :         .tp_name = "srvsvc.NetShareInfo1004",
    9152             :         .tp_getset = py_srvsvc_NetShareInfo1004_getsetters,
    9153             :         .tp_methods = NULL,
    9154             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9155             :         .tp_new = py_srvsvc_NetShareInfo1004_new,
    9156             : };
    9157             : 
    9158             : 
    9159           0 : static PyObject *py_srvsvc_NetShareCtr1004_get_count(PyObject *obj, void *closure)
    9160             : {
    9161           0 :         struct srvsvc_NetShareCtr1004 *object = pytalloc_get_ptr(obj);
    9162           0 :         PyObject *py_count;
    9163           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    9164           0 :         return py_count;
    9165             : }
    9166             : 
    9167           0 : static int py_srvsvc_NetShareCtr1004_set_count(PyObject *py_obj, PyObject *value, void *closure)
    9168             : {
    9169           0 :         struct srvsvc_NetShareCtr1004 *object = pytalloc_get_ptr(py_obj);
    9170           0 :         if (value == NULL) {
    9171           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    9172           0 :                 return -1;
    9173             :         }
    9174             :         {
    9175           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    9176           0 :                 if (PyLong_Check(value)) {
    9177           0 :                         unsigned long long test_var;
    9178           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9179           0 :                         if (PyErr_Occurred() != NULL) {
    9180           0 :                                 return -1;
    9181             :                         }
    9182           0 :                         if (test_var > uint_max) {
    9183           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9184             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9185           0 :                                 return -1;
    9186             :                         }
    9187           0 :                         object->count = test_var;
    9188             :                 } else {
    9189           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9190             :                           PyLong_Type.tp_name);
    9191           0 :                         return -1;
    9192             :                 }
    9193             :         }
    9194           0 :         return 0;
    9195             : }
    9196             : 
    9197           0 : static PyObject *py_srvsvc_NetShareCtr1004_get_array(PyObject *obj, void *closure)
    9198             : {
    9199           0 :         struct srvsvc_NetShareCtr1004 *object = pytalloc_get_ptr(obj);
    9200           0 :         PyObject *py_array;
    9201           0 :         if (object->array == NULL) {
    9202           0 :                 Py_RETURN_NONE;
    9203             :         }
    9204           0 :         if (object->array == NULL) {
    9205           0 :                 py_array = Py_None;
    9206           0 :                 Py_INCREF(py_array);
    9207             :         } else {
    9208           0 :                 py_array = PyList_New(object->count);
    9209           0 :                 if (py_array == NULL) {
    9210           0 :                         return NULL;
    9211             :                 }
    9212             :                 {
    9213             :                         int array_cntr_1;
    9214           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    9215           0 :                                 PyObject *py_array_1;
    9216           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1004_Type, object->array, &(object->array)[array_cntr_1]);
    9217           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    9218             :                         }
    9219             :                 }
    9220             :         }
    9221           0 :         return py_array;
    9222             : }
    9223             : 
    9224           0 : static int py_srvsvc_NetShareCtr1004_set_array(PyObject *py_obj, PyObject *value, void *closure)
    9225             : {
    9226           0 :         struct srvsvc_NetShareCtr1004 *object = pytalloc_get_ptr(py_obj);
    9227           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    9228           0 :         if (value == NULL) {
    9229           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    9230           0 :                 return -1;
    9231             :         }
    9232           0 :         if (value == Py_None) {
    9233           0 :                 object->array = NULL;
    9234             :         } else {
    9235           0 :                 object->array = NULL;
    9236           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9237             :                 {
    9238           0 :                         int array_cntr_1;
    9239           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    9240           0 :                         if (!object->array) { return -1; }
    9241           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    9242           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    9243           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    9244           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    9245           0 :                                         return -1;
    9246             :                                 }
    9247           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1004_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    9248           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    9249           0 :                                         PyErr_NoMemory();
    9250           0 :                                         return -1;
    9251             :                                 }
    9252           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetShareInfo1004 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    9253             :                         }
    9254             :                 }
    9255             :         }
    9256           0 :         return 0;
    9257             : }
    9258             : 
    9259             : static PyGetSetDef py_srvsvc_NetShareCtr1004_getsetters[] = {
    9260             :         {
    9261             :                 .name = discard_const_p(char, "count"),
    9262             :                 .get = py_srvsvc_NetShareCtr1004_get_count,
    9263             :                 .set = py_srvsvc_NetShareCtr1004_set_count,
    9264             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9265             :         },
    9266             :         {
    9267             :                 .name = discard_const_p(char, "array"),
    9268             :                 .get = py_srvsvc_NetShareCtr1004_get_array,
    9269             :                 .set = py_srvsvc_NetShareCtr1004_set_array,
    9270             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo1004")
    9271             :         },
    9272             :         { .name = NULL }
    9273             : };
    9274             : 
    9275           0 : static PyObject *py_srvsvc_NetShareCtr1004_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9276             : {
    9277           0 :         return pytalloc_new(struct srvsvc_NetShareCtr1004, type);
    9278             : }
    9279             : 
    9280             : 
    9281             : static PyTypeObject srvsvc_NetShareCtr1004_Type = {
    9282             :         PyVarObject_HEAD_INIT(NULL, 0)
    9283             :         .tp_name = "srvsvc.NetShareCtr1004",
    9284             :         .tp_getset = py_srvsvc_NetShareCtr1004_getsetters,
    9285             :         .tp_methods = NULL,
    9286             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9287             :         .tp_new = py_srvsvc_NetShareCtr1004_new,
    9288             : };
    9289             : 
    9290             : 
    9291           0 : static PyObject *py_srvsvc_NetShareInfo1005_get_dfs_flags(PyObject *obj, void *closure)
    9292             : {
    9293           0 :         struct srvsvc_NetShareInfo1005 *object = pytalloc_get_ptr(obj);
    9294           0 :         PyObject *py_dfs_flags;
    9295           0 :         py_dfs_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->dfs_flags));
    9296           0 :         return py_dfs_flags;
    9297             : }
    9298             : 
    9299           0 : static int py_srvsvc_NetShareInfo1005_set_dfs_flags(PyObject *py_obj, PyObject *value, void *closure)
    9300             : {
    9301           0 :         struct srvsvc_NetShareInfo1005 *object = pytalloc_get_ptr(py_obj);
    9302           0 :         if (value == NULL) {
    9303           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dfs_flags");
    9304           0 :                 return -1;
    9305             :         }
    9306             :         {
    9307           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dfs_flags));
    9308           0 :                 if (PyLong_Check(value)) {
    9309           0 :                         unsigned long long test_var;
    9310           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9311           0 :                         if (PyErr_Occurred() != NULL) {
    9312           0 :                                 return -1;
    9313             :                         }
    9314           0 :                         if (test_var > uint_max) {
    9315           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9316             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9317           0 :                                 return -1;
    9318             :                         }
    9319           0 :                         object->dfs_flags = test_var;
    9320             :                 } else {
    9321           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9322             :                           PyLong_Type.tp_name);
    9323           0 :                         return -1;
    9324             :                 }
    9325             :         }
    9326           0 :         return 0;
    9327             : }
    9328             : 
    9329             : static PyGetSetDef py_srvsvc_NetShareInfo1005_getsetters[] = {
    9330             :         {
    9331             :                 .name = discard_const_p(char, "dfs_flags"),
    9332             :                 .get = py_srvsvc_NetShareInfo1005_get_dfs_flags,
    9333             :                 .set = py_srvsvc_NetShareInfo1005_set_dfs_flags,
    9334             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NetShareInfo1005Flags")
    9335             :         },
    9336             :         { .name = NULL }
    9337             : };
    9338             : 
    9339           0 : static PyObject *py_srvsvc_NetShareInfo1005_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9340             : {
    9341           0 :         return pytalloc_new(struct srvsvc_NetShareInfo1005, type);
    9342             : }
    9343             : 
    9344             : 
    9345             : static PyTypeObject srvsvc_NetShareInfo1005_Type = {
    9346             :         PyVarObject_HEAD_INIT(NULL, 0)
    9347             :         .tp_name = "srvsvc.NetShareInfo1005",
    9348             :         .tp_getset = py_srvsvc_NetShareInfo1005_getsetters,
    9349             :         .tp_methods = NULL,
    9350             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9351             :         .tp_new = py_srvsvc_NetShareInfo1005_new,
    9352             : };
    9353             : 
    9354             : 
    9355           0 : static PyObject *py_srvsvc_NetShareCtr1005_get_count(PyObject *obj, void *closure)
    9356             : {
    9357           0 :         struct srvsvc_NetShareCtr1005 *object = pytalloc_get_ptr(obj);
    9358           0 :         PyObject *py_count;
    9359           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    9360           0 :         return py_count;
    9361             : }
    9362             : 
    9363           0 : static int py_srvsvc_NetShareCtr1005_set_count(PyObject *py_obj, PyObject *value, void *closure)
    9364             : {
    9365           0 :         struct srvsvc_NetShareCtr1005 *object = pytalloc_get_ptr(py_obj);
    9366           0 :         if (value == NULL) {
    9367           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    9368           0 :                 return -1;
    9369             :         }
    9370             :         {
    9371           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    9372           0 :                 if (PyLong_Check(value)) {
    9373           0 :                         unsigned long long test_var;
    9374           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9375           0 :                         if (PyErr_Occurred() != NULL) {
    9376           0 :                                 return -1;
    9377             :                         }
    9378           0 :                         if (test_var > uint_max) {
    9379           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9380             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9381           0 :                                 return -1;
    9382             :                         }
    9383           0 :                         object->count = test_var;
    9384             :                 } else {
    9385           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9386             :                           PyLong_Type.tp_name);
    9387           0 :                         return -1;
    9388             :                 }
    9389             :         }
    9390           0 :         return 0;
    9391             : }
    9392             : 
    9393           0 : static PyObject *py_srvsvc_NetShareCtr1005_get_array(PyObject *obj, void *closure)
    9394             : {
    9395           0 :         struct srvsvc_NetShareCtr1005 *object = pytalloc_get_ptr(obj);
    9396           0 :         PyObject *py_array;
    9397           0 :         if (object->array == NULL) {
    9398           0 :                 Py_RETURN_NONE;
    9399             :         }
    9400           0 :         if (object->array == NULL) {
    9401           0 :                 py_array = Py_None;
    9402           0 :                 Py_INCREF(py_array);
    9403             :         } else {
    9404           0 :                 py_array = PyList_New(object->count);
    9405           0 :                 if (py_array == NULL) {
    9406           0 :                         return NULL;
    9407             :                 }
    9408             :                 {
    9409             :                         int array_cntr_1;
    9410           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    9411           0 :                                 PyObject *py_array_1;
    9412           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1005_Type, object->array, &(object->array)[array_cntr_1]);
    9413           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    9414             :                         }
    9415             :                 }
    9416             :         }
    9417           0 :         return py_array;
    9418             : }
    9419             : 
    9420           0 : static int py_srvsvc_NetShareCtr1005_set_array(PyObject *py_obj, PyObject *value, void *closure)
    9421             : {
    9422           0 :         struct srvsvc_NetShareCtr1005 *object = pytalloc_get_ptr(py_obj);
    9423           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    9424           0 :         if (value == NULL) {
    9425           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    9426           0 :                 return -1;
    9427             :         }
    9428           0 :         if (value == Py_None) {
    9429           0 :                 object->array = NULL;
    9430             :         } else {
    9431           0 :                 object->array = NULL;
    9432           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9433             :                 {
    9434           0 :                         int array_cntr_1;
    9435           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    9436           0 :                         if (!object->array) { return -1; }
    9437           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    9438           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    9439           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    9440           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    9441           0 :                                         return -1;
    9442             :                                 }
    9443           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1005_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    9444           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    9445           0 :                                         PyErr_NoMemory();
    9446           0 :                                         return -1;
    9447             :                                 }
    9448           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetShareInfo1005 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    9449             :                         }
    9450             :                 }
    9451             :         }
    9452           0 :         return 0;
    9453             : }
    9454             : 
    9455             : static PyGetSetDef py_srvsvc_NetShareCtr1005_getsetters[] = {
    9456             :         {
    9457             :                 .name = discard_const_p(char, "count"),
    9458             :                 .get = py_srvsvc_NetShareCtr1005_get_count,
    9459             :                 .set = py_srvsvc_NetShareCtr1005_set_count,
    9460             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9461             :         },
    9462             :         {
    9463             :                 .name = discard_const_p(char, "array"),
    9464             :                 .get = py_srvsvc_NetShareCtr1005_get_array,
    9465             :                 .set = py_srvsvc_NetShareCtr1005_set_array,
    9466             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo1005")
    9467             :         },
    9468             :         { .name = NULL }
    9469             : };
    9470             : 
    9471           0 : static PyObject *py_srvsvc_NetShareCtr1005_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9472             : {
    9473           0 :         return pytalloc_new(struct srvsvc_NetShareCtr1005, type);
    9474             : }
    9475             : 
    9476             : 
    9477             : static PyTypeObject srvsvc_NetShareCtr1005_Type = {
    9478             :         PyVarObject_HEAD_INIT(NULL, 0)
    9479             :         .tp_name = "srvsvc.NetShareCtr1005",
    9480             :         .tp_getset = py_srvsvc_NetShareCtr1005_getsetters,
    9481             :         .tp_methods = NULL,
    9482             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9483             :         .tp_new = py_srvsvc_NetShareCtr1005_new,
    9484             : };
    9485             : 
    9486             : 
    9487           0 : static PyObject *py_srvsvc_NetShareInfo1006_get_max_users(PyObject *obj, void *closure)
    9488             : {
    9489           0 :         struct srvsvc_NetShareInfo1006 *object = pytalloc_get_ptr(obj);
    9490           0 :         PyObject *py_max_users;
    9491           0 :         py_max_users = PyLong_FromUnsignedLongLong((uint32_t)(object->max_users));
    9492           0 :         return py_max_users;
    9493             : }
    9494             : 
    9495           0 : static int py_srvsvc_NetShareInfo1006_set_max_users(PyObject *py_obj, PyObject *value, void *closure)
    9496             : {
    9497           0 :         struct srvsvc_NetShareInfo1006 *object = pytalloc_get_ptr(py_obj);
    9498           0 :         if (value == NULL) {
    9499           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->max_users");
    9500           0 :                 return -1;
    9501             :         }
    9502             :         {
    9503           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_users));
    9504           0 :                 if (PyLong_Check(value)) {
    9505           0 :                         unsigned long long test_var;
    9506           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9507           0 :                         if (PyErr_Occurred() != NULL) {
    9508           0 :                                 return -1;
    9509             :                         }
    9510           0 :                         if (test_var > uint_max) {
    9511           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9512             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9513           0 :                                 return -1;
    9514             :                         }
    9515           0 :                         object->max_users = test_var;
    9516             :                 } else {
    9517           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9518             :                           PyLong_Type.tp_name);
    9519           0 :                         return -1;
    9520             :                 }
    9521             :         }
    9522           0 :         return 0;
    9523             : }
    9524             : 
    9525             : static PyGetSetDef py_srvsvc_NetShareInfo1006_getsetters[] = {
    9526             :         {
    9527             :                 .name = discard_const_p(char, "max_users"),
    9528             :                 .get = py_srvsvc_NetShareInfo1006_get_max_users,
    9529             :                 .set = py_srvsvc_NetShareInfo1006_set_max_users,
    9530             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9531             :         },
    9532             :         { .name = NULL }
    9533             : };
    9534             : 
    9535           0 : static PyObject *py_srvsvc_NetShareInfo1006_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9536             : {
    9537           0 :         return pytalloc_new(struct srvsvc_NetShareInfo1006, type);
    9538             : }
    9539             : 
    9540             : 
    9541             : static PyTypeObject srvsvc_NetShareInfo1006_Type = {
    9542             :         PyVarObject_HEAD_INIT(NULL, 0)
    9543             :         .tp_name = "srvsvc.NetShareInfo1006",
    9544             :         .tp_getset = py_srvsvc_NetShareInfo1006_getsetters,
    9545             :         .tp_methods = NULL,
    9546             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9547             :         .tp_new = py_srvsvc_NetShareInfo1006_new,
    9548             : };
    9549             : 
    9550             : 
    9551           0 : static PyObject *py_srvsvc_NetShareCtr1006_get_count(PyObject *obj, void *closure)
    9552             : {
    9553           0 :         struct srvsvc_NetShareCtr1006 *object = pytalloc_get_ptr(obj);
    9554           0 :         PyObject *py_count;
    9555           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    9556           0 :         return py_count;
    9557             : }
    9558             : 
    9559           0 : static int py_srvsvc_NetShareCtr1006_set_count(PyObject *py_obj, PyObject *value, void *closure)
    9560             : {
    9561           0 :         struct srvsvc_NetShareCtr1006 *object = pytalloc_get_ptr(py_obj);
    9562           0 :         if (value == NULL) {
    9563           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    9564           0 :                 return -1;
    9565             :         }
    9566             :         {
    9567           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    9568           0 :                 if (PyLong_Check(value)) {
    9569           0 :                         unsigned long long test_var;
    9570           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9571           0 :                         if (PyErr_Occurred() != NULL) {
    9572           0 :                                 return -1;
    9573             :                         }
    9574           0 :                         if (test_var > uint_max) {
    9575           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9576             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9577           0 :                                 return -1;
    9578             :                         }
    9579           0 :                         object->count = test_var;
    9580             :                 } else {
    9581           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9582             :                           PyLong_Type.tp_name);
    9583           0 :                         return -1;
    9584             :                 }
    9585             :         }
    9586           0 :         return 0;
    9587             : }
    9588             : 
    9589           0 : static PyObject *py_srvsvc_NetShareCtr1006_get_array(PyObject *obj, void *closure)
    9590             : {
    9591           0 :         struct srvsvc_NetShareCtr1006 *object = pytalloc_get_ptr(obj);
    9592           0 :         PyObject *py_array;
    9593           0 :         if (object->array == NULL) {
    9594           0 :                 Py_RETURN_NONE;
    9595             :         }
    9596           0 :         if (object->array == NULL) {
    9597           0 :                 py_array = Py_None;
    9598           0 :                 Py_INCREF(py_array);
    9599             :         } else {
    9600           0 :                 py_array = PyList_New(object->count);
    9601           0 :                 if (py_array == NULL) {
    9602           0 :                         return NULL;
    9603             :                 }
    9604             :                 {
    9605             :                         int array_cntr_1;
    9606           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    9607           0 :                                 PyObject *py_array_1;
    9608           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1006_Type, object->array, &(object->array)[array_cntr_1]);
    9609           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    9610             :                         }
    9611             :                 }
    9612             :         }
    9613           0 :         return py_array;
    9614             : }
    9615             : 
    9616           0 : static int py_srvsvc_NetShareCtr1006_set_array(PyObject *py_obj, PyObject *value, void *closure)
    9617             : {
    9618           0 :         struct srvsvc_NetShareCtr1006 *object = pytalloc_get_ptr(py_obj);
    9619           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    9620           0 :         if (value == NULL) {
    9621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    9622           0 :                 return -1;
    9623             :         }
    9624           0 :         if (value == Py_None) {
    9625           0 :                 object->array = NULL;
    9626             :         } else {
    9627           0 :                 object->array = NULL;
    9628           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9629             :                 {
    9630           0 :                         int array_cntr_1;
    9631           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    9632           0 :                         if (!object->array) { return -1; }
    9633           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    9634           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    9635           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    9636           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    9637           0 :                                         return -1;
    9638             :                                 }
    9639           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1006_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    9640           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    9641           0 :                                         PyErr_NoMemory();
    9642           0 :                                         return -1;
    9643             :                                 }
    9644           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetShareInfo1006 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    9645             :                         }
    9646             :                 }
    9647             :         }
    9648           0 :         return 0;
    9649             : }
    9650             : 
    9651             : static PyGetSetDef py_srvsvc_NetShareCtr1006_getsetters[] = {
    9652             :         {
    9653             :                 .name = discard_const_p(char, "count"),
    9654             :                 .get = py_srvsvc_NetShareCtr1006_get_count,
    9655             :                 .set = py_srvsvc_NetShareCtr1006_set_count,
    9656             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9657             :         },
    9658             :         {
    9659             :                 .name = discard_const_p(char, "array"),
    9660             :                 .get = py_srvsvc_NetShareCtr1006_get_array,
    9661             :                 .set = py_srvsvc_NetShareCtr1006_set_array,
    9662             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo1006")
    9663             :         },
    9664             :         { .name = NULL }
    9665             : };
    9666             : 
    9667           0 : static PyObject *py_srvsvc_NetShareCtr1006_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9668             : {
    9669           0 :         return pytalloc_new(struct srvsvc_NetShareCtr1006, type);
    9670             : }
    9671             : 
    9672             : 
    9673             : static PyTypeObject srvsvc_NetShareCtr1006_Type = {
    9674             :         PyVarObject_HEAD_INIT(NULL, 0)
    9675             :         .tp_name = "srvsvc.NetShareCtr1006",
    9676             :         .tp_getset = py_srvsvc_NetShareCtr1006_getsetters,
    9677             :         .tp_methods = NULL,
    9678             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9679             :         .tp_new = py_srvsvc_NetShareCtr1006_new,
    9680             : };
    9681             : 
    9682             : 
    9683           0 : static PyObject *py_srvsvc_NetShareInfo1007_get_flags(PyObject *obj, void *closure)
    9684             : {
    9685           0 :         struct srvsvc_NetShareInfo1007 *object = pytalloc_get_ptr(obj);
    9686           0 :         PyObject *py_flags;
    9687           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
    9688           0 :         return py_flags;
    9689             : }
    9690             : 
    9691           0 : static int py_srvsvc_NetShareInfo1007_set_flags(PyObject *py_obj, PyObject *value, void *closure)
    9692             : {
    9693           0 :         struct srvsvc_NetShareInfo1007 *object = pytalloc_get_ptr(py_obj);
    9694           0 :         if (value == NULL) {
    9695           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
    9696           0 :                 return -1;
    9697             :         }
    9698             :         {
    9699           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
    9700           0 :                 if (PyLong_Check(value)) {
    9701           0 :                         unsigned long long test_var;
    9702           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9703           0 :                         if (PyErr_Occurred() != NULL) {
    9704           0 :                                 return -1;
    9705             :                         }
    9706           0 :                         if (test_var > uint_max) {
    9707           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9708             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9709           0 :                                 return -1;
    9710             :                         }
    9711           0 :                         object->flags = test_var;
    9712             :                 } else {
    9713           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9714             :                           PyLong_Type.tp_name);
    9715           0 :                         return -1;
    9716             :                 }
    9717             :         }
    9718           0 :         return 0;
    9719             : }
    9720             : 
    9721           0 : static PyObject *py_srvsvc_NetShareInfo1007_get_alternate_directory_name(PyObject *obj, void *closure)
    9722             : {
    9723           0 :         struct srvsvc_NetShareInfo1007 *object = pytalloc_get_ptr(obj);
    9724           0 :         PyObject *py_alternate_directory_name;
    9725           0 :         if (object->alternate_directory_name == NULL) {
    9726           0 :                 Py_RETURN_NONE;
    9727             :         }
    9728           0 :         if (object->alternate_directory_name == NULL) {
    9729           0 :                 py_alternate_directory_name = Py_None;
    9730           0 :                 Py_INCREF(py_alternate_directory_name);
    9731             :         } else {
    9732           0 :                 if (object->alternate_directory_name == NULL) {
    9733           0 :                         py_alternate_directory_name = Py_None;
    9734           0 :                         Py_INCREF(py_alternate_directory_name);
    9735             :                 } else {
    9736           0 :                         py_alternate_directory_name = PyUnicode_Decode(object->alternate_directory_name, strlen(object->alternate_directory_name), "utf-8", "ignore");
    9737             :                 }
    9738             :         }
    9739           0 :         return py_alternate_directory_name;
    9740             : }
    9741             : 
    9742           0 : static int py_srvsvc_NetShareInfo1007_set_alternate_directory_name(PyObject *py_obj, PyObject *value, void *closure)
    9743             : {
    9744           0 :         struct srvsvc_NetShareInfo1007 *object = pytalloc_get_ptr(py_obj);
    9745           0 :         if (value == NULL) {
    9746           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->alternate_directory_name");
    9747           0 :                 return -1;
    9748             :         }
    9749           0 :         if (value == Py_None) {
    9750           0 :                 object->alternate_directory_name = NULL;
    9751             :         } else {
    9752           0 :                 object->alternate_directory_name = NULL;
    9753             :                 {
    9754           0 :                         const char *test_str;
    9755           0 :                         const char *talloc_str;
    9756           0 :                         PyObject *unicode = NULL;
    9757           0 :                         if (PyUnicode_Check(value)) {
    9758           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    9759           0 :                                 if (unicode == NULL) {
    9760           0 :                                         return -1;
    9761             :                                 }
    9762           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    9763           0 :                         } else if (PyBytes_Check(value)) {
    9764           0 :                                 test_str = PyBytes_AS_STRING(value);
    9765             :                         } else {
    9766           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    9767           0 :                                 return -1;
    9768             :                         }
    9769           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    9770           0 :                         if (unicode != NULL) {
    9771           0 :                                 Py_DECREF(unicode);
    9772             :                         }
    9773           0 :                         if (talloc_str == NULL) {
    9774           0 :                                 PyErr_NoMemory();
    9775           0 :                                 return -1;
    9776             :                         }
    9777           0 :                         object->alternate_directory_name = talloc_str;
    9778             :                 }
    9779             :         }
    9780           0 :         return 0;
    9781             : }
    9782             : 
    9783             : static PyGetSetDef py_srvsvc_NetShareInfo1007_getsetters[] = {
    9784             :         {
    9785             :                 .name = discard_const_p(char, "flags"),
    9786             :                 .get = py_srvsvc_NetShareInfo1007_get_flags,
    9787             :                 .set = py_srvsvc_NetShareInfo1007_set_flags,
    9788             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9789             :         },
    9790             :         {
    9791             :                 .name = discard_const_p(char, "alternate_directory_name"),
    9792             :                 .get = py_srvsvc_NetShareInfo1007_get_alternate_directory_name,
    9793             :                 .set = py_srvsvc_NetShareInfo1007_set_alternate_directory_name,
    9794             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9795             :         },
    9796             :         { .name = NULL }
    9797             : };
    9798             : 
    9799           0 : static PyObject *py_srvsvc_NetShareInfo1007_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9800             : {
    9801           0 :         return pytalloc_new(struct srvsvc_NetShareInfo1007, type);
    9802             : }
    9803             : 
    9804             : 
    9805             : static PyTypeObject srvsvc_NetShareInfo1007_Type = {
    9806             :         PyVarObject_HEAD_INIT(NULL, 0)
    9807             :         .tp_name = "srvsvc.NetShareInfo1007",
    9808             :         .tp_getset = py_srvsvc_NetShareInfo1007_getsetters,
    9809             :         .tp_methods = NULL,
    9810             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9811             :         .tp_new = py_srvsvc_NetShareInfo1007_new,
    9812             : };
    9813             : 
    9814             : 
    9815           0 : static PyObject *py_srvsvc_NetShareCtr1007_get_count(PyObject *obj, void *closure)
    9816             : {
    9817           0 :         struct srvsvc_NetShareCtr1007 *object = pytalloc_get_ptr(obj);
    9818           0 :         PyObject *py_count;
    9819           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    9820           0 :         return py_count;
    9821             : }
    9822             : 
    9823           0 : static int py_srvsvc_NetShareCtr1007_set_count(PyObject *py_obj, PyObject *value, void *closure)
    9824             : {
    9825           0 :         struct srvsvc_NetShareCtr1007 *object = pytalloc_get_ptr(py_obj);
    9826           0 :         if (value == NULL) {
    9827           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    9828           0 :                 return -1;
    9829             :         }
    9830             :         {
    9831           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    9832           0 :                 if (PyLong_Check(value)) {
    9833           0 :                         unsigned long long test_var;
    9834           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9835           0 :                         if (PyErr_Occurred() != NULL) {
    9836           0 :                                 return -1;
    9837             :                         }
    9838           0 :                         if (test_var > uint_max) {
    9839           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9840             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9841           0 :                                 return -1;
    9842             :                         }
    9843           0 :                         object->count = test_var;
    9844             :                 } else {
    9845           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9846             :                           PyLong_Type.tp_name);
    9847           0 :                         return -1;
    9848             :                 }
    9849             :         }
    9850           0 :         return 0;
    9851             : }
    9852             : 
    9853           0 : static PyObject *py_srvsvc_NetShareCtr1007_get_array(PyObject *obj, void *closure)
    9854             : {
    9855           0 :         struct srvsvc_NetShareCtr1007 *object = pytalloc_get_ptr(obj);
    9856           0 :         PyObject *py_array;
    9857           0 :         if (object->array == NULL) {
    9858           0 :                 Py_RETURN_NONE;
    9859             :         }
    9860           0 :         if (object->array == NULL) {
    9861           0 :                 py_array = Py_None;
    9862           0 :                 Py_INCREF(py_array);
    9863             :         } else {
    9864           0 :                 py_array = PyList_New(object->count);
    9865           0 :                 if (py_array == NULL) {
    9866           0 :                         return NULL;
    9867             :                 }
    9868             :                 {
    9869             :                         int array_cntr_1;
    9870           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    9871           0 :                                 PyObject *py_array_1;
    9872           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1007_Type, object->array, &(object->array)[array_cntr_1]);
    9873           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    9874             :                         }
    9875             :                 }
    9876             :         }
    9877           0 :         return py_array;
    9878             : }
    9879             : 
    9880           0 : static int py_srvsvc_NetShareCtr1007_set_array(PyObject *py_obj, PyObject *value, void *closure)
    9881             : {
    9882           0 :         struct srvsvc_NetShareCtr1007 *object = pytalloc_get_ptr(py_obj);
    9883           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    9884           0 :         if (value == NULL) {
    9885           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
    9886           0 :                 return -1;
    9887             :         }
    9888           0 :         if (value == Py_None) {
    9889           0 :                 object->array = NULL;
    9890             :         } else {
    9891           0 :                 object->array = NULL;
    9892           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9893             :                 {
    9894           0 :                         int array_cntr_1;
    9895           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    9896           0 :                         if (!object->array) { return -1; }
    9897           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    9898           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    9899           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    9900           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
    9901           0 :                                         return -1;
    9902             :                                 }
    9903           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1007_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    9904           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    9905           0 :                                         PyErr_NoMemory();
    9906           0 :                                         return -1;
    9907             :                                 }
    9908           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    9909             :                         }
    9910             :                 }
    9911             :         }
    9912           0 :         return 0;
    9913             : }
    9914             : 
    9915             : static PyGetSetDef py_srvsvc_NetShareCtr1007_getsetters[] = {
    9916             :         {
    9917             :                 .name = discard_const_p(char, "count"),
    9918             :                 .get = py_srvsvc_NetShareCtr1007_get_count,
    9919             :                 .set = py_srvsvc_NetShareCtr1007_set_count,
    9920             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9921             :         },
    9922             :         {
    9923             :                 .name = discard_const_p(char, "array"),
    9924             :                 .get = py_srvsvc_NetShareCtr1007_get_array,
    9925             :                 .set = py_srvsvc_NetShareCtr1007_set_array,
    9926             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo1007")
    9927             :         },
    9928             :         { .name = NULL }
    9929             : };
    9930             : 
    9931           0 : static PyObject *py_srvsvc_NetShareCtr1007_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9932             : {
    9933           0 :         return pytalloc_new(struct srvsvc_NetShareCtr1007, type);
    9934             : }
    9935             : 
    9936             : 
    9937             : static PyTypeObject srvsvc_NetShareCtr1007_Type = {
    9938             :         PyVarObject_HEAD_INIT(NULL, 0)
    9939             :         .tp_name = "srvsvc.NetShareCtr1007",
    9940             :         .tp_getset = py_srvsvc_NetShareCtr1007_getsetters,
    9941             :         .tp_methods = NULL,
    9942             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9943             :         .tp_new = py_srvsvc_NetShareCtr1007_new,
    9944             : };
    9945             : 
    9946             : 
    9947           0 : static PyObject *py_srvsvc_NetShareCtr1501_get_count(PyObject *obj, void *closure)
    9948             : {
    9949           0 :         struct srvsvc_NetShareCtr1501 *object = pytalloc_get_ptr(obj);
    9950           0 :         PyObject *py_count;
    9951           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    9952           0 :         return py_count;
    9953             : }
    9954             : 
    9955           0 : static int py_srvsvc_NetShareCtr1501_set_count(PyObject *py_obj, PyObject *value, void *closure)
    9956             : {
    9957           0 :         struct srvsvc_NetShareCtr1501 *object = pytalloc_get_ptr(py_obj);
    9958           0 :         if (value == NULL) {
    9959           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
    9960           0 :                 return -1;
    9961             :         }
    9962             :         {
    9963           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    9964           0 :                 if (PyLong_Check(value)) {
    9965           0 :                         unsigned long long test_var;
    9966           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9967           0 :                         if (PyErr_Occurred() != NULL) {
    9968           0 :                                 return -1;
    9969             :                         }
    9970           0 :                         if (test_var > uint_max) {
    9971           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9972             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9973           0 :                                 return -1;
    9974             :                         }
    9975           0 :                         object->count = test_var;
    9976             :                 } else {
    9977           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9978             :                           PyLong_Type.tp_name);
    9979           0 :                         return -1;
    9980             :                 }
    9981             :         }
    9982           0 :         return 0;
    9983             : }
    9984             : 
    9985           0 : static PyObject *py_srvsvc_NetShareCtr1501_get_array(PyObject *obj, void *closure)
    9986             : {
    9987           0 :         struct srvsvc_NetShareCtr1501 *object = pytalloc_get_ptr(obj);
    9988           0 :         PyObject *py_array;
    9989           0 :         if (object->array == NULL) {
    9990           0 :                 Py_RETURN_NONE;
    9991             :         }
    9992           0 :         if (object->array == NULL) {
    9993           0 :                 py_array = Py_None;
    9994           0 :                 Py_INCREF(py_array);
    9995             :         } else {
    9996           0 :                 py_array = PyList_New(object->count);
    9997           0 :                 if (py_array == NULL) {
    9998           0 :                         return NULL;
    9999             :                 }
   10000             :                 {
   10001             :                         int array_cntr_1;
   10002           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   10003           0 :                                 PyObject *py_array_1;
   10004           0 :                                 py_array_1 = pytalloc_reference_ex(sec_desc_buf_Type, object->array, &(object->array)[array_cntr_1]);
   10005           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   10006             :                         }
   10007             :                 }
   10008             :         }
   10009           0 :         return py_array;
   10010             : }
   10011             : 
   10012           0 : static int py_srvsvc_NetShareCtr1501_set_array(PyObject *py_obj, PyObject *value, void *closure)
   10013             : {
   10014           0 :         struct srvsvc_NetShareCtr1501 *object = pytalloc_get_ptr(py_obj);
   10015           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   10016           0 :         if (value == NULL) {
   10017           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
   10018           0 :                 return -1;
   10019             :         }
   10020           0 :         if (value == Py_None) {
   10021           0 :                 object->array = NULL;
   10022             :         } else {
   10023           0 :                 object->array = NULL;
   10024           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   10025             :                 {
   10026           0 :                         int array_cntr_1;
   10027           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   10028           0 :                         if (!object->array) { return -1; }
   10029           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   10030           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   10031           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   10032           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
   10033           0 :                                         return -1;
   10034             :                                 }
   10035           0 :                                 PY_CHECK_TYPE(sec_desc_buf_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   10036           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   10037           0 :                                         PyErr_NoMemory();
   10038           0 :                                         return -1;
   10039             :                                 }
   10040           0 :                                 (object->array)[array_cntr_1] = *(struct sec_desc_buf *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   10041             :                         }
   10042             :                 }
   10043             :         }
   10044           0 :         return 0;
   10045             : }
   10046             : 
   10047             : static PyGetSetDef py_srvsvc_NetShareCtr1501_getsetters[] = {
   10048             :         {
   10049             :                 .name = discard_const_p(char, "count"),
   10050             :                 .get = py_srvsvc_NetShareCtr1501_get_count,
   10051             :                 .set = py_srvsvc_NetShareCtr1501_set_count,
   10052             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10053             :         },
   10054             :         {
   10055             :                 .name = discard_const_p(char, "array"),
   10056             :                 .get = py_srvsvc_NetShareCtr1501_get_array,
   10057             :                 .set = py_srvsvc_NetShareCtr1501_set_array,
   10058             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   10059             :         },
   10060             :         { .name = NULL }
   10061             : };
   10062             : 
   10063           0 : static PyObject *py_srvsvc_NetShareCtr1501_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10064             : {
   10065           0 :         return pytalloc_new(struct srvsvc_NetShareCtr1501, type);
   10066             : }
   10067             : 
   10068             : 
   10069             : static PyTypeObject srvsvc_NetShareCtr1501_Type = {
   10070             :         PyVarObject_HEAD_INIT(NULL, 0)
   10071             :         .tp_name = "srvsvc.NetShareCtr1501",
   10072             :         .tp_getset = py_srvsvc_NetShareCtr1501_getsetters,
   10073             :         .tp_methods = NULL,
   10074             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10075             :         .tp_new = py_srvsvc_NetShareCtr1501_new,
   10076             : };
   10077             : 
   10078           1 : static PyObject *py_import_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareInfo *in)
   10079             : {
   10080           0 :         PyObject *ret;
   10081             : 
   10082           1 :         switch (level) {
   10083           0 :                 case 0:
   10084           0 :                         if (in->info0 == NULL) {
   10085           0 :                                 ret = Py_None;
   10086           0 :                                 Py_INCREF(ret);
   10087             :                         } else {
   10088           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo0_Type, in->info0, in->info0);
   10089             :                         }
   10090           0 :                         return ret;
   10091             : 
   10092           1 :                 case 1:
   10093           1 :                         if (in->info1 == NULL) {
   10094           0 :                                 ret = Py_None;
   10095           0 :                                 Py_INCREF(ret);
   10096             :                         } else {
   10097           1 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1_Type, in->info1, in->info1);
   10098             :                         }
   10099           1 :                         return ret;
   10100             : 
   10101           0 :                 case 2:
   10102           0 :                         if (in->info2 == NULL) {
   10103           0 :                                 ret = Py_None;
   10104           0 :                                 Py_INCREF(ret);
   10105             :                         } else {
   10106           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo2_Type, in->info2, in->info2);
   10107             :                         }
   10108           0 :                         return ret;
   10109             : 
   10110           0 :                 case 501:
   10111           0 :                         if (in->info501 == NULL) {
   10112           0 :                                 ret = Py_None;
   10113           0 :                                 Py_INCREF(ret);
   10114             :                         } else {
   10115           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo501_Type, in->info501, in->info501);
   10116             :                         }
   10117           0 :                         return ret;
   10118             : 
   10119           0 :                 case 502:
   10120           0 :                         if (in->info502 == NULL) {
   10121           0 :                                 ret = Py_None;
   10122           0 :                                 Py_INCREF(ret);
   10123             :                         } else {
   10124           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo502_Type, in->info502, in->info502);
   10125             :                         }
   10126           0 :                         return ret;
   10127             : 
   10128           0 :                 case 1004:
   10129           0 :                         if (in->info1004 == NULL) {
   10130           0 :                                 ret = Py_None;
   10131           0 :                                 Py_INCREF(ret);
   10132             :                         } else {
   10133           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1004_Type, in->info1004, in->info1004);
   10134             :                         }
   10135           0 :                         return ret;
   10136             : 
   10137           0 :                 case 1005:
   10138           0 :                         if (in->info1005 == NULL) {
   10139           0 :                                 ret = Py_None;
   10140           0 :                                 Py_INCREF(ret);
   10141             :                         } else {
   10142           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1005_Type, in->info1005, in->info1005);
   10143             :                         }
   10144           0 :                         return ret;
   10145             : 
   10146           0 :                 case 1006:
   10147           0 :                         if (in->info1006 == NULL) {
   10148           0 :                                 ret = Py_None;
   10149           0 :                                 Py_INCREF(ret);
   10150             :                         } else {
   10151           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1006_Type, in->info1006, in->info1006);
   10152             :                         }
   10153           0 :                         return ret;
   10154             : 
   10155           0 :                 case 1007:
   10156           0 :                         if (in->info1007 == NULL) {
   10157           0 :                                 ret = Py_None;
   10158           0 :                                 Py_INCREF(ret);
   10159             :                         } else {
   10160           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1007_Type, in->info1007, in->info1007);
   10161             :                         }
   10162           0 :                         return ret;
   10163             : 
   10164           0 :                 case 1501:
   10165           0 :                         if (in->info1501 == NULL) {
   10166           0 :                                 ret = Py_None;
   10167           0 :                                 Py_INCREF(ret);
   10168             :                         } else {
   10169           0 :                                 ret = pytalloc_reference_ex(sec_desc_buf_Type, in->info1501, in->info1501);
   10170             :                         }
   10171           0 :                         return ret;
   10172             : 
   10173           0 :                 default:
   10174           0 :                         ret = Py_None;
   10175           0 :                         Py_INCREF(ret);
   10176           0 :                         return ret;
   10177             : 
   10178             :         }
   10179             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   10180             :         return NULL;
   10181             : }
   10182             : 
   10183           0 : static union srvsvc_NetShareInfo *py_export_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   10184             : {
   10185           0 :         union srvsvc_NetShareInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetShareInfo);
   10186           0 :         switch (level) {
   10187           0 :                 case 0:
   10188           0 :                         if (in == NULL) {
   10189           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info0");
   10190           0 :                                 talloc_free(ret); return NULL;
   10191             :                         }
   10192           0 :                         if (in == Py_None) {
   10193           0 :                                 ret->info0 = NULL;
   10194             :                         } else {
   10195           0 :                                 ret->info0 = NULL;
   10196           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo0_Type, in, talloc_free(ret); return NULL;);
   10197           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10198           0 :                                         PyErr_NoMemory();
   10199           0 :                                         talloc_free(ret); return NULL;
   10200             :                                 }
   10201           0 :                                 ret->info0 = (struct srvsvc_NetShareInfo0 *)pytalloc_get_ptr(in);
   10202             :                         }
   10203           0 :                         break;
   10204             : 
   10205           0 :                 case 1:
   10206           0 :                         if (in == NULL) {
   10207           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1");
   10208           0 :                                 talloc_free(ret); return NULL;
   10209             :                         }
   10210           0 :                         if (in == Py_None) {
   10211           0 :                                 ret->info1 = NULL;
   10212             :                         } else {
   10213           0 :                                 ret->info1 = NULL;
   10214           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1_Type, in, talloc_free(ret); return NULL;);
   10215           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10216           0 :                                         PyErr_NoMemory();
   10217           0 :                                         talloc_free(ret); return NULL;
   10218             :                                 }
   10219           0 :                                 ret->info1 = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(in);
   10220             :                         }
   10221           0 :                         break;
   10222             : 
   10223           0 :                 case 2:
   10224           0 :                         if (in == NULL) {
   10225           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info2");
   10226           0 :                                 talloc_free(ret); return NULL;
   10227             :                         }
   10228           0 :                         if (in == Py_None) {
   10229           0 :                                 ret->info2 = NULL;
   10230             :                         } else {
   10231           0 :                                 ret->info2 = NULL;
   10232           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo2_Type, in, talloc_free(ret); return NULL;);
   10233           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10234           0 :                                         PyErr_NoMemory();
   10235           0 :                                         talloc_free(ret); return NULL;
   10236             :                                 }
   10237           0 :                                 ret->info2 = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(in);
   10238             :                         }
   10239           0 :                         break;
   10240             : 
   10241           0 :                 case 501:
   10242           0 :                         if (in == NULL) {
   10243           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info501");
   10244           0 :                                 talloc_free(ret); return NULL;
   10245             :                         }
   10246           0 :                         if (in == Py_None) {
   10247           0 :                                 ret->info501 = NULL;
   10248             :                         } else {
   10249           0 :                                 ret->info501 = NULL;
   10250           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo501_Type, in, talloc_free(ret); return NULL;);
   10251           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10252           0 :                                         PyErr_NoMemory();
   10253           0 :                                         talloc_free(ret); return NULL;
   10254             :                                 }
   10255           0 :                                 ret->info501 = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(in);
   10256             :                         }
   10257           0 :                         break;
   10258             : 
   10259           0 :                 case 502:
   10260           0 :                         if (in == NULL) {
   10261           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info502");
   10262           0 :                                 talloc_free(ret); return NULL;
   10263             :                         }
   10264           0 :                         if (in == Py_None) {
   10265           0 :                                 ret->info502 = NULL;
   10266             :                         } else {
   10267           0 :                                 ret->info502 = NULL;
   10268           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo502_Type, in, talloc_free(ret); return NULL;);
   10269           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10270           0 :                                         PyErr_NoMemory();
   10271           0 :                                         talloc_free(ret); return NULL;
   10272             :                                 }
   10273           0 :                                 ret->info502 = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(in);
   10274             :                         }
   10275           0 :                         break;
   10276             : 
   10277           0 :                 case 1004:
   10278           0 :                         if (in == NULL) {
   10279           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1004");
   10280           0 :                                 talloc_free(ret); return NULL;
   10281             :                         }
   10282           0 :                         if (in == Py_None) {
   10283           0 :                                 ret->info1004 = NULL;
   10284             :                         } else {
   10285           0 :                                 ret->info1004 = NULL;
   10286           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1004_Type, in, talloc_free(ret); return NULL;);
   10287           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10288           0 :                                         PyErr_NoMemory();
   10289           0 :                                         talloc_free(ret); return NULL;
   10290             :                                 }
   10291           0 :                                 ret->info1004 = (struct srvsvc_NetShareInfo1004 *)pytalloc_get_ptr(in);
   10292             :                         }
   10293           0 :                         break;
   10294             : 
   10295           0 :                 case 1005:
   10296           0 :                         if (in == NULL) {
   10297           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1005");
   10298           0 :                                 talloc_free(ret); return NULL;
   10299             :                         }
   10300           0 :                         if (in == Py_None) {
   10301           0 :                                 ret->info1005 = NULL;
   10302             :                         } else {
   10303           0 :                                 ret->info1005 = NULL;
   10304           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1005_Type, in, talloc_free(ret); return NULL;);
   10305           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10306           0 :                                         PyErr_NoMemory();
   10307           0 :                                         talloc_free(ret); return NULL;
   10308             :                                 }
   10309           0 :                                 ret->info1005 = (struct srvsvc_NetShareInfo1005 *)pytalloc_get_ptr(in);
   10310             :                         }
   10311           0 :                         break;
   10312             : 
   10313           0 :                 case 1006:
   10314           0 :                         if (in == NULL) {
   10315           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1006");
   10316           0 :                                 talloc_free(ret); return NULL;
   10317             :                         }
   10318           0 :                         if (in == Py_None) {
   10319           0 :                                 ret->info1006 = NULL;
   10320             :                         } else {
   10321           0 :                                 ret->info1006 = NULL;
   10322           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1006_Type, in, talloc_free(ret); return NULL;);
   10323           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10324           0 :                                         PyErr_NoMemory();
   10325           0 :                                         talloc_free(ret); return NULL;
   10326             :                                 }
   10327           0 :                                 ret->info1006 = (struct srvsvc_NetShareInfo1006 *)pytalloc_get_ptr(in);
   10328             :                         }
   10329           0 :                         break;
   10330             : 
   10331           0 :                 case 1007:
   10332           0 :                         if (in == NULL) {
   10333           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1007");
   10334           0 :                                 talloc_free(ret); return NULL;
   10335             :                         }
   10336           0 :                         if (in == Py_None) {
   10337           0 :                                 ret->info1007 = NULL;
   10338             :                         } else {
   10339           0 :                                 ret->info1007 = NULL;
   10340           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1007_Type, in, talloc_free(ret); return NULL;);
   10341           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10342           0 :                                         PyErr_NoMemory();
   10343           0 :                                         talloc_free(ret); return NULL;
   10344             :                                 }
   10345           0 :                                 ret->info1007 = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(in);
   10346             :                         }
   10347           0 :                         break;
   10348             : 
   10349           0 :                 case 1501:
   10350           0 :                         if (in == NULL) {
   10351           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1501");
   10352           0 :                                 talloc_free(ret); return NULL;
   10353             :                         }
   10354           0 :                         if (in == Py_None) {
   10355           0 :                                 ret->info1501 = NULL;
   10356             :                         } else {
   10357           0 :                                 ret->info1501 = NULL;
   10358           0 :                                 PY_CHECK_TYPE(sec_desc_buf_Type, in, talloc_free(ret); return NULL;);
   10359           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10360           0 :                                         PyErr_NoMemory();
   10361           0 :                                         talloc_free(ret); return NULL;
   10362             :                                 }
   10363           0 :                                 ret->info1501 = (struct sec_desc_buf *)pytalloc_get_ptr(in);
   10364             :                         }
   10365           0 :                         break;
   10366             : 
   10367           0 :                 default:
   10368           0 :                         break;
   10369             : 
   10370             :         }
   10371             : 
   10372           0 :         return ret;
   10373             : }
   10374             : 
   10375           1 : static PyObject *py_srvsvc_NetShareInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10376             : {
   10377           1 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   10378           1 :         PyObject *mem_ctx_obj = NULL;
   10379           1 :         TALLOC_CTX *mem_ctx = NULL;
   10380           1 :         int level = 0;
   10381           1 :         PyObject *in_obj = NULL;
   10382           1 :         union srvsvc_NetShareInfo *in = NULL;
   10383             : 
   10384           1 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   10385             :                 discard_const_p(char *, kwnames),
   10386             :                 &mem_ctx_obj,
   10387             :                 &level,
   10388             :                 &in_obj)) {
   10389           0 :                 return NULL;
   10390             :         }
   10391           1 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   10392           1 :         if (mem_ctx == NULL) {
   10393           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   10394           0 :                 return NULL;
   10395             :         }
   10396           1 :         in = (union srvsvc_NetShareInfo *)pytalloc_get_ptr(in_obj);
   10397           1 :         if (in == NULL) {
   10398           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetShareInfo!");
   10399           0 :                 return NULL;
   10400             :         }
   10401             : 
   10402           1 :         return py_import_srvsvc_NetShareInfo(mem_ctx, level, in);
   10403             : }
   10404             : 
   10405           0 : static PyObject *py_srvsvc_NetShareInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10406             : {
   10407           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   10408           0 :         PyObject *mem_ctx_obj = NULL;
   10409           0 :         TALLOC_CTX *mem_ctx = NULL;
   10410           0 :         int level = 0;
   10411           0 :         PyObject *in = NULL;
   10412           0 :         union srvsvc_NetShareInfo *out = NULL;
   10413             : 
   10414           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   10415             :                 discard_const_p(char *, kwnames),
   10416             :                 &mem_ctx_obj,
   10417             :                 &level,
   10418             :                 &in)) {
   10419           0 :                 return NULL;
   10420             :         }
   10421           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   10422           0 :         if (mem_ctx == NULL) {
   10423           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   10424           0 :                 return NULL;
   10425             :         }
   10426             : 
   10427           0 :         out = py_export_srvsvc_NetShareInfo(mem_ctx, level, in);
   10428           0 :         if (out == NULL) {
   10429           0 :                 return NULL;
   10430             :         }
   10431             : 
   10432           0 :         return pytalloc_GenericObject_reference(out);
   10433             : }
   10434             : 
   10435             : static PyMethodDef py_srvsvc_NetShareInfo_methods[] = {
   10436             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareInfo_import),
   10437             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   10438             :                 "T.__import__(mem_ctx, level, in) => ret." },
   10439             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareInfo_export),
   10440             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   10441             :                 "T.__export__(mem_ctx, level, in) => ret." },
   10442             :         { NULL, NULL, 0, NULL }
   10443             : };
   10444             : 
   10445           0 : static PyObject *py_srvsvc_NetShareInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10446             : {
   10447           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   10448           0 :         return NULL;
   10449             : }
   10450             : 
   10451             : 
   10452             : static PyTypeObject srvsvc_NetShareInfo_Type = {
   10453             :         PyVarObject_HEAD_INIT(NULL, 0)
   10454             :         .tp_name = "srvsvc.NetShareInfo",
   10455             :         .tp_getset = NULL,
   10456             :         .tp_methods = py_srvsvc_NetShareInfo_methods,
   10457             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10458             :         .tp_new = py_srvsvc_NetShareInfo_new,
   10459             : };
   10460             : 
   10461           0 : static PyObject *py_import_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareCtr *in)
   10462             : {
   10463           0 :         PyObject *ret;
   10464             : 
   10465           0 :         switch (level) {
   10466           0 :                 case 0:
   10467           0 :                         if (in->ctr0 == NULL) {
   10468           0 :                                 ret = Py_None;
   10469           0 :                                 Py_INCREF(ret);
   10470             :                         } else {
   10471           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr0_Type, in->ctr0, in->ctr0);
   10472             :                         }
   10473           0 :                         return ret;
   10474             : 
   10475           0 :                 case 1:
   10476           0 :                         if (in->ctr1 == NULL) {
   10477           0 :                                 ret = Py_None;
   10478           0 :                                 Py_INCREF(ret);
   10479             :                         } else {
   10480           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1_Type, in->ctr1, in->ctr1);
   10481             :                         }
   10482           0 :                         return ret;
   10483             : 
   10484           0 :                 case 2:
   10485           0 :                         if (in->ctr2 == NULL) {
   10486           0 :                                 ret = Py_None;
   10487           0 :                                 Py_INCREF(ret);
   10488             :                         } else {
   10489           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr2_Type, in->ctr2, in->ctr2);
   10490             :                         }
   10491           0 :                         return ret;
   10492             : 
   10493           0 :                 case 501:
   10494           0 :                         if (in->ctr501 == NULL) {
   10495           0 :                                 ret = Py_None;
   10496           0 :                                 Py_INCREF(ret);
   10497             :                         } else {
   10498           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr501_Type, in->ctr501, in->ctr501);
   10499             :                         }
   10500           0 :                         return ret;
   10501             : 
   10502           0 :                 case 502:
   10503           0 :                         if (in->ctr502 == NULL) {
   10504           0 :                                 ret = Py_None;
   10505           0 :                                 Py_INCREF(ret);
   10506             :                         } else {
   10507           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr502_Type, in->ctr502, in->ctr502);
   10508             :                         }
   10509           0 :                         return ret;
   10510             : 
   10511           0 :                 case 1004:
   10512           0 :                         if (in->ctr1004 == NULL) {
   10513           0 :                                 ret = Py_None;
   10514           0 :                                 Py_INCREF(ret);
   10515             :                         } else {
   10516           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1004_Type, in->ctr1004, in->ctr1004);
   10517             :                         }
   10518           0 :                         return ret;
   10519             : 
   10520           0 :                 case 1005:
   10521           0 :                         if (in->ctr1005 == NULL) {
   10522           0 :                                 ret = Py_None;
   10523           0 :                                 Py_INCREF(ret);
   10524             :                         } else {
   10525           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1005_Type, in->ctr1005, in->ctr1005);
   10526             :                         }
   10527           0 :                         return ret;
   10528             : 
   10529           0 :                 case 1006:
   10530           0 :                         if (in->ctr1006 == NULL) {
   10531           0 :                                 ret = Py_None;
   10532           0 :                                 Py_INCREF(ret);
   10533             :                         } else {
   10534           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1006_Type, in->ctr1006, in->ctr1006);
   10535             :                         }
   10536           0 :                         return ret;
   10537             : 
   10538           0 :                 case 1007:
   10539           0 :                         if (in->ctr1007 == NULL) {
   10540           0 :                                 ret = Py_None;
   10541           0 :                                 Py_INCREF(ret);
   10542             :                         } else {
   10543           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1007_Type, in->ctr1007, in->ctr1007);
   10544             :                         }
   10545           0 :                         return ret;
   10546             : 
   10547           0 :                 case 1501:
   10548           0 :                         if (in->ctr1501 == NULL) {
   10549           0 :                                 ret = Py_None;
   10550           0 :                                 Py_INCREF(ret);
   10551             :                         } else {
   10552           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1501_Type, in->ctr1501, in->ctr1501);
   10553             :                         }
   10554           0 :                         return ret;
   10555             : 
   10556           0 :                 default:
   10557           0 :                         ret = Py_None;
   10558           0 :                         Py_INCREF(ret);
   10559           0 :                         return ret;
   10560             : 
   10561             :         }
   10562             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   10563             :         return NULL;
   10564             : }
   10565             : 
   10566           0 : static union srvsvc_NetShareCtr *py_export_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   10567             : {
   10568           0 :         union srvsvc_NetShareCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetShareCtr);
   10569           0 :         switch (level) {
   10570           0 :                 case 0:
   10571           0 :                         if (in == NULL) {
   10572           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr0");
   10573           0 :                                 talloc_free(ret); return NULL;
   10574             :                         }
   10575           0 :                         if (in == Py_None) {
   10576           0 :                                 ret->ctr0 = NULL;
   10577             :                         } else {
   10578           0 :                                 ret->ctr0 = NULL;
   10579           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr0_Type, in, talloc_free(ret); return NULL;);
   10580           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10581           0 :                                         PyErr_NoMemory();
   10582           0 :                                         talloc_free(ret); return NULL;
   10583             :                                 }
   10584           0 :                                 ret->ctr0 = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(in);
   10585             :                         }
   10586           0 :                         break;
   10587             : 
   10588           0 :                 case 1:
   10589           0 :                         if (in == NULL) {
   10590           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr1");
   10591           0 :                                 talloc_free(ret); return NULL;
   10592             :                         }
   10593           0 :                         if (in == Py_None) {
   10594           0 :                                 ret->ctr1 = NULL;
   10595             :                         } else {
   10596           0 :                                 ret->ctr1 = NULL;
   10597           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr1_Type, in, talloc_free(ret); return NULL;);
   10598           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10599           0 :                                         PyErr_NoMemory();
   10600           0 :                                         talloc_free(ret); return NULL;
   10601             :                                 }
   10602           0 :                                 ret->ctr1 = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(in);
   10603             :                         }
   10604           0 :                         break;
   10605             : 
   10606           0 :                 case 2:
   10607           0 :                         if (in == NULL) {
   10608           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr2");
   10609           0 :                                 talloc_free(ret); return NULL;
   10610             :                         }
   10611           0 :                         if (in == Py_None) {
   10612           0 :                                 ret->ctr2 = NULL;
   10613             :                         } else {
   10614           0 :                                 ret->ctr2 = NULL;
   10615           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr2_Type, in, talloc_free(ret); return NULL;);
   10616           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10617           0 :                                         PyErr_NoMemory();
   10618           0 :                                         talloc_free(ret); return NULL;
   10619             :                                 }
   10620           0 :                                 ret->ctr2 = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(in);
   10621             :                         }
   10622           0 :                         break;
   10623             : 
   10624           0 :                 case 501:
   10625           0 :                         if (in == NULL) {
   10626           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr501");
   10627           0 :                                 talloc_free(ret); return NULL;
   10628             :                         }
   10629           0 :                         if (in == Py_None) {
   10630           0 :                                 ret->ctr501 = NULL;
   10631             :                         } else {
   10632           0 :                                 ret->ctr501 = NULL;
   10633           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr501_Type, in, talloc_free(ret); return NULL;);
   10634           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10635           0 :                                         PyErr_NoMemory();
   10636           0 :                                         talloc_free(ret); return NULL;
   10637             :                                 }
   10638           0 :                                 ret->ctr501 = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(in);
   10639             :                         }
   10640           0 :                         break;
   10641             : 
   10642           0 :                 case 502:
   10643           0 :                         if (in == NULL) {
   10644           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr502");
   10645           0 :                                 talloc_free(ret); return NULL;
   10646             :                         }
   10647           0 :                         if (in == Py_None) {
   10648           0 :                                 ret->ctr502 = NULL;
   10649             :                         } else {
   10650           0 :                                 ret->ctr502 = NULL;
   10651           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr502_Type, in, talloc_free(ret); return NULL;);
   10652           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10653           0 :                                         PyErr_NoMemory();
   10654           0 :                                         talloc_free(ret); return NULL;
   10655             :                                 }
   10656           0 :                                 ret->ctr502 = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(in);
   10657             :                         }
   10658           0 :                         break;
   10659             : 
   10660           0 :                 case 1004:
   10661           0 :                         if (in == NULL) {
   10662           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr1004");
   10663           0 :                                 talloc_free(ret); return NULL;
   10664             :                         }
   10665           0 :                         if (in == Py_None) {
   10666           0 :                                 ret->ctr1004 = NULL;
   10667             :                         } else {
   10668           0 :                                 ret->ctr1004 = NULL;
   10669           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr1004_Type, in, talloc_free(ret); return NULL;);
   10670           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10671           0 :                                         PyErr_NoMemory();
   10672           0 :                                         talloc_free(ret); return NULL;
   10673             :                                 }
   10674           0 :                                 ret->ctr1004 = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(in);
   10675             :                         }
   10676           0 :                         break;
   10677             : 
   10678           0 :                 case 1005:
   10679           0 :                         if (in == NULL) {
   10680           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr1005");
   10681           0 :                                 talloc_free(ret); return NULL;
   10682             :                         }
   10683           0 :                         if (in == Py_None) {
   10684           0 :                                 ret->ctr1005 = NULL;
   10685             :                         } else {
   10686           0 :                                 ret->ctr1005 = NULL;
   10687           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr1005_Type, in, talloc_free(ret); return NULL;);
   10688           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10689           0 :                                         PyErr_NoMemory();
   10690           0 :                                         talloc_free(ret); return NULL;
   10691             :                                 }
   10692           0 :                                 ret->ctr1005 = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(in);
   10693             :                         }
   10694           0 :                         break;
   10695             : 
   10696           0 :                 case 1006:
   10697           0 :                         if (in == NULL) {
   10698           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr1006");
   10699           0 :                                 talloc_free(ret); return NULL;
   10700             :                         }
   10701           0 :                         if (in == Py_None) {
   10702           0 :                                 ret->ctr1006 = NULL;
   10703             :                         } else {
   10704           0 :                                 ret->ctr1006 = NULL;
   10705           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr1006_Type, in, talloc_free(ret); return NULL;);
   10706           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10707           0 :                                         PyErr_NoMemory();
   10708           0 :                                         talloc_free(ret); return NULL;
   10709             :                                 }
   10710           0 :                                 ret->ctr1006 = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(in);
   10711             :                         }
   10712           0 :                         break;
   10713             : 
   10714           0 :                 case 1007:
   10715           0 :                         if (in == NULL) {
   10716           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr1007");
   10717           0 :                                 talloc_free(ret); return NULL;
   10718             :                         }
   10719           0 :                         if (in == Py_None) {
   10720           0 :                                 ret->ctr1007 = NULL;
   10721             :                         } else {
   10722           0 :                                 ret->ctr1007 = NULL;
   10723           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr1007_Type, in, talloc_free(ret); return NULL;);
   10724           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10725           0 :                                         PyErr_NoMemory();
   10726           0 :                                         talloc_free(ret); return NULL;
   10727             :                                 }
   10728           0 :                                 ret->ctr1007 = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(in);
   10729             :                         }
   10730           0 :                         break;
   10731             : 
   10732           0 :                 case 1501:
   10733           0 :                         if (in == NULL) {
   10734           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr1501");
   10735           0 :                                 talloc_free(ret); return NULL;
   10736             :                         }
   10737           0 :                         if (in == Py_None) {
   10738           0 :                                 ret->ctr1501 = NULL;
   10739             :                         } else {
   10740           0 :                                 ret->ctr1501 = NULL;
   10741           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr1501_Type, in, talloc_free(ret); return NULL;);
   10742           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10743           0 :                                         PyErr_NoMemory();
   10744           0 :                                         talloc_free(ret); return NULL;
   10745             :                                 }
   10746           0 :                                 ret->ctr1501 = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(in);
   10747             :                         }
   10748           0 :                         break;
   10749             : 
   10750           0 :                 default:
   10751           0 :                         break;
   10752             : 
   10753             :         }
   10754             : 
   10755           0 :         return ret;
   10756             : }
   10757             : 
   10758           0 : static PyObject *py_srvsvc_NetShareCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10759             : {
   10760           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   10761           0 :         PyObject *mem_ctx_obj = NULL;
   10762           0 :         TALLOC_CTX *mem_ctx = NULL;
   10763           0 :         int level = 0;
   10764           0 :         PyObject *in_obj = NULL;
   10765           0 :         union srvsvc_NetShareCtr *in = NULL;
   10766             : 
   10767           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   10768             :                 discard_const_p(char *, kwnames),
   10769             :                 &mem_ctx_obj,
   10770             :                 &level,
   10771             :                 &in_obj)) {
   10772           0 :                 return NULL;
   10773             :         }
   10774           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   10775           0 :         if (mem_ctx == NULL) {
   10776           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   10777           0 :                 return NULL;
   10778             :         }
   10779           0 :         in = (union srvsvc_NetShareCtr *)pytalloc_get_ptr(in_obj);
   10780           0 :         if (in == NULL) {
   10781           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetShareCtr!");
   10782           0 :                 return NULL;
   10783             :         }
   10784             : 
   10785           0 :         return py_import_srvsvc_NetShareCtr(mem_ctx, level, in);
   10786             : }
   10787             : 
   10788           0 : static PyObject *py_srvsvc_NetShareCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10789             : {
   10790           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   10791           0 :         PyObject *mem_ctx_obj = NULL;
   10792           0 :         TALLOC_CTX *mem_ctx = NULL;
   10793           0 :         int level = 0;
   10794           0 :         PyObject *in = NULL;
   10795           0 :         union srvsvc_NetShareCtr *out = NULL;
   10796             : 
   10797           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   10798             :                 discard_const_p(char *, kwnames),
   10799             :                 &mem_ctx_obj,
   10800             :                 &level,
   10801             :                 &in)) {
   10802           0 :                 return NULL;
   10803             :         }
   10804           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   10805           0 :         if (mem_ctx == NULL) {
   10806           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   10807           0 :                 return NULL;
   10808             :         }
   10809             : 
   10810           0 :         out = py_export_srvsvc_NetShareCtr(mem_ctx, level, in);
   10811           0 :         if (out == NULL) {
   10812           0 :                 return NULL;
   10813             :         }
   10814             : 
   10815           0 :         return pytalloc_GenericObject_reference(out);
   10816             : }
   10817             : 
   10818             : static PyMethodDef py_srvsvc_NetShareCtr_methods[] = {
   10819             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareCtr_import),
   10820             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   10821             :                 "T.__import__(mem_ctx, level, in) => ret." },
   10822             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareCtr_export),
   10823             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   10824             :                 "T.__export__(mem_ctx, level, in) => ret." },
   10825             :         { NULL, NULL, 0, NULL }
   10826             : };
   10827             : 
   10828           0 : static PyObject *py_srvsvc_NetShareCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10829             : {
   10830           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   10831           0 :         return NULL;
   10832             : }
   10833             : 
   10834             : 
   10835             : static PyTypeObject srvsvc_NetShareCtr_Type = {
   10836             :         PyVarObject_HEAD_INIT(NULL, 0)
   10837             :         .tp_name = "srvsvc.NetShareCtr",
   10838             :         .tp_getset = NULL,
   10839             :         .tp_methods = py_srvsvc_NetShareCtr_methods,
   10840             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10841             :         .tp_new = py_srvsvc_NetShareCtr_new,
   10842             : };
   10843             : 
   10844             : 
   10845           0 : static PyObject *py_srvsvc_NetShareInfoCtr_get_level(PyObject *obj, void *closure)
   10846             : {
   10847           0 :         struct srvsvc_NetShareInfoCtr *object = pytalloc_get_ptr(obj);
   10848           0 :         PyObject *py_level;
   10849           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->level));
   10850           0 :         return py_level;
   10851             : }
   10852             : 
   10853           0 : static int py_srvsvc_NetShareInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
   10854             : {
   10855           0 :         struct srvsvc_NetShareInfoCtr *object = pytalloc_get_ptr(py_obj);
   10856           0 :         if (value == NULL) {
   10857           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->level");
   10858           0 :                 return -1;
   10859             :         }
   10860             :         {
   10861           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
   10862           0 :                 if (PyLong_Check(value)) {
   10863           0 :                         unsigned long long test_var;
   10864           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10865           0 :                         if (PyErr_Occurred() != NULL) {
   10866           0 :                                 return -1;
   10867             :                         }
   10868           0 :                         if (test_var > uint_max) {
   10869           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10870             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10871           0 :                                 return -1;
   10872             :                         }
   10873           0 :                         object->level = test_var;
   10874             :                 } else {
   10875           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10876             :                           PyLong_Type.tp_name);
   10877           0 :                         return -1;
   10878             :                 }
   10879             :         }
   10880           0 :         return 0;
   10881             : }
   10882             : 
   10883           0 : static PyObject *py_srvsvc_NetShareInfoCtr_get_ctr(PyObject *obj, void *closure)
   10884             : {
   10885           0 :         struct srvsvc_NetShareInfoCtr *object = pytalloc_get_ptr(obj);
   10886           0 :         PyObject *py_ctr;
   10887           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetShareCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetShareCtr");
   10888           0 :         if (py_ctr == NULL) {
   10889           0 :                 return NULL;
   10890             :         }
   10891           0 :         return py_ctr;
   10892             : }
   10893             : 
   10894           0 : static int py_srvsvc_NetShareInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   10895             : {
   10896           0 :         struct srvsvc_NetShareInfoCtr *object = pytalloc_get_ptr(py_obj);
   10897           0 :         if (value == NULL) {
   10898           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ctr");
   10899           0 :                 return -1;
   10900             :         }
   10901             :         {
   10902           0 :                 union srvsvc_NetShareCtr *ctr_switch_0;
   10903           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");
   10904           0 :                 if (ctr_switch_0 == NULL) {
   10905           0 :                         return -1;
   10906             :                 }
   10907           0 :                 object->ctr = *ctr_switch_0;
   10908             :         }
   10909           0 :         return 0;
   10910             : }
   10911             : 
   10912             : static PyGetSetDef py_srvsvc_NetShareInfoCtr_getsetters[] = {
   10913             :         {
   10914             :                 .name = discard_const_p(char, "level"),
   10915             :                 .get = py_srvsvc_NetShareInfoCtr_get_level,
   10916             :                 .set = py_srvsvc_NetShareInfoCtr_set_level,
   10917             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10918             :         },
   10919             :         {
   10920             :                 .name = discard_const_p(char, "ctr"),
   10921             :                 .get = py_srvsvc_NetShareInfoCtr_get_ctr,
   10922             :                 .set = py_srvsvc_NetShareInfoCtr_set_ctr,
   10923             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareCtr")
   10924             :         },
   10925             :         { .name = NULL }
   10926             : };
   10927             : 
   10928           0 : static PyObject *py_srvsvc_NetShareInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10929             : {
   10930           0 :         return pytalloc_new(struct srvsvc_NetShareInfoCtr, type);
   10931             : }
   10932             : 
   10933             : 
   10934             : static PyTypeObject srvsvc_NetShareInfoCtr_Type = {
   10935             :         PyVarObject_HEAD_INIT(NULL, 0)
   10936             :         .tp_name = "srvsvc.NetShareInfoCtr",
   10937             :         .tp_getset = py_srvsvc_NetShareInfoCtr_getsetters,
   10938             :         .tp_methods = NULL,
   10939             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10940             :         .tp_new = py_srvsvc_NetShareInfoCtr_new,
   10941             : };
   10942             : 
   10943             : 
   10944           0 : static PyObject *py_srvsvc_NetSrvInfo100_get_platform_id(PyObject *obj, void *closure)
   10945             : {
   10946           0 :         struct srvsvc_NetSrvInfo100 *object = pytalloc_get_ptr(obj);
   10947           0 :         PyObject *py_platform_id;
   10948           0 :         py_platform_id = PyLong_FromUnsignedLongLong((uint32_t)(object->platform_id));
   10949           0 :         return py_platform_id;
   10950             : }
   10951             : 
   10952           0 : static int py_srvsvc_NetSrvInfo100_set_platform_id(PyObject *py_obj, PyObject *value, void *closure)
   10953             : {
   10954           0 :         struct srvsvc_NetSrvInfo100 *object = pytalloc_get_ptr(py_obj);
   10955           0 :         if (value == NULL) {
   10956           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->platform_id");
   10957           0 :                 return -1;
   10958             :         }
   10959             :         {
   10960           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->platform_id));
   10961           0 :                 if (PyLong_Check(value)) {
   10962           0 :                         unsigned long long test_var;
   10963           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10964           0 :                         if (PyErr_Occurred() != NULL) {
   10965           0 :                                 return -1;
   10966             :                         }
   10967           0 :                         if (test_var > uint_max) {
   10968           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10969             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10970           0 :                                 return -1;
   10971             :                         }
   10972           0 :                         object->platform_id = test_var;
   10973             :                 } else {
   10974           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10975             :                           PyLong_Type.tp_name);
   10976           0 :                         return -1;
   10977             :                 }
   10978             :         }
   10979           0 :         return 0;
   10980             : }
   10981             : 
   10982           0 : static PyObject *py_srvsvc_NetSrvInfo100_get_server_name(PyObject *obj, void *closure)
   10983             : {
   10984           0 :         struct srvsvc_NetSrvInfo100 *object = pytalloc_get_ptr(obj);
   10985           0 :         PyObject *py_server_name;
   10986           0 :         if (object->server_name == NULL) {
   10987           0 :                 Py_RETURN_NONE;
   10988             :         }
   10989           0 :         if (object->server_name == NULL) {
   10990           0 :                 py_server_name = Py_None;
   10991           0 :                 Py_INCREF(py_server_name);
   10992             :         } else {
   10993           0 :                 if (object->server_name == NULL) {
   10994           0 :                         py_server_name = Py_None;
   10995           0 :                         Py_INCREF(py_server_name);
   10996             :                 } else {
   10997           0 :                         py_server_name = PyUnicode_Decode(object->server_name, strlen(object->server_name), "utf-8", "ignore");
   10998             :                 }
   10999             :         }
   11000           0 :         return py_server_name;
   11001             : }
   11002             : 
   11003           0 : static int py_srvsvc_NetSrvInfo100_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   11004             : {
   11005           0 :         struct srvsvc_NetSrvInfo100 *object = pytalloc_get_ptr(py_obj);
   11006           0 :         if (value == NULL) {
   11007           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->server_name");
   11008           0 :                 return -1;
   11009             :         }
   11010           0 :         if (value == Py_None) {
   11011           0 :                 object->server_name = NULL;
   11012             :         } else {
   11013           0 :                 object->server_name = NULL;
   11014             :                 {
   11015           0 :                         const char *test_str;
   11016           0 :                         const char *talloc_str;
   11017           0 :                         PyObject *unicode = NULL;
   11018           0 :                         if (PyUnicode_Check(value)) {
   11019           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   11020           0 :                                 if (unicode == NULL) {
   11021           0 :                                         return -1;
   11022             :                                 }
   11023           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   11024           0 :                         } else if (PyBytes_Check(value)) {
   11025           0 :                                 test_str = PyBytes_AS_STRING(value);
   11026             :                         } else {
   11027           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   11028           0 :                                 return -1;
   11029             :                         }
   11030           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   11031           0 :                         if (unicode != NULL) {
   11032           0 :                                 Py_DECREF(unicode);
   11033             :                         }
   11034           0 :                         if (talloc_str == NULL) {
   11035           0 :                                 PyErr_NoMemory();
   11036           0 :                                 return -1;
   11037             :                         }
   11038           0 :                         object->server_name = talloc_str;
   11039             :                 }
   11040             :         }
   11041           0 :         return 0;
   11042             : }
   11043             : 
   11044             : static PyGetSetDef py_srvsvc_NetSrvInfo100_getsetters[] = {
   11045             :         {
   11046             :                 .name = discard_const_p(char, "platform_id"),
   11047             :                 .get = py_srvsvc_NetSrvInfo100_get_platform_id,
   11048             :                 .set = py_srvsvc_NetSrvInfo100_set_platform_id,
   11049             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_PlatformId")
   11050             :         },
   11051             :         {
   11052             :                 .name = discard_const_p(char, "server_name"),
   11053             :                 .get = py_srvsvc_NetSrvInfo100_get_server_name,
   11054             :                 .set = py_srvsvc_NetSrvInfo100_set_server_name,
   11055             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   11056             :         },
   11057             :         { .name = NULL }
   11058             : };
   11059             : 
   11060           0 : static PyObject *py_srvsvc_NetSrvInfo100_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11061             : {
   11062           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo100, type);
   11063             : }
   11064             : 
   11065           0 : static PyObject *py_srvsvc_NetSrvInfo100_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   11066             : {
   11067           0 :         struct srvsvc_NetSrvInfo100 *object = pytalloc_get_ptr(py_obj);
   11068           0 :         PyObject *ret = NULL;
   11069           0 :         DATA_BLOB blob;
   11070           0 :         enum ndr_err_code err;
   11071           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   11072           0 :         if (tmp_ctx == NULL) {
   11073           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11074           0 :                 return NULL;
   11075             :         }
   11076           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSrvInfo100);
   11077           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11078           0 :                 TALLOC_FREE(tmp_ctx);
   11079           0 :                 PyErr_SetNdrError(err);
   11080           0 :                 return NULL;
   11081             :         }
   11082             : 
   11083           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11084           0 :         TALLOC_FREE(tmp_ctx);
   11085           0 :         return ret;
   11086             : }
   11087             : 
   11088           0 : static PyObject *py_srvsvc_NetSrvInfo100_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11089             : {
   11090           0 :         struct srvsvc_NetSrvInfo100 *object = pytalloc_get_ptr(py_obj);
   11091           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   11092           0 :         Py_ssize_t blob_length = 0;
   11093           0 :         enum ndr_err_code err;
   11094           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   11095           0 :         PyObject *allow_remaining_obj = NULL;
   11096           0 :         bool allow_remaining = false;
   11097             : 
   11098           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   11099             :                 discard_const_p(char *, kwnames),
   11100             :                 &blob.data, &blob_length,
   11101             :                 &allow_remaining_obj)) {
   11102           0 :                 return NULL;
   11103             :         }
   11104           0 :         blob.length = blob_length;
   11105             : 
   11106           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11107           0 :                 allow_remaining = true;
   11108             :         }
   11109             : 
   11110           0 :         if (allow_remaining) {
   11111           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvInfo100);
   11112             :         } else {
   11113           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvInfo100);
   11114             :         }
   11115           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11116           0 :                 PyErr_SetNdrError(err);
   11117           0 :                 return NULL;
   11118             :         }
   11119             : 
   11120           0 :         Py_RETURN_NONE;
   11121             : }
   11122             : 
   11123           0 : static PyObject *py_srvsvc_NetSrvInfo100_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11124             : {
   11125           0 :         struct srvsvc_NetSrvInfo100 *object = pytalloc_get_ptr(py_obj);
   11126           0 :         PyObject *ret;
   11127           0 :         char *retstr;
   11128             : 
   11129           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_srvsvc_NetSrvInfo100, "srvsvc_NetSrvInfo100", object);
   11130           0 :         ret = PyUnicode_FromString(retstr);
   11131           0 :         talloc_free(retstr);
   11132             : 
   11133           0 :         return ret;
   11134             : }
   11135             : 
   11136             : static PyMethodDef py_srvsvc_NetSrvInfo100_methods[] = {
   11137             :         { "__ndr_pack__", (PyCFunction)py_srvsvc_NetSrvInfo100_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   11138             :         { "__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" },
   11139             :         { "__ndr_print__", (PyCFunction)py_srvsvc_NetSrvInfo100_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   11140             :         { NULL, NULL, 0, NULL }
   11141             : };
   11142             : 
   11143             : 
   11144             : static PyTypeObject srvsvc_NetSrvInfo100_Type = {
   11145             :         PyVarObject_HEAD_INIT(NULL, 0)
   11146             :         .tp_name = "srvsvc.NetSrvInfo100",
   11147             :         .tp_getset = py_srvsvc_NetSrvInfo100_getsetters,
   11148             :         .tp_methods = py_srvsvc_NetSrvInfo100_methods,
   11149             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11150             :         .tp_new = py_srvsvc_NetSrvInfo100_new,
   11151             : };
   11152             : 
   11153             : 
   11154           0 : static PyObject *py_srvsvc_NetSrvInfo101_get_platform_id(PyObject *obj, void *closure)
   11155             : {
   11156           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(obj);
   11157           0 :         PyObject *py_platform_id;
   11158           0 :         py_platform_id = PyLong_FromUnsignedLongLong((uint32_t)(object->platform_id));
   11159           0 :         return py_platform_id;
   11160             : }
   11161             : 
   11162           0 : static int py_srvsvc_NetSrvInfo101_set_platform_id(PyObject *py_obj, PyObject *value, void *closure)
   11163             : {
   11164           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(py_obj);
   11165           0 :         if (value == NULL) {
   11166           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->platform_id");
   11167           0 :                 return -1;
   11168             :         }
   11169             :         {
   11170           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->platform_id));
   11171           0 :                 if (PyLong_Check(value)) {
   11172           0 :                         unsigned long long test_var;
   11173           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11174           0 :                         if (PyErr_Occurred() != NULL) {
   11175           0 :                                 return -1;
   11176             :                         }
   11177           0 :                         if (test_var > uint_max) {
   11178           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11179             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11180           0 :                                 return -1;
   11181             :                         }
   11182           0 :                         object->platform_id = test_var;
   11183             :                 } else {
   11184           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11185             :                           PyLong_Type.tp_name);
   11186           0 :                         return -1;
   11187             :                 }
   11188             :         }
   11189           0 :         return 0;
   11190             : }
   11191             : 
   11192           0 : static PyObject *py_srvsvc_NetSrvInfo101_get_server_name(PyObject *obj, void *closure)
   11193             : {
   11194           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(obj);
   11195           0 :         PyObject *py_server_name;
   11196           0 :         if (object->server_name == NULL) {
   11197           0 :                 Py_RETURN_NONE;
   11198             :         }
   11199           0 :         if (object->server_name == NULL) {
   11200           0 :                 py_server_name = Py_None;
   11201           0 :                 Py_INCREF(py_server_name);
   11202             :         } else {
   11203           0 :                 if (object->server_name == NULL) {
   11204           0 :                         py_server_name = Py_None;
   11205           0 :                         Py_INCREF(py_server_name);
   11206             :                 } else {
   11207           0 :                         py_server_name = PyUnicode_Decode(object->server_name, strlen(object->server_name), "utf-8", "ignore");
   11208             :                 }
   11209             :         }
   11210           0 :         return py_server_name;
   11211             : }
   11212             : 
   11213           0 : static int py_srvsvc_NetSrvInfo101_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   11214             : {
   11215           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(py_obj);
   11216           0 :         if (value == NULL) {
   11217           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->server_name");
   11218           0 :                 return -1;
   11219             :         }
   11220           0 :         if (value == Py_None) {
   11221           0 :                 object->server_name = NULL;
   11222             :         } else {
   11223           0 :                 object->server_name = NULL;
   11224             :                 {
   11225           0 :                         const char *test_str;
   11226           0 :                         const char *talloc_str;
   11227           0 :                         PyObject *unicode = NULL;
   11228           0 :                         if (PyUnicode_Check(value)) {
   11229           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   11230           0 :                                 if (unicode == NULL) {
   11231           0 :                                         return -1;
   11232             :                                 }
   11233           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   11234           0 :                         } else if (PyBytes_Check(value)) {
   11235           0 :                                 test_str = PyBytes_AS_STRING(value);
   11236             :                         } else {
   11237           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   11238           0 :                                 return -1;
   11239             :                         }
   11240           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   11241           0 :                         if (unicode != NULL) {
   11242           0 :                                 Py_DECREF(unicode);
   11243             :                         }
   11244           0 :                         if (talloc_str == NULL) {
   11245           0 :                                 PyErr_NoMemory();
   11246           0 :                                 return -1;
   11247             :                         }
   11248           0 :                         object->server_name = talloc_str;
   11249             :                 }
   11250             :         }
   11251           0 :         return 0;
   11252             : }
   11253             : 
   11254           0 : static PyObject *py_srvsvc_NetSrvInfo101_get_version_major(PyObject *obj, void *closure)
   11255             : {
   11256           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(obj);
   11257           0 :         PyObject *py_version_major;
   11258           0 :         py_version_major = PyLong_FromUnsignedLongLong((uint32_t)(object->version_major));
   11259           0 :         return py_version_major;
   11260             : }
   11261             : 
   11262           0 : static int py_srvsvc_NetSrvInfo101_set_version_major(PyObject *py_obj, PyObject *value, void *closure)
   11263             : {
   11264           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(py_obj);
   11265           0 :         if (value == NULL) {
   11266           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->version_major");
   11267           0 :                 return -1;
   11268             :         }
   11269             :         {
   11270           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_major));
   11271           0 :                 if (PyLong_Check(value)) {
   11272           0 :                         unsigned long long test_var;
   11273           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11274           0 :                         if (PyErr_Occurred() != NULL) {
   11275           0 :                                 return -1;
   11276             :                         }
   11277           0 :                         if (test_var > uint_max) {
   11278           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11279             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11280           0 :                                 return -1;
   11281             :                         }
   11282           0 :                         object->version_major = test_var;
   11283             :                 } else {
   11284           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11285             :                           PyLong_Type.tp_name);
   11286           0 :                         return -1;
   11287             :                 }
   11288             :         }
   11289           0 :         return 0;
   11290             : }
   11291             : 
   11292           0 : static PyObject *py_srvsvc_NetSrvInfo101_get_version_minor(PyObject *obj, void *closure)
   11293             : {
   11294           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(obj);
   11295           0 :         PyObject *py_version_minor;
   11296           0 :         py_version_minor = PyLong_FromUnsignedLongLong((uint32_t)(object->version_minor));
   11297           0 :         return py_version_minor;
   11298             : }
   11299             : 
   11300           0 : static int py_srvsvc_NetSrvInfo101_set_version_minor(PyObject *py_obj, PyObject *value, void *closure)
   11301             : {
   11302           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(py_obj);
   11303           0 :         if (value == NULL) {
   11304           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->version_minor");
   11305           0 :                 return -1;
   11306             :         }
   11307             :         {
   11308           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_minor));
   11309           0 :                 if (PyLong_Check(value)) {
   11310           0 :                         unsigned long long test_var;
   11311           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11312           0 :                         if (PyErr_Occurred() != NULL) {
   11313           0 :                                 return -1;
   11314             :                         }
   11315           0 :                         if (test_var > uint_max) {
   11316           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11317             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11318           0 :                                 return -1;
   11319             :                         }
   11320           0 :                         object->version_minor = test_var;
   11321             :                 } else {
   11322           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11323             :                           PyLong_Type.tp_name);
   11324           0 :                         return -1;
   11325             :                 }
   11326             :         }
   11327           0 :         return 0;
   11328             : }
   11329             : 
   11330           0 : static PyObject *py_srvsvc_NetSrvInfo101_get_server_type(PyObject *obj, void *closure)
   11331             : {
   11332           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(obj);
   11333           0 :         PyObject *py_server_type;
   11334           0 :         py_server_type = PyLong_FromUnsignedLongLong((uint32_t)(object->server_type));
   11335           0 :         return py_server_type;
   11336             : }
   11337             : 
   11338           0 : static int py_srvsvc_NetSrvInfo101_set_server_type(PyObject *py_obj, PyObject *value, void *closure)
   11339             : {
   11340           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(py_obj);
   11341           0 :         if (value == NULL) {
   11342           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->server_type");
   11343           0 :                 return -1;
   11344             :         }
   11345             :         {
   11346           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->server_type));
   11347           0 :                 if (PyLong_Check(value)) {
   11348           0 :                         unsigned long long test_var;
   11349           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11350           0 :                         if (PyErr_Occurred() != NULL) {
   11351           0 :                                 return -1;
   11352             :                         }
   11353           0 :                         if (test_var > uint_max) {
   11354           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11355             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11356           0 :                                 return -1;
   11357             :                         }
   11358           0 :                         object->server_type = test_var;
   11359             :                 } else {
   11360           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11361             :                           PyLong_Type.tp_name);
   11362           0 :                         return -1;
   11363             :                 }
   11364             :         }
   11365           0 :         return 0;
   11366             : }
   11367             : 
   11368           0 : static PyObject *py_srvsvc_NetSrvInfo101_get_comment(PyObject *obj, void *closure)
   11369             : {
   11370           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(obj);
   11371           0 :         PyObject *py_comment;
   11372           0 :         if (object->comment == NULL) {
   11373           0 :                 Py_RETURN_NONE;
   11374             :         }
   11375           0 :         if (object->comment == NULL) {
   11376           0 :                 py_comment = Py_None;
   11377           0 :                 Py_INCREF(py_comment);
   11378             :         } else {
   11379           0 :                 if (object->comment == NULL) {
   11380           0 :                         py_comment = Py_None;
   11381           0 :                         Py_INCREF(py_comment);
   11382             :                 } else {
   11383           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
   11384             :                 }
   11385             :         }
   11386           0 :         return py_comment;
   11387             : }
   11388             : 
   11389           0 : static int py_srvsvc_NetSrvInfo101_set_comment(PyObject *py_obj, PyObject *value, void *closure)
   11390             : {
   11391           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(py_obj);
   11392           0 :         if (value == NULL) {
   11393           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
   11394           0 :                 return -1;
   11395             :         }
   11396           0 :         if (value == Py_None) {
   11397           0 :                 object->comment = NULL;
   11398             :         } else {
   11399           0 :                 object->comment = NULL;
   11400             :                 {
   11401           0 :                         const char *test_str;
   11402           0 :                         const char *talloc_str;
   11403           0 :                         PyObject *unicode = NULL;
   11404           0 :                         if (PyUnicode_Check(value)) {
   11405           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   11406           0 :                                 if (unicode == NULL) {
   11407           0 :                                         return -1;
   11408             :                                 }
   11409           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   11410           0 :                         } else if (PyBytes_Check(value)) {
   11411           0 :                                 test_str = PyBytes_AS_STRING(value);
   11412             :                         } else {
   11413           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   11414           0 :                                 return -1;
   11415             :                         }
   11416           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   11417           0 :                         if (unicode != NULL) {
   11418           0 :                                 Py_DECREF(unicode);
   11419             :                         }
   11420           0 :                         if (talloc_str == NULL) {
   11421           0 :                                 PyErr_NoMemory();
   11422           0 :                                 return -1;
   11423             :                         }
   11424           0 :                         object->comment = talloc_str;
   11425             :                 }
   11426             :         }
   11427           0 :         return 0;
   11428             : }
   11429             : 
   11430             : static PyGetSetDef py_srvsvc_NetSrvInfo101_getsetters[] = {
   11431             :         {
   11432             :                 .name = discard_const_p(char, "platform_id"),
   11433             :                 .get = py_srvsvc_NetSrvInfo101_get_platform_id,
   11434             :                 .set = py_srvsvc_NetSrvInfo101_set_platform_id,
   11435             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_PlatformId")
   11436             :         },
   11437             :         {
   11438             :                 .name = discard_const_p(char, "server_name"),
   11439             :                 .get = py_srvsvc_NetSrvInfo101_get_server_name,
   11440             :                 .set = py_srvsvc_NetSrvInfo101_set_server_name,
   11441             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   11442             :         },
   11443             :         {
   11444             :                 .name = discard_const_p(char, "version_major"),
   11445             :                 .get = py_srvsvc_NetSrvInfo101_get_version_major,
   11446             :                 .set = py_srvsvc_NetSrvInfo101_set_version_major,
   11447             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11448             :         },
   11449             :         {
   11450             :                 .name = discard_const_p(char, "version_minor"),
   11451             :                 .get = py_srvsvc_NetSrvInfo101_get_version_minor,
   11452             :                 .set = py_srvsvc_NetSrvInfo101_set_version_minor,
   11453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11454             :         },
   11455             :         {
   11456             :                 .name = discard_const_p(char, "server_type"),
   11457             :                 .get = py_srvsvc_NetSrvInfo101_get_server_type,
   11458             :                 .set = py_srvsvc_NetSrvInfo101_set_server_type,
   11459             :                 .doc = discard_const_p(char, "PIDL-generated element of base type svcctl_ServerType")
   11460             :         },
   11461             :         {
   11462             :                 .name = discard_const_p(char, "comment"),
   11463             :                 .get = py_srvsvc_NetSrvInfo101_get_comment,
   11464             :                 .set = py_srvsvc_NetSrvInfo101_set_comment,
   11465             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   11466             :         },
   11467             :         { .name = NULL }
   11468             : };
   11469             : 
   11470           0 : static PyObject *py_srvsvc_NetSrvInfo101_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11471             : {
   11472           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo101, type);
   11473             : }
   11474             : 
   11475           0 : static PyObject *py_srvsvc_NetSrvInfo101_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   11476             : {
   11477           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(py_obj);
   11478           0 :         PyObject *ret = NULL;
   11479           0 :         DATA_BLOB blob;
   11480           0 :         enum ndr_err_code err;
   11481           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   11482           0 :         if (tmp_ctx == NULL) {
   11483           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11484           0 :                 return NULL;
   11485             :         }
   11486           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSrvInfo101);
   11487           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11488           0 :                 TALLOC_FREE(tmp_ctx);
   11489           0 :                 PyErr_SetNdrError(err);
   11490           0 :                 return NULL;
   11491             :         }
   11492             : 
   11493           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11494           0 :         TALLOC_FREE(tmp_ctx);
   11495           0 :         return ret;
   11496             : }
   11497             : 
   11498           0 : static PyObject *py_srvsvc_NetSrvInfo101_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11499             : {
   11500           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(py_obj);
   11501           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   11502           0 :         Py_ssize_t blob_length = 0;
   11503           0 :         enum ndr_err_code err;
   11504           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   11505           0 :         PyObject *allow_remaining_obj = NULL;
   11506           0 :         bool allow_remaining = false;
   11507             : 
   11508           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   11509             :                 discard_const_p(char *, kwnames),
   11510             :                 &blob.data, &blob_length,
   11511             :                 &allow_remaining_obj)) {
   11512           0 :                 return NULL;
   11513             :         }
   11514           0 :         blob.length = blob_length;
   11515             : 
   11516           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11517           0 :                 allow_remaining = true;
   11518             :         }
   11519             : 
   11520           0 :         if (allow_remaining) {
   11521           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvInfo101);
   11522             :         } else {
   11523           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvInfo101);
   11524             :         }
   11525           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11526           0 :                 PyErr_SetNdrError(err);
   11527           0 :                 return NULL;
   11528             :         }
   11529             : 
   11530           0 :         Py_RETURN_NONE;
   11531             : }
   11532             : 
   11533           0 : static PyObject *py_srvsvc_NetSrvInfo101_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11534             : {
   11535           0 :         struct srvsvc_NetSrvInfo101 *object = pytalloc_get_ptr(py_obj);
   11536           0 :         PyObject *ret;
   11537           0 :         char *retstr;
   11538             : 
   11539           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_srvsvc_NetSrvInfo101, "srvsvc_NetSrvInfo101", object);
   11540           0 :         ret = PyUnicode_FromString(retstr);
   11541           0 :         talloc_free(retstr);
   11542             : 
   11543           0 :         return ret;
   11544             : }
   11545             : 
   11546             : static PyMethodDef py_srvsvc_NetSrvInfo101_methods[] = {
   11547             :         { "__ndr_pack__", (PyCFunction)py_srvsvc_NetSrvInfo101_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   11548             :         { "__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" },
   11549             :         { "__ndr_print__", (PyCFunction)py_srvsvc_NetSrvInfo101_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   11550             :         { NULL, NULL, 0, NULL }
   11551             : };
   11552             : 
   11553             : 
   11554             : static PyTypeObject srvsvc_NetSrvInfo101_Type = {
   11555             :         PyVarObject_HEAD_INIT(NULL, 0)
   11556             :         .tp_name = "srvsvc.NetSrvInfo101",
   11557             :         .tp_getset = py_srvsvc_NetSrvInfo101_getsetters,
   11558             :         .tp_methods = py_srvsvc_NetSrvInfo101_methods,
   11559             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11560             :         .tp_new = py_srvsvc_NetSrvInfo101_new,
   11561             : };
   11562             : 
   11563             : 
   11564           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_platform_id(PyObject *obj, void *closure)
   11565             : {
   11566           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   11567           0 :         PyObject *py_platform_id;
   11568           0 :         py_platform_id = PyLong_FromUnsignedLongLong((uint32_t)(object->platform_id));
   11569           0 :         return py_platform_id;
   11570             : }
   11571             : 
   11572           0 : static int py_srvsvc_NetSrvInfo102_set_platform_id(PyObject *py_obj, PyObject *value, void *closure)
   11573             : {
   11574           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   11575           0 :         if (value == NULL) {
   11576           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->platform_id");
   11577           0 :                 return -1;
   11578             :         }
   11579             :         {
   11580           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->platform_id));
   11581           0 :                 if (PyLong_Check(value)) {
   11582           0 :                         unsigned long long test_var;
   11583           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11584           0 :                         if (PyErr_Occurred() != NULL) {
   11585           0 :                                 return -1;
   11586             :                         }
   11587           0 :                         if (test_var > uint_max) {
   11588           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11589             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11590           0 :                                 return -1;
   11591             :                         }
   11592           0 :                         object->platform_id = test_var;
   11593             :                 } else {
   11594           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11595             :                           PyLong_Type.tp_name);
   11596           0 :                         return -1;
   11597             :                 }
   11598             :         }
   11599           0 :         return 0;
   11600             : }
   11601             : 
   11602           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_server_name(PyObject *obj, void *closure)
   11603             : {
   11604           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   11605           0 :         PyObject *py_server_name;
   11606           0 :         if (object->server_name == NULL) {
   11607           0 :                 Py_RETURN_NONE;
   11608             :         }
   11609           0 :         if (object->server_name == NULL) {
   11610           0 :                 py_server_name = Py_None;
   11611           0 :                 Py_INCREF(py_server_name);
   11612             :         } else {
   11613           0 :                 if (object->server_name == NULL) {
   11614           0 :                         py_server_name = Py_None;
   11615           0 :                         Py_INCREF(py_server_name);
   11616             :                 } else {
   11617           0 :                         py_server_name = PyUnicode_Decode(object->server_name, strlen(object->server_name), "utf-8", "ignore");
   11618             :                 }
   11619             :         }
   11620           0 :         return py_server_name;
   11621             : }
   11622             : 
   11623           0 : static int py_srvsvc_NetSrvInfo102_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   11624             : {
   11625           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   11626           0 :         if (value == NULL) {
   11627           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->server_name");
   11628           0 :                 return -1;
   11629             :         }
   11630           0 :         if (value == Py_None) {
   11631           0 :                 object->server_name = NULL;
   11632             :         } else {
   11633           0 :                 object->server_name = NULL;
   11634             :                 {
   11635           0 :                         const char *test_str;
   11636           0 :                         const char *talloc_str;
   11637           0 :                         PyObject *unicode = NULL;
   11638           0 :                         if (PyUnicode_Check(value)) {
   11639           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   11640           0 :                                 if (unicode == NULL) {
   11641           0 :                                         return -1;
   11642             :                                 }
   11643           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   11644           0 :                         } else if (PyBytes_Check(value)) {
   11645           0 :                                 test_str = PyBytes_AS_STRING(value);
   11646             :                         } else {
   11647           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   11648           0 :                                 return -1;
   11649             :                         }
   11650           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   11651           0 :                         if (unicode != NULL) {
   11652           0 :                                 Py_DECREF(unicode);
   11653             :                         }
   11654           0 :                         if (talloc_str == NULL) {
   11655           0 :                                 PyErr_NoMemory();
   11656           0 :                                 return -1;
   11657             :                         }
   11658           0 :                         object->server_name = talloc_str;
   11659             :                 }
   11660             :         }
   11661           0 :         return 0;
   11662             : }
   11663             : 
   11664           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_version_major(PyObject *obj, void *closure)
   11665             : {
   11666           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   11667           0 :         PyObject *py_version_major;
   11668           0 :         py_version_major = PyLong_FromUnsignedLongLong((uint32_t)(object->version_major));
   11669           0 :         return py_version_major;
   11670             : }
   11671             : 
   11672           0 : static int py_srvsvc_NetSrvInfo102_set_version_major(PyObject *py_obj, PyObject *value, void *closure)
   11673             : {
   11674           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   11675           0 :         if (value == NULL) {
   11676           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->version_major");
   11677           0 :                 return -1;
   11678             :         }
   11679             :         {
   11680           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_major));
   11681           0 :                 if (PyLong_Check(value)) {
   11682           0 :                         unsigned long long test_var;
   11683           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11684           0 :                         if (PyErr_Occurred() != NULL) {
   11685           0 :                                 return -1;
   11686             :                         }
   11687           0 :                         if (test_var > uint_max) {
   11688           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11689             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11690           0 :                                 return -1;
   11691             :                         }
   11692           0 :                         object->version_major = test_var;
   11693             :                 } else {
   11694           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11695             :                           PyLong_Type.tp_name);
   11696           0 :                         return -1;
   11697             :                 }
   11698             :         }
   11699           0 :         return 0;
   11700             : }
   11701             : 
   11702           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_version_minor(PyObject *obj, void *closure)
   11703             : {
   11704           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   11705           0 :         PyObject *py_version_minor;
   11706           0 :         py_version_minor = PyLong_FromUnsignedLongLong((uint32_t)(object->version_minor));
   11707           0 :         return py_version_minor;
   11708             : }
   11709             : 
   11710           0 : static int py_srvsvc_NetSrvInfo102_set_version_minor(PyObject *py_obj, PyObject *value, void *closure)
   11711             : {
   11712           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   11713           0 :         if (value == NULL) {
   11714           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->version_minor");
   11715           0 :                 return -1;
   11716             :         }
   11717             :         {
   11718           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_minor));
   11719           0 :                 if (PyLong_Check(value)) {
   11720           0 :                         unsigned long long test_var;
   11721           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11722           0 :                         if (PyErr_Occurred() != NULL) {
   11723           0 :                                 return -1;
   11724             :                         }
   11725           0 :                         if (test_var > uint_max) {
   11726           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11727             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11728           0 :                                 return -1;
   11729             :                         }
   11730           0 :                         object->version_minor = test_var;
   11731             :                 } else {
   11732           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11733             :                           PyLong_Type.tp_name);
   11734           0 :                         return -1;
   11735             :                 }
   11736             :         }
   11737           0 :         return 0;
   11738             : }
   11739             : 
   11740           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_server_type(PyObject *obj, void *closure)
   11741             : {
   11742           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   11743           0 :         PyObject *py_server_type;
   11744           0 :         py_server_type = PyLong_FromUnsignedLongLong((uint32_t)(object->server_type));
   11745           0 :         return py_server_type;
   11746             : }
   11747             : 
   11748           0 : static int py_srvsvc_NetSrvInfo102_set_server_type(PyObject *py_obj, PyObject *value, void *closure)
   11749             : {
   11750           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   11751           0 :         if (value == NULL) {
   11752           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->server_type");
   11753           0 :                 return -1;
   11754             :         }
   11755             :         {
   11756           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->server_type));
   11757           0 :                 if (PyLong_Check(value)) {
   11758           0 :                         unsigned long long test_var;
   11759           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11760           0 :                         if (PyErr_Occurred() != NULL) {
   11761           0 :                                 return -1;
   11762             :                         }
   11763           0 :                         if (test_var > uint_max) {
   11764           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11765             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11766           0 :                                 return -1;
   11767             :                         }
   11768           0 :                         object->server_type = test_var;
   11769             :                 } else {
   11770           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11771             :                           PyLong_Type.tp_name);
   11772           0 :                         return -1;
   11773             :                 }
   11774             :         }
   11775           0 :         return 0;
   11776             : }
   11777             : 
   11778           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_comment(PyObject *obj, void *closure)
   11779             : {
   11780           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   11781           0 :         PyObject *py_comment;
   11782           0 :         if (object->comment == NULL) {
   11783           0 :                 Py_RETURN_NONE;
   11784             :         }
   11785           0 :         if (object->comment == NULL) {
   11786           0 :                 py_comment = Py_None;
   11787           0 :                 Py_INCREF(py_comment);
   11788             :         } else {
   11789           0 :                 if (object->comment == NULL) {
   11790           0 :                         py_comment = Py_None;
   11791           0 :                         Py_INCREF(py_comment);
   11792             :                 } else {
   11793           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
   11794             :                 }
   11795             :         }
   11796           0 :         return py_comment;
   11797             : }
   11798             : 
   11799           0 : static int py_srvsvc_NetSrvInfo102_set_comment(PyObject *py_obj, PyObject *value, void *closure)
   11800             : {
   11801           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   11802           0 :         if (value == NULL) {
   11803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
   11804           0 :                 return -1;
   11805             :         }
   11806           0 :         if (value == Py_None) {
   11807           0 :                 object->comment = NULL;
   11808             :         } else {
   11809           0 :                 object->comment = NULL;
   11810             :                 {
   11811           0 :                         const char *test_str;
   11812           0 :                         const char *talloc_str;
   11813           0 :                         PyObject *unicode = NULL;
   11814           0 :                         if (PyUnicode_Check(value)) {
   11815           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   11816           0 :                                 if (unicode == NULL) {
   11817           0 :                                         return -1;
   11818             :                                 }
   11819           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   11820           0 :                         } else if (PyBytes_Check(value)) {
   11821           0 :                                 test_str = PyBytes_AS_STRING(value);
   11822             :                         } else {
   11823           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   11824           0 :                                 return -1;
   11825             :                         }
   11826           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   11827           0 :                         if (unicode != NULL) {
   11828           0 :                                 Py_DECREF(unicode);
   11829             :                         }
   11830           0 :                         if (talloc_str == NULL) {
   11831           0 :                                 PyErr_NoMemory();
   11832           0 :                                 return -1;
   11833             :                         }
   11834           0 :                         object->comment = talloc_str;
   11835             :                 }
   11836             :         }
   11837           0 :         return 0;
   11838             : }
   11839             : 
   11840           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_users(PyObject *obj, void *closure)
   11841             : {
   11842           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   11843           0 :         PyObject *py_users;
   11844           0 :         py_users = PyLong_FromUnsignedLongLong((uint32_t)(object->users));
   11845           0 :         return py_users;
   11846             : }
   11847             : 
   11848           0 : static int py_srvsvc_NetSrvInfo102_set_users(PyObject *py_obj, PyObject *value, void *closure)
   11849             : {
   11850           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   11851           0 :         if (value == NULL) {
   11852           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->users");
   11853           0 :                 return -1;
   11854             :         }
   11855             :         {
   11856           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->users));
   11857           0 :                 if (PyLong_Check(value)) {
   11858           0 :                         unsigned long long test_var;
   11859           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11860           0 :                         if (PyErr_Occurred() != NULL) {
   11861           0 :                                 return -1;
   11862             :                         }
   11863           0 :                         if (test_var > uint_max) {
   11864           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11865             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11866           0 :                                 return -1;
   11867             :                         }
   11868           0 :                         object->users = test_var;
   11869             :                 } else {
   11870           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11871             :                           PyLong_Type.tp_name);
   11872           0 :                         return -1;
   11873             :                 }
   11874             :         }
   11875           0 :         return 0;
   11876             : }
   11877             : 
   11878           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_disc(PyObject *obj, void *closure)
   11879             : {
   11880           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   11881           0 :         PyObject *py_disc;
   11882           0 :         py_disc = PyLong_FromUnsignedLongLong((uint32_t)(object->disc));
   11883           0 :         return py_disc;
   11884             : }
   11885             : 
   11886           0 : static int py_srvsvc_NetSrvInfo102_set_disc(PyObject *py_obj, PyObject *value, void *closure)
   11887             : {
   11888           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   11889           0 :         if (value == NULL) {
   11890           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->disc");
   11891           0 :                 return -1;
   11892             :         }
   11893             :         {
   11894           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->disc));
   11895           0 :                 if (PyLong_Check(value)) {
   11896           0 :                         unsigned long long test_var;
   11897           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11898           0 :                         if (PyErr_Occurred() != NULL) {
   11899           0 :                                 return -1;
   11900             :                         }
   11901           0 :                         if (test_var > uint_max) {
   11902           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11903             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11904           0 :                                 return -1;
   11905             :                         }
   11906           0 :                         object->disc = test_var;
   11907             :                 } else {
   11908           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11909             :                           PyLong_Type.tp_name);
   11910           0 :                         return -1;
   11911             :                 }
   11912             :         }
   11913           0 :         return 0;
   11914             : }
   11915             : 
   11916           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_hidden(PyObject *obj, void *closure)
   11917             : {
   11918           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   11919           0 :         PyObject *py_hidden;
   11920           0 :         py_hidden = PyLong_FromUnsignedLongLong((uint32_t)(object->hidden));
   11921           0 :         return py_hidden;
   11922             : }
   11923             : 
   11924           0 : static int py_srvsvc_NetSrvInfo102_set_hidden(PyObject *py_obj, PyObject *value, void *closure)
   11925             : {
   11926           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   11927           0 :         if (value == NULL) {
   11928           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->hidden");
   11929           0 :                 return -1;
   11930             :         }
   11931             :         {
   11932           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hidden));
   11933           0 :                 if (PyLong_Check(value)) {
   11934           0 :                         unsigned long long test_var;
   11935           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11936           0 :                         if (PyErr_Occurred() != NULL) {
   11937           0 :                                 return -1;
   11938             :                         }
   11939           0 :                         if (test_var > uint_max) {
   11940           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11941             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11942           0 :                                 return -1;
   11943             :                         }
   11944           0 :                         object->hidden = test_var;
   11945             :                 } else {
   11946           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11947             :                           PyLong_Type.tp_name);
   11948           0 :                         return -1;
   11949             :                 }
   11950             :         }
   11951           0 :         return 0;
   11952             : }
   11953             : 
   11954           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_announce(PyObject *obj, void *closure)
   11955             : {
   11956           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   11957           0 :         PyObject *py_announce;
   11958           0 :         py_announce = PyLong_FromUnsignedLongLong((uint32_t)(object->announce));
   11959           0 :         return py_announce;
   11960             : }
   11961             : 
   11962           0 : static int py_srvsvc_NetSrvInfo102_set_announce(PyObject *py_obj, PyObject *value, void *closure)
   11963             : {
   11964           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   11965           0 :         if (value == NULL) {
   11966           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->announce");
   11967           0 :                 return -1;
   11968             :         }
   11969             :         {
   11970           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->announce));
   11971           0 :                 if (PyLong_Check(value)) {
   11972           0 :                         unsigned long long test_var;
   11973           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11974           0 :                         if (PyErr_Occurred() != NULL) {
   11975           0 :                                 return -1;
   11976             :                         }
   11977           0 :                         if (test_var > uint_max) {
   11978           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11979             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11980           0 :                                 return -1;
   11981             :                         }
   11982           0 :                         object->announce = test_var;
   11983             :                 } else {
   11984           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11985             :                           PyLong_Type.tp_name);
   11986           0 :                         return -1;
   11987             :                 }
   11988             :         }
   11989           0 :         return 0;
   11990             : }
   11991             : 
   11992           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_anndelta(PyObject *obj, void *closure)
   11993             : {
   11994           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   11995           0 :         PyObject *py_anndelta;
   11996           0 :         py_anndelta = PyLong_FromUnsignedLongLong((uint32_t)(object->anndelta));
   11997           0 :         return py_anndelta;
   11998             : }
   11999             : 
   12000           0 : static int py_srvsvc_NetSrvInfo102_set_anndelta(PyObject *py_obj, PyObject *value, void *closure)
   12001             : {
   12002           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   12003           0 :         if (value == NULL) {
   12004           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->anndelta");
   12005           0 :                 return -1;
   12006             :         }
   12007             :         {
   12008           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->anndelta));
   12009           0 :                 if (PyLong_Check(value)) {
   12010           0 :                         unsigned long long test_var;
   12011           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12012           0 :                         if (PyErr_Occurred() != NULL) {
   12013           0 :                                 return -1;
   12014             :                         }
   12015           0 :                         if (test_var > uint_max) {
   12016           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12017             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12018           0 :                                 return -1;
   12019             :                         }
   12020           0 :                         object->anndelta = test_var;
   12021             :                 } else {
   12022           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12023             :                           PyLong_Type.tp_name);
   12024           0 :                         return -1;
   12025             :                 }
   12026             :         }
   12027           0 :         return 0;
   12028             : }
   12029             : 
   12030           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_licenses(PyObject *obj, void *closure)
   12031             : {
   12032           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   12033           0 :         PyObject *py_licenses;
   12034           0 :         py_licenses = PyLong_FromUnsignedLongLong((uint32_t)(object->licenses));
   12035           0 :         return py_licenses;
   12036             : }
   12037             : 
   12038           0 : static int py_srvsvc_NetSrvInfo102_set_licenses(PyObject *py_obj, PyObject *value, void *closure)
   12039             : {
   12040           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   12041           0 :         if (value == NULL) {
   12042           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->licenses");
   12043           0 :                 return -1;
   12044             :         }
   12045             :         {
   12046           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->licenses));
   12047           0 :                 if (PyLong_Check(value)) {
   12048           0 :                         unsigned long long test_var;
   12049           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12050           0 :                         if (PyErr_Occurred() != NULL) {
   12051           0 :                                 return -1;
   12052             :                         }
   12053           0 :                         if (test_var > uint_max) {
   12054           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12055             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12056           0 :                                 return -1;
   12057             :                         }
   12058           0 :                         object->licenses = test_var;
   12059             :                 } else {
   12060           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12061             :                           PyLong_Type.tp_name);
   12062           0 :                         return -1;
   12063             :                 }
   12064             :         }
   12065           0 :         return 0;
   12066             : }
   12067             : 
   12068           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_userpath(PyObject *obj, void *closure)
   12069             : {
   12070           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(obj);
   12071           0 :         PyObject *py_userpath;
   12072           0 :         if (object->userpath == NULL) {
   12073           0 :                 Py_RETURN_NONE;
   12074             :         }
   12075           0 :         if (object->userpath == NULL) {
   12076           0 :                 py_userpath = Py_None;
   12077           0 :                 Py_INCREF(py_userpath);
   12078             :         } else {
   12079           0 :                 if (object->userpath == NULL) {
   12080           0 :                         py_userpath = Py_None;
   12081           0 :                         Py_INCREF(py_userpath);
   12082             :                 } else {
   12083           0 :                         py_userpath = PyUnicode_Decode(object->userpath, strlen(object->userpath), "utf-8", "ignore");
   12084             :                 }
   12085             :         }
   12086           0 :         return py_userpath;
   12087             : }
   12088             : 
   12089           0 : static int py_srvsvc_NetSrvInfo102_set_userpath(PyObject *py_obj, PyObject *value, void *closure)
   12090             : {
   12091           0 :         struct srvsvc_NetSrvInfo102 *object = pytalloc_get_ptr(py_obj);
   12092           0 :         if (value == NULL) {
   12093           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->userpath");
   12094           0 :                 return -1;
   12095             :         }
   12096           0 :         if (value == Py_None) {
   12097           0 :                 object->userpath = NULL;
   12098             :         } else {
   12099           0 :                 object->userpath = NULL;
   12100             :                 {
   12101           0 :                         const char *test_str;
   12102           0 :                         const char *talloc_str;
   12103           0 :                         PyObject *unicode = NULL;
   12104           0 :                         if (PyUnicode_Check(value)) {
   12105           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12106           0 :                                 if (unicode == NULL) {
   12107           0 :                                         return -1;
   12108             :                                 }
   12109           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12110           0 :                         } else if (PyBytes_Check(value)) {
   12111           0 :                                 test_str = PyBytes_AS_STRING(value);
   12112             :                         } else {
   12113           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12114           0 :                                 return -1;
   12115             :                         }
   12116           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12117           0 :                         if (unicode != NULL) {
   12118           0 :                                 Py_DECREF(unicode);
   12119             :                         }
   12120           0 :                         if (talloc_str == NULL) {
   12121           0 :                                 PyErr_NoMemory();
   12122           0 :                                 return -1;
   12123             :                         }
   12124           0 :                         object->userpath = talloc_str;
   12125             :                 }
   12126             :         }
   12127           0 :         return 0;
   12128             : }
   12129             : 
   12130             : static PyGetSetDef py_srvsvc_NetSrvInfo102_getsetters[] = {
   12131             :         {
   12132             :                 .name = discard_const_p(char, "platform_id"),
   12133             :                 .get = py_srvsvc_NetSrvInfo102_get_platform_id,
   12134             :                 .set = py_srvsvc_NetSrvInfo102_set_platform_id,
   12135             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_PlatformId")
   12136             :         },
   12137             :         {
   12138             :                 .name = discard_const_p(char, "server_name"),
   12139             :                 .get = py_srvsvc_NetSrvInfo102_get_server_name,
   12140             :                 .set = py_srvsvc_NetSrvInfo102_set_server_name,
   12141             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   12142             :         },
   12143             :         {
   12144             :                 .name = discard_const_p(char, "version_major"),
   12145             :                 .get = py_srvsvc_NetSrvInfo102_get_version_major,
   12146             :                 .set = py_srvsvc_NetSrvInfo102_set_version_major,
   12147             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12148             :         },
   12149             :         {
   12150             :                 .name = discard_const_p(char, "version_minor"),
   12151             :                 .get = py_srvsvc_NetSrvInfo102_get_version_minor,
   12152             :                 .set = py_srvsvc_NetSrvInfo102_set_version_minor,
   12153             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12154             :         },
   12155             :         {
   12156             :                 .name = discard_const_p(char, "server_type"),
   12157             :                 .get = py_srvsvc_NetSrvInfo102_get_server_type,
   12158             :                 .set = py_srvsvc_NetSrvInfo102_set_server_type,
   12159             :                 .doc = discard_const_p(char, "PIDL-generated element of base type svcctl_ServerType")
   12160             :         },
   12161             :         {
   12162             :                 .name = discard_const_p(char, "comment"),
   12163             :                 .get = py_srvsvc_NetSrvInfo102_get_comment,
   12164             :                 .set = py_srvsvc_NetSrvInfo102_set_comment,
   12165             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   12166             :         },
   12167             :         {
   12168             :                 .name = discard_const_p(char, "users"),
   12169             :                 .get = py_srvsvc_NetSrvInfo102_get_users,
   12170             :                 .set = py_srvsvc_NetSrvInfo102_set_users,
   12171             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12172             :         },
   12173             :         {
   12174             :                 .name = discard_const_p(char, "disc"),
   12175             :                 .get = py_srvsvc_NetSrvInfo102_get_disc,
   12176             :                 .set = py_srvsvc_NetSrvInfo102_set_disc,
   12177             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12178             :         },
   12179             :         {
   12180             :                 .name = discard_const_p(char, "hidden"),
   12181             :                 .get = py_srvsvc_NetSrvInfo102_get_hidden,
   12182             :                 .set = py_srvsvc_NetSrvInfo102_set_hidden,
   12183             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12184             :         },
   12185             :         {
   12186             :                 .name = discard_const_p(char, "announce"),
   12187             :                 .get = py_srvsvc_NetSrvInfo102_get_announce,
   12188             :                 .set = py_srvsvc_NetSrvInfo102_set_announce,
   12189             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12190             :         },
   12191             :         {
   12192             :                 .name = discard_const_p(char, "anndelta"),
   12193             :                 .get = py_srvsvc_NetSrvInfo102_get_anndelta,
   12194             :                 .set = py_srvsvc_NetSrvInfo102_set_anndelta,
   12195             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12196             :         },
   12197             :         {
   12198             :                 .name = discard_const_p(char, "licenses"),
   12199             :                 .get = py_srvsvc_NetSrvInfo102_get_licenses,
   12200             :                 .set = py_srvsvc_NetSrvInfo102_set_licenses,
   12201             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12202             :         },
   12203             :         {
   12204             :                 .name = discard_const_p(char, "userpath"),
   12205             :                 .get = py_srvsvc_NetSrvInfo102_get_userpath,
   12206             :                 .set = py_srvsvc_NetSrvInfo102_set_userpath,
   12207             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   12208             :         },
   12209             :         { .name = NULL }
   12210             : };
   12211             : 
   12212           0 : static PyObject *py_srvsvc_NetSrvInfo102_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12213             : {
   12214           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo102, type);
   12215             : }
   12216             : 
   12217             : 
   12218             : static PyTypeObject srvsvc_NetSrvInfo102_Type = {
   12219             :         PyVarObject_HEAD_INIT(NULL, 0)
   12220             :         .tp_name = "srvsvc.NetSrvInfo102",
   12221             :         .tp_getset = py_srvsvc_NetSrvInfo102_getsetters,
   12222             :         .tp_methods = NULL,
   12223             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12224             :         .tp_new = py_srvsvc_NetSrvInfo102_new,
   12225             : };
   12226             : 
   12227             : 
   12228           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_ulist_mtime(PyObject *obj, void *closure)
   12229             : {
   12230           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12231           0 :         PyObject *py_ulist_mtime;
   12232           0 :         py_ulist_mtime = PyLong_FromUnsignedLongLong((uint32_t)(object->ulist_mtime));
   12233           0 :         return py_ulist_mtime;
   12234             : }
   12235             : 
   12236           0 : static int py_srvsvc_NetSrvInfo402_set_ulist_mtime(PyObject *py_obj, PyObject *value, void *closure)
   12237             : {
   12238           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12239           0 :         if (value == NULL) {
   12240           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ulist_mtime");
   12241           0 :                 return -1;
   12242             :         }
   12243             :         {
   12244           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ulist_mtime));
   12245           0 :                 if (PyLong_Check(value)) {
   12246           0 :                         unsigned long long test_var;
   12247           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12248           0 :                         if (PyErr_Occurred() != NULL) {
   12249           0 :                                 return -1;
   12250             :                         }
   12251           0 :                         if (test_var > uint_max) {
   12252           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12253             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12254           0 :                                 return -1;
   12255             :                         }
   12256           0 :                         object->ulist_mtime = test_var;
   12257             :                 } else {
   12258           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12259             :                           PyLong_Type.tp_name);
   12260           0 :                         return -1;
   12261             :                 }
   12262             :         }
   12263           0 :         return 0;
   12264             : }
   12265             : 
   12266           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_glist_mtime(PyObject *obj, void *closure)
   12267             : {
   12268           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12269           0 :         PyObject *py_glist_mtime;
   12270           0 :         py_glist_mtime = PyLong_FromUnsignedLongLong((uint32_t)(object->glist_mtime));
   12271           0 :         return py_glist_mtime;
   12272             : }
   12273             : 
   12274           0 : static int py_srvsvc_NetSrvInfo402_set_glist_mtime(PyObject *py_obj, PyObject *value, void *closure)
   12275             : {
   12276           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12277           0 :         if (value == NULL) {
   12278           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->glist_mtime");
   12279           0 :                 return -1;
   12280             :         }
   12281             :         {
   12282           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->glist_mtime));
   12283           0 :                 if (PyLong_Check(value)) {
   12284           0 :                         unsigned long long test_var;
   12285           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12286           0 :                         if (PyErr_Occurred() != NULL) {
   12287           0 :                                 return -1;
   12288             :                         }
   12289           0 :                         if (test_var > uint_max) {
   12290           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12291             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12292           0 :                                 return -1;
   12293             :                         }
   12294           0 :                         object->glist_mtime = test_var;
   12295             :                 } else {
   12296           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12297             :                           PyLong_Type.tp_name);
   12298           0 :                         return -1;
   12299             :                 }
   12300             :         }
   12301           0 :         return 0;
   12302             : }
   12303             : 
   12304           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_alist_mtime(PyObject *obj, void *closure)
   12305             : {
   12306           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12307           0 :         PyObject *py_alist_mtime;
   12308           0 :         py_alist_mtime = PyLong_FromUnsignedLongLong((uint32_t)(object->alist_mtime));
   12309           0 :         return py_alist_mtime;
   12310             : }
   12311             : 
   12312           0 : static int py_srvsvc_NetSrvInfo402_set_alist_mtime(PyObject *py_obj, PyObject *value, void *closure)
   12313             : {
   12314           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12315           0 :         if (value == NULL) {
   12316           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->alist_mtime");
   12317           0 :                 return -1;
   12318             :         }
   12319             :         {
   12320           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alist_mtime));
   12321           0 :                 if (PyLong_Check(value)) {
   12322           0 :                         unsigned long long test_var;
   12323           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12324           0 :                         if (PyErr_Occurred() != NULL) {
   12325           0 :                                 return -1;
   12326             :                         }
   12327           0 :                         if (test_var > uint_max) {
   12328           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12329             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12330           0 :                                 return -1;
   12331             :                         }
   12332           0 :                         object->alist_mtime = test_var;
   12333             :                 } else {
   12334           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12335             :                           PyLong_Type.tp_name);
   12336           0 :                         return -1;
   12337             :                 }
   12338             :         }
   12339           0 :         return 0;
   12340             : }
   12341             : 
   12342           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_alerts(PyObject *obj, void *closure)
   12343             : {
   12344           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12345           0 :         PyObject *py_alerts;
   12346           0 :         if (object->alerts == NULL) {
   12347           0 :                 Py_RETURN_NONE;
   12348             :         }
   12349           0 :         if (object->alerts == NULL) {
   12350           0 :                 py_alerts = Py_None;
   12351           0 :                 Py_INCREF(py_alerts);
   12352             :         } else {
   12353           0 :                 if (object->alerts == NULL) {
   12354           0 :                         py_alerts = Py_None;
   12355           0 :                         Py_INCREF(py_alerts);
   12356             :                 } else {
   12357           0 :                         py_alerts = PyUnicode_Decode(object->alerts, strlen(object->alerts), "utf-8", "ignore");
   12358             :                 }
   12359             :         }
   12360           0 :         return py_alerts;
   12361             : }
   12362             : 
   12363           0 : static int py_srvsvc_NetSrvInfo402_set_alerts(PyObject *py_obj, PyObject *value, void *closure)
   12364             : {
   12365           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12366           0 :         if (value == NULL) {
   12367           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->alerts");
   12368           0 :                 return -1;
   12369             :         }
   12370           0 :         if (value == Py_None) {
   12371           0 :                 object->alerts = NULL;
   12372             :         } else {
   12373           0 :                 object->alerts = NULL;
   12374             :                 {
   12375           0 :                         const char *test_str;
   12376           0 :                         const char *talloc_str;
   12377           0 :                         PyObject *unicode = NULL;
   12378           0 :                         if (PyUnicode_Check(value)) {
   12379           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12380           0 :                                 if (unicode == NULL) {
   12381           0 :                                         return -1;
   12382             :                                 }
   12383           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12384           0 :                         } else if (PyBytes_Check(value)) {
   12385           0 :                                 test_str = PyBytes_AS_STRING(value);
   12386             :                         } else {
   12387           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12388           0 :                                 return -1;
   12389             :                         }
   12390           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12391           0 :                         if (unicode != NULL) {
   12392           0 :                                 Py_DECREF(unicode);
   12393             :                         }
   12394           0 :                         if (talloc_str == NULL) {
   12395           0 :                                 PyErr_NoMemory();
   12396           0 :                                 return -1;
   12397             :                         }
   12398           0 :                         object->alerts = talloc_str;
   12399             :                 }
   12400             :         }
   12401           0 :         return 0;
   12402             : }
   12403             : 
   12404           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_security(PyObject *obj, void *closure)
   12405             : {
   12406           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12407           0 :         PyObject *py_security;
   12408           0 :         py_security = PyLong_FromUnsignedLongLong((uint32_t)(object->security));
   12409           0 :         return py_security;
   12410             : }
   12411             : 
   12412           0 : static int py_srvsvc_NetSrvInfo402_set_security(PyObject *py_obj, PyObject *value, void *closure)
   12413             : {
   12414           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12415           0 :         if (value == NULL) {
   12416           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->security");
   12417           0 :                 return -1;
   12418             :         }
   12419             :         {
   12420           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->security));
   12421           0 :                 if (PyLong_Check(value)) {
   12422           0 :                         unsigned long long test_var;
   12423           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12424           0 :                         if (PyErr_Occurred() != NULL) {
   12425           0 :                                 return -1;
   12426             :                         }
   12427           0 :                         if (test_var > uint_max) {
   12428           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12429             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12430           0 :                                 return -1;
   12431             :                         }
   12432           0 :                         object->security = test_var;
   12433             :                 } else {
   12434           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12435             :                           PyLong_Type.tp_name);
   12436           0 :                         return -1;
   12437             :                 }
   12438             :         }
   12439           0 :         return 0;
   12440             : }
   12441             : 
   12442           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_numadmin(PyObject *obj, void *closure)
   12443             : {
   12444           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12445           0 :         PyObject *py_numadmin;
   12446           0 :         py_numadmin = PyLong_FromUnsignedLongLong((uint32_t)(object->numadmin));
   12447           0 :         return py_numadmin;
   12448             : }
   12449             : 
   12450           0 : static int py_srvsvc_NetSrvInfo402_set_numadmin(PyObject *py_obj, PyObject *value, void *closure)
   12451             : {
   12452           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12453           0 :         if (value == NULL) {
   12454           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->numadmin");
   12455           0 :                 return -1;
   12456             :         }
   12457             :         {
   12458           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numadmin));
   12459           0 :                 if (PyLong_Check(value)) {
   12460           0 :                         unsigned long long test_var;
   12461           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12462           0 :                         if (PyErr_Occurred() != NULL) {
   12463           0 :                                 return -1;
   12464             :                         }
   12465           0 :                         if (test_var > uint_max) {
   12466           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12467             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12468           0 :                                 return -1;
   12469             :                         }
   12470           0 :                         object->numadmin = test_var;
   12471             :                 } else {
   12472           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12473             :                           PyLong_Type.tp_name);
   12474           0 :                         return -1;
   12475             :                 }
   12476             :         }
   12477           0 :         return 0;
   12478             : }
   12479             : 
   12480           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_lanmask(PyObject *obj, void *closure)
   12481             : {
   12482           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12483           0 :         PyObject *py_lanmask;
   12484           0 :         py_lanmask = PyLong_FromUnsignedLongLong((uint32_t)(object->lanmask));
   12485           0 :         return py_lanmask;
   12486             : }
   12487             : 
   12488           0 : static int py_srvsvc_NetSrvInfo402_set_lanmask(PyObject *py_obj, PyObject *value, void *closure)
   12489             : {
   12490           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12491           0 :         if (value == NULL) {
   12492           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lanmask");
   12493           0 :                 return -1;
   12494             :         }
   12495             :         {
   12496           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lanmask));
   12497           0 :                 if (PyLong_Check(value)) {
   12498           0 :                         unsigned long long test_var;
   12499           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12500           0 :                         if (PyErr_Occurred() != NULL) {
   12501           0 :                                 return -1;
   12502             :                         }
   12503           0 :                         if (test_var > uint_max) {
   12504           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12505             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12506           0 :                                 return -1;
   12507             :                         }
   12508           0 :                         object->lanmask = test_var;
   12509             :                 } else {
   12510           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12511             :                           PyLong_Type.tp_name);
   12512           0 :                         return -1;
   12513             :                 }
   12514             :         }
   12515           0 :         return 0;
   12516             : }
   12517             : 
   12518           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_guestaccount(PyObject *obj, void *closure)
   12519             : {
   12520           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12521           0 :         PyObject *py_guestaccount;
   12522           0 :         if (object->guestaccount == NULL) {
   12523           0 :                 Py_RETURN_NONE;
   12524             :         }
   12525           0 :         if (object->guestaccount == NULL) {
   12526           0 :                 py_guestaccount = Py_None;
   12527           0 :                 Py_INCREF(py_guestaccount);
   12528             :         } else {
   12529           0 :                 if (object->guestaccount == NULL) {
   12530           0 :                         py_guestaccount = Py_None;
   12531           0 :                         Py_INCREF(py_guestaccount);
   12532             :                 } else {
   12533           0 :                         py_guestaccount = PyUnicode_Decode(object->guestaccount, strlen(object->guestaccount), "utf-8", "ignore");
   12534             :                 }
   12535             :         }
   12536           0 :         return py_guestaccount;
   12537             : }
   12538             : 
   12539           0 : static int py_srvsvc_NetSrvInfo402_set_guestaccount(PyObject *py_obj, PyObject *value, void *closure)
   12540             : {
   12541           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12542           0 :         if (value == NULL) {
   12543           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->guestaccount");
   12544           0 :                 return -1;
   12545             :         }
   12546           0 :         if (value == Py_None) {
   12547           0 :                 object->guestaccount = NULL;
   12548             :         } else {
   12549           0 :                 object->guestaccount = NULL;
   12550             :                 {
   12551           0 :                         const char *test_str;
   12552           0 :                         const char *talloc_str;
   12553           0 :                         PyObject *unicode = NULL;
   12554           0 :                         if (PyUnicode_Check(value)) {
   12555           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12556           0 :                                 if (unicode == NULL) {
   12557           0 :                                         return -1;
   12558             :                                 }
   12559           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12560           0 :                         } else if (PyBytes_Check(value)) {
   12561           0 :                                 test_str = PyBytes_AS_STRING(value);
   12562             :                         } else {
   12563           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12564           0 :                                 return -1;
   12565             :                         }
   12566           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12567           0 :                         if (unicode != NULL) {
   12568           0 :                                 Py_DECREF(unicode);
   12569             :                         }
   12570           0 :                         if (talloc_str == NULL) {
   12571           0 :                                 PyErr_NoMemory();
   12572           0 :                                 return -1;
   12573             :                         }
   12574           0 :                         object->guestaccount = talloc_str;
   12575             :                 }
   12576             :         }
   12577           0 :         return 0;
   12578             : }
   12579             : 
   12580           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_chdevs(PyObject *obj, void *closure)
   12581             : {
   12582           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12583           0 :         PyObject *py_chdevs;
   12584           0 :         py_chdevs = PyLong_FromUnsignedLongLong((uint32_t)(object->chdevs));
   12585           0 :         return py_chdevs;
   12586             : }
   12587             : 
   12588           0 : static int py_srvsvc_NetSrvInfo402_set_chdevs(PyObject *py_obj, PyObject *value, void *closure)
   12589             : {
   12590           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12591           0 :         if (value == NULL) {
   12592           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->chdevs");
   12593           0 :                 return -1;
   12594             :         }
   12595             :         {
   12596           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevs));
   12597           0 :                 if (PyLong_Check(value)) {
   12598           0 :                         unsigned long long test_var;
   12599           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12600           0 :                         if (PyErr_Occurred() != NULL) {
   12601           0 :                                 return -1;
   12602             :                         }
   12603           0 :                         if (test_var > uint_max) {
   12604           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12605             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12606           0 :                                 return -1;
   12607             :                         }
   12608           0 :                         object->chdevs = test_var;
   12609             :                 } else {
   12610           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12611             :                           PyLong_Type.tp_name);
   12612           0 :                         return -1;
   12613             :                 }
   12614             :         }
   12615           0 :         return 0;
   12616             : }
   12617             : 
   12618           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_chdevqs(PyObject *obj, void *closure)
   12619             : {
   12620           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12621           0 :         PyObject *py_chdevqs;
   12622           0 :         py_chdevqs = PyLong_FromUnsignedLongLong((uint32_t)(object->chdevqs));
   12623           0 :         return py_chdevqs;
   12624             : }
   12625             : 
   12626           0 : static int py_srvsvc_NetSrvInfo402_set_chdevqs(PyObject *py_obj, PyObject *value, void *closure)
   12627             : {
   12628           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12629           0 :         if (value == NULL) {
   12630           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->chdevqs");
   12631           0 :                 return -1;
   12632             :         }
   12633             :         {
   12634           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevqs));
   12635           0 :                 if (PyLong_Check(value)) {
   12636           0 :                         unsigned long long test_var;
   12637           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12638           0 :                         if (PyErr_Occurred() != NULL) {
   12639           0 :                                 return -1;
   12640             :                         }
   12641           0 :                         if (test_var > uint_max) {
   12642           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12643             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12644           0 :                                 return -1;
   12645             :                         }
   12646           0 :                         object->chdevqs = test_var;
   12647             :                 } else {
   12648           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12649             :                           PyLong_Type.tp_name);
   12650           0 :                         return -1;
   12651             :                 }
   12652             :         }
   12653           0 :         return 0;
   12654             : }
   12655             : 
   12656           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_chdevjobs(PyObject *obj, void *closure)
   12657             : {
   12658           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12659           0 :         PyObject *py_chdevjobs;
   12660           0 :         py_chdevjobs = PyLong_FromUnsignedLongLong((uint32_t)(object->chdevjobs));
   12661           0 :         return py_chdevjobs;
   12662             : }
   12663             : 
   12664           0 : static int py_srvsvc_NetSrvInfo402_set_chdevjobs(PyObject *py_obj, PyObject *value, void *closure)
   12665             : {
   12666           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12667           0 :         if (value == NULL) {
   12668           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->chdevjobs");
   12669           0 :                 return -1;
   12670             :         }
   12671             :         {
   12672           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevjobs));
   12673           0 :                 if (PyLong_Check(value)) {
   12674           0 :                         unsigned long long test_var;
   12675           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12676           0 :                         if (PyErr_Occurred() != NULL) {
   12677           0 :                                 return -1;
   12678             :                         }
   12679           0 :                         if (test_var > uint_max) {
   12680           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12681             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12682           0 :                                 return -1;
   12683             :                         }
   12684           0 :                         object->chdevjobs = test_var;
   12685             :                 } else {
   12686           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12687             :                           PyLong_Type.tp_name);
   12688           0 :                         return -1;
   12689             :                 }
   12690             :         }
   12691           0 :         return 0;
   12692             : }
   12693             : 
   12694           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_connections(PyObject *obj, void *closure)
   12695             : {
   12696           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12697           0 :         PyObject *py_connections;
   12698           0 :         py_connections = PyLong_FromUnsignedLongLong((uint32_t)(object->connections));
   12699           0 :         return py_connections;
   12700             : }
   12701             : 
   12702           0 : static int py_srvsvc_NetSrvInfo402_set_connections(PyObject *py_obj, PyObject *value, void *closure)
   12703             : {
   12704           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12705           0 :         if (value == NULL) {
   12706           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->connections");
   12707           0 :                 return -1;
   12708             :         }
   12709             :         {
   12710           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->connections));
   12711           0 :                 if (PyLong_Check(value)) {
   12712           0 :                         unsigned long long test_var;
   12713           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12714           0 :                         if (PyErr_Occurred() != NULL) {
   12715           0 :                                 return -1;
   12716             :                         }
   12717           0 :                         if (test_var > uint_max) {
   12718           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12719             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12720           0 :                                 return -1;
   12721             :                         }
   12722           0 :                         object->connections = test_var;
   12723             :                 } else {
   12724           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12725             :                           PyLong_Type.tp_name);
   12726           0 :                         return -1;
   12727             :                 }
   12728             :         }
   12729           0 :         return 0;
   12730             : }
   12731             : 
   12732           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_shares(PyObject *obj, void *closure)
   12733             : {
   12734           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12735           0 :         PyObject *py_shares;
   12736           0 :         py_shares = PyLong_FromUnsignedLongLong((uint32_t)(object->shares));
   12737           0 :         return py_shares;
   12738             : }
   12739             : 
   12740           0 : static int py_srvsvc_NetSrvInfo402_set_shares(PyObject *py_obj, PyObject *value, void *closure)
   12741             : {
   12742           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12743           0 :         if (value == NULL) {
   12744           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->shares");
   12745           0 :                 return -1;
   12746             :         }
   12747             :         {
   12748           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->shares));
   12749           0 :                 if (PyLong_Check(value)) {
   12750           0 :                         unsigned long long test_var;
   12751           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12752           0 :                         if (PyErr_Occurred() != NULL) {
   12753           0 :                                 return -1;
   12754             :                         }
   12755           0 :                         if (test_var > uint_max) {
   12756           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12757             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12758           0 :                                 return -1;
   12759             :                         }
   12760           0 :                         object->shares = test_var;
   12761             :                 } else {
   12762           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12763             :                           PyLong_Type.tp_name);
   12764           0 :                         return -1;
   12765             :                 }
   12766             :         }
   12767           0 :         return 0;
   12768             : }
   12769             : 
   12770           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_openfiles(PyObject *obj, void *closure)
   12771             : {
   12772           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12773           0 :         PyObject *py_openfiles;
   12774           0 :         py_openfiles = PyLong_FromUnsignedLongLong((uint32_t)(object->openfiles));
   12775           0 :         return py_openfiles;
   12776             : }
   12777             : 
   12778           0 : static int py_srvsvc_NetSrvInfo402_set_openfiles(PyObject *py_obj, PyObject *value, void *closure)
   12779             : {
   12780           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12781           0 :         if (value == NULL) {
   12782           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->openfiles");
   12783           0 :                 return -1;
   12784             :         }
   12785             :         {
   12786           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->openfiles));
   12787           0 :                 if (PyLong_Check(value)) {
   12788           0 :                         unsigned long long test_var;
   12789           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12790           0 :                         if (PyErr_Occurred() != NULL) {
   12791           0 :                                 return -1;
   12792             :                         }
   12793           0 :                         if (test_var > uint_max) {
   12794           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12795             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12796           0 :                                 return -1;
   12797             :                         }
   12798           0 :                         object->openfiles = test_var;
   12799             :                 } else {
   12800           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12801             :                           PyLong_Type.tp_name);
   12802           0 :                         return -1;
   12803             :                 }
   12804             :         }
   12805           0 :         return 0;
   12806             : }
   12807             : 
   12808           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_sessopen(PyObject *obj, void *closure)
   12809             : {
   12810           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12811           0 :         PyObject *py_sessopen;
   12812           0 :         py_sessopen = PyLong_FromUnsignedLongLong((uint32_t)(object->sessopen));
   12813           0 :         return py_sessopen;
   12814             : }
   12815             : 
   12816           0 : static int py_srvsvc_NetSrvInfo402_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
   12817             : {
   12818           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12819           0 :         if (value == NULL) {
   12820           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessopen");
   12821           0 :                 return -1;
   12822             :         }
   12823             :         {
   12824           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
   12825           0 :                 if (PyLong_Check(value)) {
   12826           0 :                         unsigned long long test_var;
   12827           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12828           0 :                         if (PyErr_Occurred() != NULL) {
   12829           0 :                                 return -1;
   12830             :                         }
   12831           0 :                         if (test_var > uint_max) {
   12832           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12833             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12834           0 :                                 return -1;
   12835             :                         }
   12836           0 :                         object->sessopen = test_var;
   12837             :                 } else {
   12838           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12839             :                           PyLong_Type.tp_name);
   12840           0 :                         return -1;
   12841             :                 }
   12842             :         }
   12843           0 :         return 0;
   12844             : }
   12845             : 
   12846           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_sesssvc(PyObject *obj, void *closure)
   12847             : {
   12848           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12849           0 :         PyObject *py_sesssvc;
   12850           0 :         py_sesssvc = PyLong_FromUnsignedLongLong((uint32_t)(object->sesssvc));
   12851           0 :         return py_sesssvc;
   12852             : }
   12853             : 
   12854           0 : static int py_srvsvc_NetSrvInfo402_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
   12855             : {
   12856           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12857           0 :         if (value == NULL) {
   12858           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sesssvc");
   12859           0 :                 return -1;
   12860             :         }
   12861             :         {
   12862           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
   12863           0 :                 if (PyLong_Check(value)) {
   12864           0 :                         unsigned long long test_var;
   12865           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12866           0 :                         if (PyErr_Occurred() != NULL) {
   12867           0 :                                 return -1;
   12868             :                         }
   12869           0 :                         if (test_var > uint_max) {
   12870           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12871             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12872           0 :                                 return -1;
   12873             :                         }
   12874           0 :                         object->sesssvc = test_var;
   12875             :                 } else {
   12876           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12877             :                           PyLong_Type.tp_name);
   12878           0 :                         return -1;
   12879             :                 }
   12880             :         }
   12881           0 :         return 0;
   12882             : }
   12883             : 
   12884           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_sessreqs(PyObject *obj, void *closure)
   12885             : {
   12886           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12887           0 :         PyObject *py_sessreqs;
   12888           0 :         py_sessreqs = PyLong_FromUnsignedLongLong((uint32_t)(object->sessreqs));
   12889           0 :         return py_sessreqs;
   12890             : }
   12891             : 
   12892           0 : static int py_srvsvc_NetSrvInfo402_set_sessreqs(PyObject *py_obj, PyObject *value, void *closure)
   12893             : {
   12894           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12895           0 :         if (value == NULL) {
   12896           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessreqs");
   12897           0 :                 return -1;
   12898             :         }
   12899             :         {
   12900           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessreqs));
   12901           0 :                 if (PyLong_Check(value)) {
   12902           0 :                         unsigned long long test_var;
   12903           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12904           0 :                         if (PyErr_Occurred() != NULL) {
   12905           0 :                                 return -1;
   12906             :                         }
   12907           0 :                         if (test_var > uint_max) {
   12908           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12909             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12910           0 :                                 return -1;
   12911             :                         }
   12912           0 :                         object->sessreqs = test_var;
   12913             :                 } else {
   12914           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12915             :                           PyLong_Type.tp_name);
   12916           0 :                         return -1;
   12917             :                 }
   12918             :         }
   12919           0 :         return 0;
   12920             : }
   12921             : 
   12922           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_opensearch(PyObject *obj, void *closure)
   12923             : {
   12924           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12925           0 :         PyObject *py_opensearch;
   12926           0 :         py_opensearch = PyLong_FromUnsignedLongLong((uint32_t)(object->opensearch));
   12927           0 :         return py_opensearch;
   12928             : }
   12929             : 
   12930           0 : static int py_srvsvc_NetSrvInfo402_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
   12931             : {
   12932           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12933           0 :         if (value == NULL) {
   12934           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->opensearch");
   12935           0 :                 return -1;
   12936             :         }
   12937             :         {
   12938           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
   12939           0 :                 if (PyLong_Check(value)) {
   12940           0 :                         unsigned long long test_var;
   12941           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12942           0 :                         if (PyErr_Occurred() != NULL) {
   12943           0 :                                 return -1;
   12944             :                         }
   12945           0 :                         if (test_var > uint_max) {
   12946           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12947             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12948           0 :                                 return -1;
   12949             :                         }
   12950           0 :                         object->opensearch = test_var;
   12951             :                 } else {
   12952           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12953             :                           PyLong_Type.tp_name);
   12954           0 :                         return -1;
   12955             :                 }
   12956             :         }
   12957           0 :         return 0;
   12958             : }
   12959             : 
   12960           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_activelocks(PyObject *obj, void *closure)
   12961             : {
   12962           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   12963           0 :         PyObject *py_activelocks;
   12964           0 :         py_activelocks = PyLong_FromUnsignedLongLong((uint32_t)(object->activelocks));
   12965           0 :         return py_activelocks;
   12966             : }
   12967             : 
   12968           0 : static int py_srvsvc_NetSrvInfo402_set_activelocks(PyObject *py_obj, PyObject *value, void *closure)
   12969             : {
   12970           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   12971           0 :         if (value == NULL) {
   12972           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->activelocks");
   12973           0 :                 return -1;
   12974             :         }
   12975             :         {
   12976           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->activelocks));
   12977           0 :                 if (PyLong_Check(value)) {
   12978           0 :                         unsigned long long test_var;
   12979           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12980           0 :                         if (PyErr_Occurred() != NULL) {
   12981           0 :                                 return -1;
   12982             :                         }
   12983           0 :                         if (test_var > uint_max) {
   12984           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12985             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12986           0 :                                 return -1;
   12987             :                         }
   12988           0 :                         object->activelocks = test_var;
   12989             :                 } else {
   12990           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12991             :                           PyLong_Type.tp_name);
   12992           0 :                         return -1;
   12993             :                 }
   12994             :         }
   12995           0 :         return 0;
   12996             : }
   12997             : 
   12998           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_numreqbufs(PyObject *obj, void *closure)
   12999             : {
   13000           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   13001           0 :         PyObject *py_numreqbufs;
   13002           0 :         py_numreqbufs = PyLong_FromUnsignedLongLong((uint32_t)(object->numreqbufs));
   13003           0 :         return py_numreqbufs;
   13004             : }
   13005             : 
   13006           0 : static int py_srvsvc_NetSrvInfo402_set_numreqbufs(PyObject *py_obj, PyObject *value, void *closure)
   13007             : {
   13008           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   13009           0 :         if (value == NULL) {
   13010           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->numreqbufs");
   13011           0 :                 return -1;
   13012             :         }
   13013             :         {
   13014           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numreqbufs));
   13015           0 :                 if (PyLong_Check(value)) {
   13016           0 :                         unsigned long long test_var;
   13017           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13018           0 :                         if (PyErr_Occurred() != NULL) {
   13019           0 :                                 return -1;
   13020             :                         }
   13021           0 :                         if (test_var > uint_max) {
   13022           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13023             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13024           0 :                                 return -1;
   13025             :                         }
   13026           0 :                         object->numreqbufs = test_var;
   13027             :                 } else {
   13028           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13029             :                           PyLong_Type.tp_name);
   13030           0 :                         return -1;
   13031             :                 }
   13032             :         }
   13033           0 :         return 0;
   13034             : }
   13035             : 
   13036           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_sizereqbufs(PyObject *obj, void *closure)
   13037             : {
   13038           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   13039           0 :         PyObject *py_sizereqbufs;
   13040           0 :         py_sizereqbufs = PyLong_FromUnsignedLongLong((uint32_t)(object->sizereqbufs));
   13041           0 :         return py_sizereqbufs;
   13042             : }
   13043             : 
   13044           0 : static int py_srvsvc_NetSrvInfo402_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
   13045             : {
   13046           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   13047           0 :         if (value == NULL) {
   13048           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sizereqbufs");
   13049           0 :                 return -1;
   13050             :         }
   13051             :         {
   13052           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
   13053           0 :                 if (PyLong_Check(value)) {
   13054           0 :                         unsigned long long test_var;
   13055           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13056           0 :                         if (PyErr_Occurred() != NULL) {
   13057           0 :                                 return -1;
   13058             :                         }
   13059           0 :                         if (test_var > uint_max) {
   13060           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13061             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13062           0 :                                 return -1;
   13063             :                         }
   13064           0 :                         object->sizereqbufs = test_var;
   13065             :                 } else {
   13066           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13067             :                           PyLong_Type.tp_name);
   13068           0 :                         return -1;
   13069             :                 }
   13070             :         }
   13071           0 :         return 0;
   13072             : }
   13073             : 
   13074           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_numbigbufs(PyObject *obj, void *closure)
   13075             : {
   13076           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   13077           0 :         PyObject *py_numbigbufs;
   13078           0 :         py_numbigbufs = PyLong_FromUnsignedLongLong((uint32_t)(object->numbigbufs));
   13079           0 :         return py_numbigbufs;
   13080             : }
   13081             : 
   13082           0 : static int py_srvsvc_NetSrvInfo402_set_numbigbufs(PyObject *py_obj, PyObject *value, void *closure)
   13083             : {
   13084           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   13085           0 :         if (value == NULL) {
   13086           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->numbigbufs");
   13087           0 :                 return -1;
   13088             :         }
   13089             :         {
   13090           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numbigbufs));
   13091           0 :                 if (PyLong_Check(value)) {
   13092           0 :                         unsigned long long test_var;
   13093           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13094           0 :                         if (PyErr_Occurred() != NULL) {
   13095           0 :                                 return -1;
   13096             :                         }
   13097           0 :                         if (test_var > uint_max) {
   13098           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13099             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13100           0 :                                 return -1;
   13101             :                         }
   13102           0 :                         object->numbigbufs = test_var;
   13103             :                 } else {
   13104           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13105             :                           PyLong_Type.tp_name);
   13106           0 :                         return -1;
   13107             :                 }
   13108             :         }
   13109           0 :         return 0;
   13110             : }
   13111             : 
   13112           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_numfiletasks(PyObject *obj, void *closure)
   13113             : {
   13114           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   13115           0 :         PyObject *py_numfiletasks;
   13116           0 :         py_numfiletasks = PyLong_FromUnsignedLongLong((uint32_t)(object->numfiletasks));
   13117           0 :         return py_numfiletasks;
   13118             : }
   13119             : 
   13120           0 : static int py_srvsvc_NetSrvInfo402_set_numfiletasks(PyObject *py_obj, PyObject *value, void *closure)
   13121             : {
   13122           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   13123           0 :         if (value == NULL) {
   13124           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->numfiletasks");
   13125           0 :                 return -1;
   13126             :         }
   13127             :         {
   13128           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numfiletasks));
   13129           0 :                 if (PyLong_Check(value)) {
   13130           0 :                         unsigned long long test_var;
   13131           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13132           0 :                         if (PyErr_Occurred() != NULL) {
   13133           0 :                                 return -1;
   13134             :                         }
   13135           0 :                         if (test_var > uint_max) {
   13136           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13137             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13138           0 :                                 return -1;
   13139             :                         }
   13140           0 :                         object->numfiletasks = test_var;
   13141             :                 } else {
   13142           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13143             :                           PyLong_Type.tp_name);
   13144           0 :                         return -1;
   13145             :                 }
   13146             :         }
   13147           0 :         return 0;
   13148             : }
   13149             : 
   13150           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_alertsched(PyObject *obj, void *closure)
   13151             : {
   13152           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   13153           0 :         PyObject *py_alertsched;
   13154           0 :         py_alertsched = PyLong_FromUnsignedLongLong((uint32_t)(object->alertsched));
   13155           0 :         return py_alertsched;
   13156             : }
   13157             : 
   13158           0 : static int py_srvsvc_NetSrvInfo402_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
   13159             : {
   13160           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   13161           0 :         if (value == NULL) {
   13162           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->alertsched");
   13163           0 :                 return -1;
   13164             :         }
   13165             :         {
   13166           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
   13167           0 :                 if (PyLong_Check(value)) {
   13168           0 :                         unsigned long long test_var;
   13169           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13170           0 :                         if (PyErr_Occurred() != NULL) {
   13171           0 :                                 return -1;
   13172             :                         }
   13173           0 :                         if (test_var > uint_max) {
   13174           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13175             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13176           0 :                                 return -1;
   13177             :                         }
   13178           0 :                         object->alertsched = test_var;
   13179             :                 } else {
   13180           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13181             :                           PyLong_Type.tp_name);
   13182           0 :                         return -1;
   13183             :                 }
   13184             :         }
   13185           0 :         return 0;
   13186             : }
   13187             : 
   13188           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_erroralert(PyObject *obj, void *closure)
   13189             : {
   13190           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   13191           0 :         PyObject *py_erroralert;
   13192           0 :         py_erroralert = PyLong_FromUnsignedLongLong((uint32_t)(object->erroralert));
   13193           0 :         return py_erroralert;
   13194             : }
   13195             : 
   13196           0 : static int py_srvsvc_NetSrvInfo402_set_erroralert(PyObject *py_obj, PyObject *value, void *closure)
   13197             : {
   13198           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   13199           0 :         if (value == NULL) {
   13200           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->erroralert");
   13201           0 :                 return -1;
   13202             :         }
   13203             :         {
   13204           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->erroralert));
   13205           0 :                 if (PyLong_Check(value)) {
   13206           0 :                         unsigned long long test_var;
   13207           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13208           0 :                         if (PyErr_Occurred() != NULL) {
   13209           0 :                                 return -1;
   13210             :                         }
   13211           0 :                         if (test_var > uint_max) {
   13212           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13213             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13214           0 :                                 return -1;
   13215             :                         }
   13216           0 :                         object->erroralert = test_var;
   13217             :                 } else {
   13218           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13219             :                           PyLong_Type.tp_name);
   13220           0 :                         return -1;
   13221             :                 }
   13222             :         }
   13223           0 :         return 0;
   13224             : }
   13225             : 
   13226           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_logonalert(PyObject *obj, void *closure)
   13227             : {
   13228           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   13229           0 :         PyObject *py_logonalert;
   13230           0 :         py_logonalert = PyLong_FromUnsignedLongLong((uint32_t)(object->logonalert));
   13231           0 :         return py_logonalert;
   13232             : }
   13233             : 
   13234           0 : static int py_srvsvc_NetSrvInfo402_set_logonalert(PyObject *py_obj, PyObject *value, void *closure)
   13235             : {
   13236           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   13237           0 :         if (value == NULL) {
   13238           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logonalert");
   13239           0 :                 return -1;
   13240             :         }
   13241             :         {
   13242           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logonalert));
   13243           0 :                 if (PyLong_Check(value)) {
   13244           0 :                         unsigned long long test_var;
   13245           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13246           0 :                         if (PyErr_Occurred() != NULL) {
   13247           0 :                                 return -1;
   13248             :                         }
   13249           0 :                         if (test_var > uint_max) {
   13250           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13251             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13252           0 :                                 return -1;
   13253             :                         }
   13254           0 :                         object->logonalert = test_var;
   13255             :                 } else {
   13256           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13257             :                           PyLong_Type.tp_name);
   13258           0 :                         return -1;
   13259             :                 }
   13260             :         }
   13261           0 :         return 0;
   13262             : }
   13263             : 
   13264           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_accessalert(PyObject *obj, void *closure)
   13265             : {
   13266           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   13267           0 :         PyObject *py_accessalert;
   13268           0 :         py_accessalert = PyLong_FromUnsignedLongLong((uint32_t)(object->accessalert));
   13269           0 :         return py_accessalert;
   13270             : }
   13271             : 
   13272           0 : static int py_srvsvc_NetSrvInfo402_set_accessalert(PyObject *py_obj, PyObject *value, void *closure)
   13273             : {
   13274           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   13275           0 :         if (value == NULL) {
   13276           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->accessalert");
   13277           0 :                 return -1;
   13278             :         }
   13279             :         {
   13280           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->accessalert));
   13281           0 :                 if (PyLong_Check(value)) {
   13282           0 :                         unsigned long long test_var;
   13283           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13284           0 :                         if (PyErr_Occurred() != NULL) {
   13285           0 :                                 return -1;
   13286             :                         }
   13287           0 :                         if (test_var > uint_max) {
   13288           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13289             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13290           0 :                                 return -1;
   13291             :                         }
   13292           0 :                         object->accessalert = test_var;
   13293             :                 } else {
   13294           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13295             :                           PyLong_Type.tp_name);
   13296           0 :                         return -1;
   13297             :                 }
   13298             :         }
   13299           0 :         return 0;
   13300             : }
   13301             : 
   13302           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_diskalert(PyObject *obj, void *closure)
   13303             : {
   13304           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   13305           0 :         PyObject *py_diskalert;
   13306           0 :         py_diskalert = PyLong_FromUnsignedLongLong((uint32_t)(object->diskalert));
   13307           0 :         return py_diskalert;
   13308             : }
   13309             : 
   13310           0 : static int py_srvsvc_NetSrvInfo402_set_diskalert(PyObject *py_obj, PyObject *value, void *closure)
   13311             : {
   13312           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   13313           0 :         if (value == NULL) {
   13314           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->diskalert");
   13315           0 :                 return -1;
   13316             :         }
   13317             :         {
   13318           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskalert));
   13319           0 :                 if (PyLong_Check(value)) {
   13320           0 :                         unsigned long long test_var;
   13321           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13322           0 :                         if (PyErr_Occurred() != NULL) {
   13323           0 :                                 return -1;
   13324             :                         }
   13325           0 :                         if (test_var > uint_max) {
   13326           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13327             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13328           0 :                                 return -1;
   13329             :                         }
   13330           0 :                         object->diskalert = test_var;
   13331             :                 } else {
   13332           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13333             :                           PyLong_Type.tp_name);
   13334           0 :                         return -1;
   13335             :                 }
   13336             :         }
   13337           0 :         return 0;
   13338             : }
   13339             : 
   13340           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_netioalert(PyObject *obj, void *closure)
   13341             : {
   13342           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   13343           0 :         PyObject *py_netioalert;
   13344           0 :         py_netioalert = PyLong_FromUnsignedLongLong((uint32_t)(object->netioalert));
   13345           0 :         return py_netioalert;
   13346             : }
   13347             : 
   13348           0 : static int py_srvsvc_NetSrvInfo402_set_netioalert(PyObject *py_obj, PyObject *value, void *closure)
   13349             : {
   13350           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   13351           0 :         if (value == NULL) {
   13352           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->netioalert");
   13353           0 :                 return -1;
   13354             :         }
   13355             :         {
   13356           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->netioalert));
   13357           0 :                 if (PyLong_Check(value)) {
   13358           0 :                         unsigned long long test_var;
   13359           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13360           0 :                         if (PyErr_Occurred() != NULL) {
   13361           0 :                                 return -1;
   13362             :                         }
   13363           0 :                         if (test_var > uint_max) {
   13364           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13365             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13366           0 :                                 return -1;
   13367             :                         }
   13368           0 :                         object->netioalert = test_var;
   13369             :                 } else {
   13370           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13371             :                           PyLong_Type.tp_name);
   13372           0 :                         return -1;
   13373             :                 }
   13374             :         }
   13375           0 :         return 0;
   13376             : }
   13377             : 
   13378           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_maxaudits(PyObject *obj, void *closure)
   13379             : {
   13380           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   13381           0 :         PyObject *py_maxaudits;
   13382           0 :         py_maxaudits = PyLong_FromUnsignedLongLong((uint32_t)(object->maxaudits));
   13383           0 :         return py_maxaudits;
   13384             : }
   13385             : 
   13386           0 : static int py_srvsvc_NetSrvInfo402_set_maxaudits(PyObject *py_obj, PyObject *value, void *closure)
   13387             : {
   13388           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   13389           0 :         if (value == NULL) {
   13390           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxaudits");
   13391           0 :                 return -1;
   13392             :         }
   13393             :         {
   13394           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxaudits));
   13395           0 :                 if (PyLong_Check(value)) {
   13396           0 :                         unsigned long long test_var;
   13397           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13398           0 :                         if (PyErr_Occurred() != NULL) {
   13399           0 :                                 return -1;
   13400             :                         }
   13401           0 :                         if (test_var > uint_max) {
   13402           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13403             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13404           0 :                                 return -1;
   13405             :                         }
   13406           0 :                         object->maxaudits = test_var;
   13407             :                 } else {
   13408           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13409             :                           PyLong_Type.tp_name);
   13410           0 :                         return -1;
   13411             :                 }
   13412             :         }
   13413           0 :         return 0;
   13414             : }
   13415             : 
   13416           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_srvheuristics(PyObject *obj, void *closure)
   13417             : {
   13418           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(obj);
   13419           0 :         PyObject *py_srvheuristics;
   13420           0 :         if (object->srvheuristics == NULL) {
   13421           0 :                 Py_RETURN_NONE;
   13422             :         }
   13423           0 :         if (object->srvheuristics == NULL) {
   13424           0 :                 py_srvheuristics = Py_None;
   13425           0 :                 Py_INCREF(py_srvheuristics);
   13426             :         } else {
   13427           0 :                 if (object->srvheuristics == NULL) {
   13428           0 :                         py_srvheuristics = Py_None;
   13429           0 :                         Py_INCREF(py_srvheuristics);
   13430             :                 } else {
   13431           0 :                         py_srvheuristics = PyUnicode_Decode(object->srvheuristics, strlen(object->srvheuristics), "utf-8", "ignore");
   13432             :                 }
   13433             :         }
   13434           0 :         return py_srvheuristics;
   13435             : }
   13436             : 
   13437           0 : static int py_srvsvc_NetSrvInfo402_set_srvheuristics(PyObject *py_obj, PyObject *value, void *closure)
   13438             : {
   13439           0 :         struct srvsvc_NetSrvInfo402 *object = pytalloc_get_ptr(py_obj);
   13440           0 :         if (value == NULL) {
   13441           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->srvheuristics");
   13442           0 :                 return -1;
   13443             :         }
   13444           0 :         if (value == Py_None) {
   13445           0 :                 object->srvheuristics = NULL;
   13446             :         } else {
   13447           0 :                 object->srvheuristics = NULL;
   13448             :                 {
   13449           0 :                         const char *test_str;
   13450           0 :                         const char *talloc_str;
   13451           0 :                         PyObject *unicode = NULL;
   13452           0 :                         if (PyUnicode_Check(value)) {
   13453           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13454           0 :                                 if (unicode == NULL) {
   13455           0 :                                         return -1;
   13456             :                                 }
   13457           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   13458           0 :                         } else if (PyBytes_Check(value)) {
   13459           0 :                                 test_str = PyBytes_AS_STRING(value);
   13460             :                         } else {
   13461           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13462           0 :                                 return -1;
   13463             :                         }
   13464           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13465           0 :                         if (unicode != NULL) {
   13466           0 :                                 Py_DECREF(unicode);
   13467             :                         }
   13468           0 :                         if (talloc_str == NULL) {
   13469           0 :                                 PyErr_NoMemory();
   13470           0 :                                 return -1;
   13471             :                         }
   13472           0 :                         object->srvheuristics = talloc_str;
   13473             :                 }
   13474             :         }
   13475           0 :         return 0;
   13476             : }
   13477             : 
   13478             : static PyGetSetDef py_srvsvc_NetSrvInfo402_getsetters[] = {
   13479             :         {
   13480             :                 .name = discard_const_p(char, "ulist_mtime"),
   13481             :                 .get = py_srvsvc_NetSrvInfo402_get_ulist_mtime,
   13482             :                 .set = py_srvsvc_NetSrvInfo402_set_ulist_mtime,
   13483             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13484             :         },
   13485             :         {
   13486             :                 .name = discard_const_p(char, "glist_mtime"),
   13487             :                 .get = py_srvsvc_NetSrvInfo402_get_glist_mtime,
   13488             :                 .set = py_srvsvc_NetSrvInfo402_set_glist_mtime,
   13489             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13490             :         },
   13491             :         {
   13492             :                 .name = discard_const_p(char, "alist_mtime"),
   13493             :                 .get = py_srvsvc_NetSrvInfo402_get_alist_mtime,
   13494             :                 .set = py_srvsvc_NetSrvInfo402_set_alist_mtime,
   13495             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13496             :         },
   13497             :         {
   13498             :                 .name = discard_const_p(char, "alerts"),
   13499             :                 .get = py_srvsvc_NetSrvInfo402_get_alerts,
   13500             :                 .set = py_srvsvc_NetSrvInfo402_set_alerts,
   13501             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   13502             :         },
   13503             :         {
   13504             :                 .name = discard_const_p(char, "security"),
   13505             :                 .get = py_srvsvc_NetSrvInfo402_get_security,
   13506             :                 .set = py_srvsvc_NetSrvInfo402_set_security,
   13507             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13508             :         },
   13509             :         {
   13510             :                 .name = discard_const_p(char, "numadmin"),
   13511             :                 .get = py_srvsvc_NetSrvInfo402_get_numadmin,
   13512             :                 .set = py_srvsvc_NetSrvInfo402_set_numadmin,
   13513             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13514             :         },
   13515             :         {
   13516             :                 .name = discard_const_p(char, "lanmask"),
   13517             :                 .get = py_srvsvc_NetSrvInfo402_get_lanmask,
   13518             :                 .set = py_srvsvc_NetSrvInfo402_set_lanmask,
   13519             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13520             :         },
   13521             :         {
   13522             :                 .name = discard_const_p(char, "guestaccount"),
   13523             :                 .get = py_srvsvc_NetSrvInfo402_get_guestaccount,
   13524             :                 .set = py_srvsvc_NetSrvInfo402_set_guestaccount,
   13525             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   13526             :         },
   13527             :         {
   13528             :                 .name = discard_const_p(char, "chdevs"),
   13529             :                 .get = py_srvsvc_NetSrvInfo402_get_chdevs,
   13530             :                 .set = py_srvsvc_NetSrvInfo402_set_chdevs,
   13531             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13532             :         },
   13533             :         {
   13534             :                 .name = discard_const_p(char, "chdevqs"),
   13535             :                 .get = py_srvsvc_NetSrvInfo402_get_chdevqs,
   13536             :                 .set = py_srvsvc_NetSrvInfo402_set_chdevqs,
   13537             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13538             :         },
   13539             :         {
   13540             :                 .name = discard_const_p(char, "chdevjobs"),
   13541             :                 .get = py_srvsvc_NetSrvInfo402_get_chdevjobs,
   13542             :                 .set = py_srvsvc_NetSrvInfo402_set_chdevjobs,
   13543             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13544             :         },
   13545             :         {
   13546             :                 .name = discard_const_p(char, "connections"),
   13547             :                 .get = py_srvsvc_NetSrvInfo402_get_connections,
   13548             :                 .set = py_srvsvc_NetSrvInfo402_set_connections,
   13549             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13550             :         },
   13551             :         {
   13552             :                 .name = discard_const_p(char, "shares"),
   13553             :                 .get = py_srvsvc_NetSrvInfo402_get_shares,
   13554             :                 .set = py_srvsvc_NetSrvInfo402_set_shares,
   13555             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13556             :         },
   13557             :         {
   13558             :                 .name = discard_const_p(char, "openfiles"),
   13559             :                 .get = py_srvsvc_NetSrvInfo402_get_openfiles,
   13560             :                 .set = py_srvsvc_NetSrvInfo402_set_openfiles,
   13561             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13562             :         },
   13563             :         {
   13564             :                 .name = discard_const_p(char, "sessopen"),
   13565             :                 .get = py_srvsvc_NetSrvInfo402_get_sessopen,
   13566             :                 .set = py_srvsvc_NetSrvInfo402_set_sessopen,
   13567             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13568             :         },
   13569             :         {
   13570             :                 .name = discard_const_p(char, "sesssvc"),
   13571             :                 .get = py_srvsvc_NetSrvInfo402_get_sesssvc,
   13572             :                 .set = py_srvsvc_NetSrvInfo402_set_sesssvc,
   13573             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13574             :         },
   13575             :         {
   13576             :                 .name = discard_const_p(char, "sessreqs"),
   13577             :                 .get = py_srvsvc_NetSrvInfo402_get_sessreqs,
   13578             :                 .set = py_srvsvc_NetSrvInfo402_set_sessreqs,
   13579             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13580             :         },
   13581             :         {
   13582             :                 .name = discard_const_p(char, "opensearch"),
   13583             :                 .get = py_srvsvc_NetSrvInfo402_get_opensearch,
   13584             :                 .set = py_srvsvc_NetSrvInfo402_set_opensearch,
   13585             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13586             :         },
   13587             :         {
   13588             :                 .name = discard_const_p(char, "activelocks"),
   13589             :                 .get = py_srvsvc_NetSrvInfo402_get_activelocks,
   13590             :                 .set = py_srvsvc_NetSrvInfo402_set_activelocks,
   13591             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13592             :         },
   13593             :         {
   13594             :                 .name = discard_const_p(char, "numreqbufs"),
   13595             :                 .get = py_srvsvc_NetSrvInfo402_get_numreqbufs,
   13596             :                 .set = py_srvsvc_NetSrvInfo402_set_numreqbufs,
   13597             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13598             :         },
   13599             :         {
   13600             :                 .name = discard_const_p(char, "sizereqbufs"),
   13601             :                 .get = py_srvsvc_NetSrvInfo402_get_sizereqbufs,
   13602             :                 .set = py_srvsvc_NetSrvInfo402_set_sizereqbufs,
   13603             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13604             :         },
   13605             :         {
   13606             :                 .name = discard_const_p(char, "numbigbufs"),
   13607             :                 .get = py_srvsvc_NetSrvInfo402_get_numbigbufs,
   13608             :                 .set = py_srvsvc_NetSrvInfo402_set_numbigbufs,
   13609             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13610             :         },
   13611             :         {
   13612             :                 .name = discard_const_p(char, "numfiletasks"),
   13613             :                 .get = py_srvsvc_NetSrvInfo402_get_numfiletasks,
   13614             :                 .set = py_srvsvc_NetSrvInfo402_set_numfiletasks,
   13615             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13616             :         },
   13617             :         {
   13618             :                 .name = discard_const_p(char, "alertsched"),
   13619             :                 .get = py_srvsvc_NetSrvInfo402_get_alertsched,
   13620             :                 .set = py_srvsvc_NetSrvInfo402_set_alertsched,
   13621             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13622             :         },
   13623             :         {
   13624             :                 .name = discard_const_p(char, "erroralert"),
   13625             :                 .get = py_srvsvc_NetSrvInfo402_get_erroralert,
   13626             :                 .set = py_srvsvc_NetSrvInfo402_set_erroralert,
   13627             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13628             :         },
   13629             :         {
   13630             :                 .name = discard_const_p(char, "logonalert"),
   13631             :                 .get = py_srvsvc_NetSrvInfo402_get_logonalert,
   13632             :                 .set = py_srvsvc_NetSrvInfo402_set_logonalert,
   13633             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13634             :         },
   13635             :         {
   13636             :                 .name = discard_const_p(char, "accessalert"),
   13637             :                 .get = py_srvsvc_NetSrvInfo402_get_accessalert,
   13638             :                 .set = py_srvsvc_NetSrvInfo402_set_accessalert,
   13639             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13640             :         },
   13641             :         {
   13642             :                 .name = discard_const_p(char, "diskalert"),
   13643             :                 .get = py_srvsvc_NetSrvInfo402_get_diskalert,
   13644             :                 .set = py_srvsvc_NetSrvInfo402_set_diskalert,
   13645             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13646             :         },
   13647             :         {
   13648             :                 .name = discard_const_p(char, "netioalert"),
   13649             :                 .get = py_srvsvc_NetSrvInfo402_get_netioalert,
   13650             :                 .set = py_srvsvc_NetSrvInfo402_set_netioalert,
   13651             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13652             :         },
   13653             :         {
   13654             :                 .name = discard_const_p(char, "maxaudits"),
   13655             :                 .get = py_srvsvc_NetSrvInfo402_get_maxaudits,
   13656             :                 .set = py_srvsvc_NetSrvInfo402_set_maxaudits,
   13657             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13658             :         },
   13659             :         {
   13660             :                 .name = discard_const_p(char, "srvheuristics"),
   13661             :                 .get = py_srvsvc_NetSrvInfo402_get_srvheuristics,
   13662             :                 .set = py_srvsvc_NetSrvInfo402_set_srvheuristics,
   13663             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   13664             :         },
   13665             :         { .name = NULL }
   13666             : };
   13667             : 
   13668           0 : static PyObject *py_srvsvc_NetSrvInfo402_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13669             : {
   13670           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo402, type);
   13671             : }
   13672             : 
   13673             : 
   13674             : static PyTypeObject srvsvc_NetSrvInfo402_Type = {
   13675             :         PyVarObject_HEAD_INIT(NULL, 0)
   13676             :         .tp_name = "srvsvc.NetSrvInfo402",
   13677             :         .tp_getset = py_srvsvc_NetSrvInfo402_getsetters,
   13678             :         .tp_methods = NULL,
   13679             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13680             :         .tp_new = py_srvsvc_NetSrvInfo402_new,
   13681             : };
   13682             : 
   13683             : 
   13684           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_ulist_mtime(PyObject *obj, void *closure)
   13685             : {
   13686           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   13687           0 :         PyObject *py_ulist_mtime;
   13688           0 :         py_ulist_mtime = PyLong_FromUnsignedLongLong((uint32_t)(object->ulist_mtime));
   13689           0 :         return py_ulist_mtime;
   13690             : }
   13691             : 
   13692           0 : static int py_srvsvc_NetSrvInfo403_set_ulist_mtime(PyObject *py_obj, PyObject *value, void *closure)
   13693             : {
   13694           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   13695           0 :         if (value == NULL) {
   13696           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ulist_mtime");
   13697           0 :                 return -1;
   13698             :         }
   13699             :         {
   13700           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ulist_mtime));
   13701           0 :                 if (PyLong_Check(value)) {
   13702           0 :                         unsigned long long test_var;
   13703           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13704           0 :                         if (PyErr_Occurred() != NULL) {
   13705           0 :                                 return -1;
   13706             :                         }
   13707           0 :                         if (test_var > uint_max) {
   13708           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13709             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13710           0 :                                 return -1;
   13711             :                         }
   13712           0 :                         object->ulist_mtime = test_var;
   13713             :                 } else {
   13714           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13715             :                           PyLong_Type.tp_name);
   13716           0 :                         return -1;
   13717             :                 }
   13718             :         }
   13719           0 :         return 0;
   13720             : }
   13721             : 
   13722           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_glist_mtime(PyObject *obj, void *closure)
   13723             : {
   13724           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   13725           0 :         PyObject *py_glist_mtime;
   13726           0 :         py_glist_mtime = PyLong_FromUnsignedLongLong((uint32_t)(object->glist_mtime));
   13727           0 :         return py_glist_mtime;
   13728             : }
   13729             : 
   13730           0 : static int py_srvsvc_NetSrvInfo403_set_glist_mtime(PyObject *py_obj, PyObject *value, void *closure)
   13731             : {
   13732           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   13733           0 :         if (value == NULL) {
   13734           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->glist_mtime");
   13735           0 :                 return -1;
   13736             :         }
   13737             :         {
   13738           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->glist_mtime));
   13739           0 :                 if (PyLong_Check(value)) {
   13740           0 :                         unsigned long long test_var;
   13741           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13742           0 :                         if (PyErr_Occurred() != NULL) {
   13743           0 :                                 return -1;
   13744             :                         }
   13745           0 :                         if (test_var > uint_max) {
   13746           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13747             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13748           0 :                                 return -1;
   13749             :                         }
   13750           0 :                         object->glist_mtime = test_var;
   13751             :                 } else {
   13752           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13753             :                           PyLong_Type.tp_name);
   13754           0 :                         return -1;
   13755             :                 }
   13756             :         }
   13757           0 :         return 0;
   13758             : }
   13759             : 
   13760           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_alist_mtime(PyObject *obj, void *closure)
   13761             : {
   13762           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   13763           0 :         PyObject *py_alist_mtime;
   13764           0 :         py_alist_mtime = PyLong_FromUnsignedLongLong((uint32_t)(object->alist_mtime));
   13765           0 :         return py_alist_mtime;
   13766             : }
   13767             : 
   13768           0 : static int py_srvsvc_NetSrvInfo403_set_alist_mtime(PyObject *py_obj, PyObject *value, void *closure)
   13769             : {
   13770           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   13771           0 :         if (value == NULL) {
   13772           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->alist_mtime");
   13773           0 :                 return -1;
   13774             :         }
   13775             :         {
   13776           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alist_mtime));
   13777           0 :                 if (PyLong_Check(value)) {
   13778           0 :                         unsigned long long test_var;
   13779           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13780           0 :                         if (PyErr_Occurred() != NULL) {
   13781           0 :                                 return -1;
   13782             :                         }
   13783           0 :                         if (test_var > uint_max) {
   13784           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13785             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13786           0 :                                 return -1;
   13787             :                         }
   13788           0 :                         object->alist_mtime = test_var;
   13789             :                 } else {
   13790           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13791             :                           PyLong_Type.tp_name);
   13792           0 :                         return -1;
   13793             :                 }
   13794             :         }
   13795           0 :         return 0;
   13796             : }
   13797             : 
   13798           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_alerts(PyObject *obj, void *closure)
   13799             : {
   13800           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   13801           0 :         PyObject *py_alerts;
   13802           0 :         if (object->alerts == NULL) {
   13803           0 :                 Py_RETURN_NONE;
   13804             :         }
   13805           0 :         if (object->alerts == NULL) {
   13806           0 :                 py_alerts = Py_None;
   13807           0 :                 Py_INCREF(py_alerts);
   13808             :         } else {
   13809           0 :                 if (object->alerts == NULL) {
   13810           0 :                         py_alerts = Py_None;
   13811           0 :                         Py_INCREF(py_alerts);
   13812             :                 } else {
   13813           0 :                         py_alerts = PyUnicode_Decode(object->alerts, strlen(object->alerts), "utf-8", "ignore");
   13814             :                 }
   13815             :         }
   13816           0 :         return py_alerts;
   13817             : }
   13818             : 
   13819           0 : static int py_srvsvc_NetSrvInfo403_set_alerts(PyObject *py_obj, PyObject *value, void *closure)
   13820             : {
   13821           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   13822           0 :         if (value == NULL) {
   13823           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->alerts");
   13824           0 :                 return -1;
   13825             :         }
   13826           0 :         if (value == Py_None) {
   13827           0 :                 object->alerts = NULL;
   13828             :         } else {
   13829           0 :                 object->alerts = NULL;
   13830             :                 {
   13831           0 :                         const char *test_str;
   13832           0 :                         const char *talloc_str;
   13833           0 :                         PyObject *unicode = NULL;
   13834           0 :                         if (PyUnicode_Check(value)) {
   13835           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13836           0 :                                 if (unicode == NULL) {
   13837           0 :                                         return -1;
   13838             :                                 }
   13839           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   13840           0 :                         } else if (PyBytes_Check(value)) {
   13841           0 :                                 test_str = PyBytes_AS_STRING(value);
   13842             :                         } else {
   13843           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13844           0 :                                 return -1;
   13845             :                         }
   13846           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13847           0 :                         if (unicode != NULL) {
   13848           0 :                                 Py_DECREF(unicode);
   13849             :                         }
   13850           0 :                         if (talloc_str == NULL) {
   13851           0 :                                 PyErr_NoMemory();
   13852           0 :                                 return -1;
   13853             :                         }
   13854           0 :                         object->alerts = talloc_str;
   13855             :                 }
   13856             :         }
   13857           0 :         return 0;
   13858             : }
   13859             : 
   13860           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_security(PyObject *obj, void *closure)
   13861             : {
   13862           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   13863           0 :         PyObject *py_security;
   13864           0 :         py_security = PyLong_FromUnsignedLongLong((uint32_t)(object->security));
   13865           0 :         return py_security;
   13866             : }
   13867             : 
   13868           0 : static int py_srvsvc_NetSrvInfo403_set_security(PyObject *py_obj, PyObject *value, void *closure)
   13869             : {
   13870           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   13871           0 :         if (value == NULL) {
   13872           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->security");
   13873           0 :                 return -1;
   13874             :         }
   13875             :         {
   13876           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->security));
   13877           0 :                 if (PyLong_Check(value)) {
   13878           0 :                         unsigned long long test_var;
   13879           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13880           0 :                         if (PyErr_Occurred() != NULL) {
   13881           0 :                                 return -1;
   13882             :                         }
   13883           0 :                         if (test_var > uint_max) {
   13884           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13885             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13886           0 :                                 return -1;
   13887             :                         }
   13888           0 :                         object->security = test_var;
   13889             :                 } else {
   13890           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13891             :                           PyLong_Type.tp_name);
   13892           0 :                         return -1;
   13893             :                 }
   13894             :         }
   13895           0 :         return 0;
   13896             : }
   13897             : 
   13898           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_numadmin(PyObject *obj, void *closure)
   13899             : {
   13900           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   13901           0 :         PyObject *py_numadmin;
   13902           0 :         py_numadmin = PyLong_FromUnsignedLongLong((uint32_t)(object->numadmin));
   13903           0 :         return py_numadmin;
   13904             : }
   13905             : 
   13906           0 : static int py_srvsvc_NetSrvInfo403_set_numadmin(PyObject *py_obj, PyObject *value, void *closure)
   13907             : {
   13908           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   13909           0 :         if (value == NULL) {
   13910           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->numadmin");
   13911           0 :                 return -1;
   13912             :         }
   13913             :         {
   13914           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numadmin));
   13915           0 :                 if (PyLong_Check(value)) {
   13916           0 :                         unsigned long long test_var;
   13917           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13918           0 :                         if (PyErr_Occurred() != NULL) {
   13919           0 :                                 return -1;
   13920             :                         }
   13921           0 :                         if (test_var > uint_max) {
   13922           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13923             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13924           0 :                                 return -1;
   13925             :                         }
   13926           0 :                         object->numadmin = test_var;
   13927             :                 } else {
   13928           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13929             :                           PyLong_Type.tp_name);
   13930           0 :                         return -1;
   13931             :                 }
   13932             :         }
   13933           0 :         return 0;
   13934             : }
   13935             : 
   13936           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_lanmask(PyObject *obj, void *closure)
   13937             : {
   13938           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   13939           0 :         PyObject *py_lanmask;
   13940           0 :         py_lanmask = PyLong_FromUnsignedLongLong((uint32_t)(object->lanmask));
   13941           0 :         return py_lanmask;
   13942             : }
   13943             : 
   13944           0 : static int py_srvsvc_NetSrvInfo403_set_lanmask(PyObject *py_obj, PyObject *value, void *closure)
   13945             : {
   13946           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   13947           0 :         if (value == NULL) {
   13948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lanmask");
   13949           0 :                 return -1;
   13950             :         }
   13951             :         {
   13952           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lanmask));
   13953           0 :                 if (PyLong_Check(value)) {
   13954           0 :                         unsigned long long test_var;
   13955           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13956           0 :                         if (PyErr_Occurred() != NULL) {
   13957           0 :                                 return -1;
   13958             :                         }
   13959           0 :                         if (test_var > uint_max) {
   13960           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13961             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13962           0 :                                 return -1;
   13963             :                         }
   13964           0 :                         object->lanmask = test_var;
   13965             :                 } else {
   13966           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13967             :                           PyLong_Type.tp_name);
   13968           0 :                         return -1;
   13969             :                 }
   13970             :         }
   13971           0 :         return 0;
   13972             : }
   13973             : 
   13974           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_guestaccount(PyObject *obj, void *closure)
   13975             : {
   13976           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   13977           0 :         PyObject *py_guestaccount;
   13978           0 :         if (object->guestaccount == NULL) {
   13979           0 :                 Py_RETURN_NONE;
   13980             :         }
   13981           0 :         if (object->guestaccount == NULL) {
   13982           0 :                 py_guestaccount = Py_None;
   13983           0 :                 Py_INCREF(py_guestaccount);
   13984             :         } else {
   13985           0 :                 if (object->guestaccount == NULL) {
   13986           0 :                         py_guestaccount = Py_None;
   13987           0 :                         Py_INCREF(py_guestaccount);
   13988             :                 } else {
   13989           0 :                         py_guestaccount = PyUnicode_Decode(object->guestaccount, strlen(object->guestaccount), "utf-8", "ignore");
   13990             :                 }
   13991             :         }
   13992           0 :         return py_guestaccount;
   13993             : }
   13994             : 
   13995           0 : static int py_srvsvc_NetSrvInfo403_set_guestaccount(PyObject *py_obj, PyObject *value, void *closure)
   13996             : {
   13997           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   13998           0 :         if (value == NULL) {
   13999           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->guestaccount");
   14000           0 :                 return -1;
   14001             :         }
   14002           0 :         if (value == Py_None) {
   14003           0 :                 object->guestaccount = NULL;
   14004             :         } else {
   14005           0 :                 object->guestaccount = NULL;
   14006             :                 {
   14007           0 :                         const char *test_str;
   14008           0 :                         const char *talloc_str;
   14009           0 :                         PyObject *unicode = NULL;
   14010           0 :                         if (PyUnicode_Check(value)) {
   14011           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   14012           0 :                                 if (unicode == NULL) {
   14013           0 :                                         return -1;
   14014             :                                 }
   14015           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   14016           0 :                         } else if (PyBytes_Check(value)) {
   14017           0 :                                 test_str = PyBytes_AS_STRING(value);
   14018             :                         } else {
   14019           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   14020           0 :                                 return -1;
   14021             :                         }
   14022           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   14023           0 :                         if (unicode != NULL) {
   14024           0 :                                 Py_DECREF(unicode);
   14025             :                         }
   14026           0 :                         if (talloc_str == NULL) {
   14027           0 :                                 PyErr_NoMemory();
   14028           0 :                                 return -1;
   14029             :                         }
   14030           0 :                         object->guestaccount = talloc_str;
   14031             :                 }
   14032             :         }
   14033           0 :         return 0;
   14034             : }
   14035             : 
   14036           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_chdevs(PyObject *obj, void *closure)
   14037             : {
   14038           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14039           0 :         PyObject *py_chdevs;
   14040           0 :         py_chdevs = PyLong_FromUnsignedLongLong((uint32_t)(object->chdevs));
   14041           0 :         return py_chdevs;
   14042             : }
   14043             : 
   14044           0 : static int py_srvsvc_NetSrvInfo403_set_chdevs(PyObject *py_obj, PyObject *value, void *closure)
   14045             : {
   14046           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14047           0 :         if (value == NULL) {
   14048           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->chdevs");
   14049           0 :                 return -1;
   14050             :         }
   14051             :         {
   14052           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevs));
   14053           0 :                 if (PyLong_Check(value)) {
   14054           0 :                         unsigned long long test_var;
   14055           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14056           0 :                         if (PyErr_Occurred() != NULL) {
   14057           0 :                                 return -1;
   14058             :                         }
   14059           0 :                         if (test_var > uint_max) {
   14060           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14061             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14062           0 :                                 return -1;
   14063             :                         }
   14064           0 :                         object->chdevs = test_var;
   14065             :                 } else {
   14066           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14067             :                           PyLong_Type.tp_name);
   14068           0 :                         return -1;
   14069             :                 }
   14070             :         }
   14071           0 :         return 0;
   14072             : }
   14073             : 
   14074           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_chdevqs(PyObject *obj, void *closure)
   14075             : {
   14076           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14077           0 :         PyObject *py_chdevqs;
   14078           0 :         py_chdevqs = PyLong_FromUnsignedLongLong((uint32_t)(object->chdevqs));
   14079           0 :         return py_chdevqs;
   14080             : }
   14081             : 
   14082           0 : static int py_srvsvc_NetSrvInfo403_set_chdevqs(PyObject *py_obj, PyObject *value, void *closure)
   14083             : {
   14084           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14085           0 :         if (value == NULL) {
   14086           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->chdevqs");
   14087           0 :                 return -1;
   14088             :         }
   14089             :         {
   14090           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevqs));
   14091           0 :                 if (PyLong_Check(value)) {
   14092           0 :                         unsigned long long test_var;
   14093           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14094           0 :                         if (PyErr_Occurred() != NULL) {
   14095           0 :                                 return -1;
   14096             :                         }
   14097           0 :                         if (test_var > uint_max) {
   14098           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14099             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14100           0 :                                 return -1;
   14101             :                         }
   14102           0 :                         object->chdevqs = test_var;
   14103             :                 } else {
   14104           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14105             :                           PyLong_Type.tp_name);
   14106           0 :                         return -1;
   14107             :                 }
   14108             :         }
   14109           0 :         return 0;
   14110             : }
   14111             : 
   14112           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_chdevjobs(PyObject *obj, void *closure)
   14113             : {
   14114           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14115           0 :         PyObject *py_chdevjobs;
   14116           0 :         py_chdevjobs = PyLong_FromUnsignedLongLong((uint32_t)(object->chdevjobs));
   14117           0 :         return py_chdevjobs;
   14118             : }
   14119             : 
   14120           0 : static int py_srvsvc_NetSrvInfo403_set_chdevjobs(PyObject *py_obj, PyObject *value, void *closure)
   14121             : {
   14122           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14123           0 :         if (value == NULL) {
   14124           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->chdevjobs");
   14125           0 :                 return -1;
   14126             :         }
   14127             :         {
   14128           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevjobs));
   14129           0 :                 if (PyLong_Check(value)) {
   14130           0 :                         unsigned long long test_var;
   14131           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14132           0 :                         if (PyErr_Occurred() != NULL) {
   14133           0 :                                 return -1;
   14134             :                         }
   14135           0 :                         if (test_var > uint_max) {
   14136           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14137             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14138           0 :                                 return -1;
   14139             :                         }
   14140           0 :                         object->chdevjobs = test_var;
   14141             :                 } else {
   14142           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14143             :                           PyLong_Type.tp_name);
   14144           0 :                         return -1;
   14145             :                 }
   14146             :         }
   14147           0 :         return 0;
   14148             : }
   14149             : 
   14150           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_connections(PyObject *obj, void *closure)
   14151             : {
   14152           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14153           0 :         PyObject *py_connections;
   14154           0 :         py_connections = PyLong_FromUnsignedLongLong((uint32_t)(object->connections));
   14155           0 :         return py_connections;
   14156             : }
   14157             : 
   14158           0 : static int py_srvsvc_NetSrvInfo403_set_connections(PyObject *py_obj, PyObject *value, void *closure)
   14159             : {
   14160           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14161           0 :         if (value == NULL) {
   14162           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->connections");
   14163           0 :                 return -1;
   14164             :         }
   14165             :         {
   14166           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->connections));
   14167           0 :                 if (PyLong_Check(value)) {
   14168           0 :                         unsigned long long test_var;
   14169           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14170           0 :                         if (PyErr_Occurred() != NULL) {
   14171           0 :                                 return -1;
   14172             :                         }
   14173           0 :                         if (test_var > uint_max) {
   14174           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14175             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14176           0 :                                 return -1;
   14177             :                         }
   14178           0 :                         object->connections = test_var;
   14179             :                 } else {
   14180           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14181             :                           PyLong_Type.tp_name);
   14182           0 :                         return -1;
   14183             :                 }
   14184             :         }
   14185           0 :         return 0;
   14186             : }
   14187             : 
   14188           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_shares(PyObject *obj, void *closure)
   14189             : {
   14190           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14191           0 :         PyObject *py_shares;
   14192           0 :         py_shares = PyLong_FromUnsignedLongLong((uint32_t)(object->shares));
   14193           0 :         return py_shares;
   14194             : }
   14195             : 
   14196           0 : static int py_srvsvc_NetSrvInfo403_set_shares(PyObject *py_obj, PyObject *value, void *closure)
   14197             : {
   14198           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14199           0 :         if (value == NULL) {
   14200           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->shares");
   14201           0 :                 return -1;
   14202             :         }
   14203             :         {
   14204           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->shares));
   14205           0 :                 if (PyLong_Check(value)) {
   14206           0 :                         unsigned long long test_var;
   14207           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14208           0 :                         if (PyErr_Occurred() != NULL) {
   14209           0 :                                 return -1;
   14210             :                         }
   14211           0 :                         if (test_var > uint_max) {
   14212           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14213             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14214           0 :                                 return -1;
   14215             :                         }
   14216           0 :                         object->shares = test_var;
   14217             :                 } else {
   14218           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14219             :                           PyLong_Type.tp_name);
   14220           0 :                         return -1;
   14221             :                 }
   14222             :         }
   14223           0 :         return 0;
   14224             : }
   14225             : 
   14226           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_openfiles(PyObject *obj, void *closure)
   14227             : {
   14228           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14229           0 :         PyObject *py_openfiles;
   14230           0 :         py_openfiles = PyLong_FromUnsignedLongLong((uint32_t)(object->openfiles));
   14231           0 :         return py_openfiles;
   14232             : }
   14233             : 
   14234           0 : static int py_srvsvc_NetSrvInfo403_set_openfiles(PyObject *py_obj, PyObject *value, void *closure)
   14235             : {
   14236           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14237           0 :         if (value == NULL) {
   14238           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->openfiles");
   14239           0 :                 return -1;
   14240             :         }
   14241             :         {
   14242           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->openfiles));
   14243           0 :                 if (PyLong_Check(value)) {
   14244           0 :                         unsigned long long test_var;
   14245           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14246           0 :                         if (PyErr_Occurred() != NULL) {
   14247           0 :                                 return -1;
   14248             :                         }
   14249           0 :                         if (test_var > uint_max) {
   14250           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14251             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14252           0 :                                 return -1;
   14253             :                         }
   14254           0 :                         object->openfiles = test_var;
   14255             :                 } else {
   14256           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14257             :                           PyLong_Type.tp_name);
   14258           0 :                         return -1;
   14259             :                 }
   14260             :         }
   14261           0 :         return 0;
   14262             : }
   14263             : 
   14264           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_sessopen(PyObject *obj, void *closure)
   14265             : {
   14266           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14267           0 :         PyObject *py_sessopen;
   14268           0 :         py_sessopen = PyLong_FromUnsignedLongLong((uint32_t)(object->sessopen));
   14269           0 :         return py_sessopen;
   14270             : }
   14271             : 
   14272           0 : static int py_srvsvc_NetSrvInfo403_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
   14273             : {
   14274           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14275           0 :         if (value == NULL) {
   14276           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessopen");
   14277           0 :                 return -1;
   14278             :         }
   14279             :         {
   14280           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
   14281           0 :                 if (PyLong_Check(value)) {
   14282           0 :                         unsigned long long test_var;
   14283           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14284           0 :                         if (PyErr_Occurred() != NULL) {
   14285           0 :                                 return -1;
   14286             :                         }
   14287           0 :                         if (test_var > uint_max) {
   14288           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14289             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14290           0 :                                 return -1;
   14291             :                         }
   14292           0 :                         object->sessopen = test_var;
   14293             :                 } else {
   14294           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14295             :                           PyLong_Type.tp_name);
   14296           0 :                         return -1;
   14297             :                 }
   14298             :         }
   14299           0 :         return 0;
   14300             : }
   14301             : 
   14302           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_sesssvc(PyObject *obj, void *closure)
   14303             : {
   14304           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14305           0 :         PyObject *py_sesssvc;
   14306           0 :         py_sesssvc = PyLong_FromUnsignedLongLong((uint32_t)(object->sesssvc));
   14307           0 :         return py_sesssvc;
   14308             : }
   14309             : 
   14310           0 : static int py_srvsvc_NetSrvInfo403_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
   14311             : {
   14312           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14313           0 :         if (value == NULL) {
   14314           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sesssvc");
   14315           0 :                 return -1;
   14316             :         }
   14317             :         {
   14318           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
   14319           0 :                 if (PyLong_Check(value)) {
   14320           0 :                         unsigned long long test_var;
   14321           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14322           0 :                         if (PyErr_Occurred() != NULL) {
   14323           0 :                                 return -1;
   14324             :                         }
   14325           0 :                         if (test_var > uint_max) {
   14326           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14327             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14328           0 :                                 return -1;
   14329             :                         }
   14330           0 :                         object->sesssvc = test_var;
   14331             :                 } else {
   14332           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14333             :                           PyLong_Type.tp_name);
   14334           0 :                         return -1;
   14335             :                 }
   14336             :         }
   14337           0 :         return 0;
   14338             : }
   14339             : 
   14340           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_sessreqs(PyObject *obj, void *closure)
   14341             : {
   14342           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14343           0 :         PyObject *py_sessreqs;
   14344           0 :         py_sessreqs = PyLong_FromUnsignedLongLong((uint32_t)(object->sessreqs));
   14345           0 :         return py_sessreqs;
   14346             : }
   14347             : 
   14348           0 : static int py_srvsvc_NetSrvInfo403_set_sessreqs(PyObject *py_obj, PyObject *value, void *closure)
   14349             : {
   14350           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14351           0 :         if (value == NULL) {
   14352           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessreqs");
   14353           0 :                 return -1;
   14354             :         }
   14355             :         {
   14356           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessreqs));
   14357           0 :                 if (PyLong_Check(value)) {
   14358           0 :                         unsigned long long test_var;
   14359           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14360           0 :                         if (PyErr_Occurred() != NULL) {
   14361           0 :                                 return -1;
   14362             :                         }
   14363           0 :                         if (test_var > uint_max) {
   14364           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14365             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14366           0 :                                 return -1;
   14367             :                         }
   14368           0 :                         object->sessreqs = test_var;
   14369             :                 } else {
   14370           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14371             :                           PyLong_Type.tp_name);
   14372           0 :                         return -1;
   14373             :                 }
   14374             :         }
   14375           0 :         return 0;
   14376             : }
   14377             : 
   14378           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_opensearch(PyObject *obj, void *closure)
   14379             : {
   14380           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14381           0 :         PyObject *py_opensearch;
   14382           0 :         py_opensearch = PyLong_FromUnsignedLongLong((uint32_t)(object->opensearch));
   14383           0 :         return py_opensearch;
   14384             : }
   14385             : 
   14386           0 : static int py_srvsvc_NetSrvInfo403_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
   14387             : {
   14388           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14389           0 :         if (value == NULL) {
   14390           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->opensearch");
   14391           0 :                 return -1;
   14392             :         }
   14393             :         {
   14394           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
   14395           0 :                 if (PyLong_Check(value)) {
   14396           0 :                         unsigned long long test_var;
   14397           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14398           0 :                         if (PyErr_Occurred() != NULL) {
   14399           0 :                                 return -1;
   14400             :                         }
   14401           0 :                         if (test_var > uint_max) {
   14402           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14403             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14404           0 :                                 return -1;
   14405             :                         }
   14406           0 :                         object->opensearch = test_var;
   14407             :                 } else {
   14408           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14409             :                           PyLong_Type.tp_name);
   14410           0 :                         return -1;
   14411             :                 }
   14412             :         }
   14413           0 :         return 0;
   14414             : }
   14415             : 
   14416           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_activelocks(PyObject *obj, void *closure)
   14417             : {
   14418           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14419           0 :         PyObject *py_activelocks;
   14420           0 :         py_activelocks = PyLong_FromUnsignedLongLong((uint32_t)(object->activelocks));
   14421           0 :         return py_activelocks;
   14422             : }
   14423             : 
   14424           0 : static int py_srvsvc_NetSrvInfo403_set_activelocks(PyObject *py_obj, PyObject *value, void *closure)
   14425             : {
   14426           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14427           0 :         if (value == NULL) {
   14428           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->activelocks");
   14429           0 :                 return -1;
   14430             :         }
   14431             :         {
   14432           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->activelocks));
   14433           0 :                 if (PyLong_Check(value)) {
   14434           0 :                         unsigned long long test_var;
   14435           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14436           0 :                         if (PyErr_Occurred() != NULL) {
   14437           0 :                                 return -1;
   14438             :                         }
   14439           0 :                         if (test_var > uint_max) {
   14440           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14441             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14442           0 :                                 return -1;
   14443             :                         }
   14444           0 :                         object->activelocks = test_var;
   14445             :                 } else {
   14446           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14447             :                           PyLong_Type.tp_name);
   14448           0 :                         return -1;
   14449             :                 }
   14450             :         }
   14451           0 :         return 0;
   14452             : }
   14453             : 
   14454           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_numreqbufs(PyObject *obj, void *closure)
   14455             : {
   14456           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14457           0 :         PyObject *py_numreqbufs;
   14458           0 :         py_numreqbufs = PyLong_FromUnsignedLongLong((uint32_t)(object->numreqbufs));
   14459           0 :         return py_numreqbufs;
   14460             : }
   14461             : 
   14462           0 : static int py_srvsvc_NetSrvInfo403_set_numreqbufs(PyObject *py_obj, PyObject *value, void *closure)
   14463             : {
   14464           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14465           0 :         if (value == NULL) {
   14466           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->numreqbufs");
   14467           0 :                 return -1;
   14468             :         }
   14469             :         {
   14470           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numreqbufs));
   14471           0 :                 if (PyLong_Check(value)) {
   14472           0 :                         unsigned long long test_var;
   14473           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14474           0 :                         if (PyErr_Occurred() != NULL) {
   14475           0 :                                 return -1;
   14476             :                         }
   14477           0 :                         if (test_var > uint_max) {
   14478           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14479             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14480           0 :                                 return -1;
   14481             :                         }
   14482           0 :                         object->numreqbufs = test_var;
   14483             :                 } else {
   14484           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14485             :                           PyLong_Type.tp_name);
   14486           0 :                         return -1;
   14487             :                 }
   14488             :         }
   14489           0 :         return 0;
   14490             : }
   14491             : 
   14492           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_sizereqbufs(PyObject *obj, void *closure)
   14493             : {
   14494           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14495           0 :         PyObject *py_sizereqbufs;
   14496           0 :         py_sizereqbufs = PyLong_FromUnsignedLongLong((uint32_t)(object->sizereqbufs));
   14497           0 :         return py_sizereqbufs;
   14498             : }
   14499             : 
   14500           0 : static int py_srvsvc_NetSrvInfo403_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
   14501             : {
   14502           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14503           0 :         if (value == NULL) {
   14504           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sizereqbufs");
   14505           0 :                 return -1;
   14506             :         }
   14507             :         {
   14508           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
   14509           0 :                 if (PyLong_Check(value)) {
   14510           0 :                         unsigned long long test_var;
   14511           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14512           0 :                         if (PyErr_Occurred() != NULL) {
   14513           0 :                                 return -1;
   14514             :                         }
   14515           0 :                         if (test_var > uint_max) {
   14516           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14517             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14518           0 :                                 return -1;
   14519             :                         }
   14520           0 :                         object->sizereqbufs = test_var;
   14521             :                 } else {
   14522           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14523             :                           PyLong_Type.tp_name);
   14524           0 :                         return -1;
   14525             :                 }
   14526             :         }
   14527           0 :         return 0;
   14528             : }
   14529             : 
   14530           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_numbigbufs(PyObject *obj, void *closure)
   14531             : {
   14532           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14533           0 :         PyObject *py_numbigbufs;
   14534           0 :         py_numbigbufs = PyLong_FromUnsignedLongLong((uint32_t)(object->numbigbufs));
   14535           0 :         return py_numbigbufs;
   14536             : }
   14537             : 
   14538           0 : static int py_srvsvc_NetSrvInfo403_set_numbigbufs(PyObject *py_obj, PyObject *value, void *closure)
   14539             : {
   14540           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14541           0 :         if (value == NULL) {
   14542           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->numbigbufs");
   14543           0 :                 return -1;
   14544             :         }
   14545             :         {
   14546           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numbigbufs));
   14547           0 :                 if (PyLong_Check(value)) {
   14548           0 :                         unsigned long long test_var;
   14549           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14550           0 :                         if (PyErr_Occurred() != NULL) {
   14551           0 :                                 return -1;
   14552             :                         }
   14553           0 :                         if (test_var > uint_max) {
   14554           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14555             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14556           0 :                                 return -1;
   14557             :                         }
   14558           0 :                         object->numbigbufs = test_var;
   14559             :                 } else {
   14560           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14561             :                           PyLong_Type.tp_name);
   14562           0 :                         return -1;
   14563             :                 }
   14564             :         }
   14565           0 :         return 0;
   14566             : }
   14567             : 
   14568           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_numfiletasks(PyObject *obj, void *closure)
   14569             : {
   14570           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14571           0 :         PyObject *py_numfiletasks;
   14572           0 :         py_numfiletasks = PyLong_FromUnsignedLongLong((uint32_t)(object->numfiletasks));
   14573           0 :         return py_numfiletasks;
   14574             : }
   14575             : 
   14576           0 : static int py_srvsvc_NetSrvInfo403_set_numfiletasks(PyObject *py_obj, PyObject *value, void *closure)
   14577             : {
   14578           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14579           0 :         if (value == NULL) {
   14580           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->numfiletasks");
   14581           0 :                 return -1;
   14582             :         }
   14583             :         {
   14584           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numfiletasks));
   14585           0 :                 if (PyLong_Check(value)) {
   14586           0 :                         unsigned long long test_var;
   14587           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14588           0 :                         if (PyErr_Occurred() != NULL) {
   14589           0 :                                 return -1;
   14590             :                         }
   14591           0 :                         if (test_var > uint_max) {
   14592           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14593             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14594           0 :                                 return -1;
   14595             :                         }
   14596           0 :                         object->numfiletasks = test_var;
   14597             :                 } else {
   14598           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14599             :                           PyLong_Type.tp_name);
   14600           0 :                         return -1;
   14601             :                 }
   14602             :         }
   14603           0 :         return 0;
   14604             : }
   14605             : 
   14606           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_alertsched(PyObject *obj, void *closure)
   14607             : {
   14608           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14609           0 :         PyObject *py_alertsched;
   14610           0 :         py_alertsched = PyLong_FromUnsignedLongLong((uint32_t)(object->alertsched));
   14611           0 :         return py_alertsched;
   14612             : }
   14613             : 
   14614           0 : static int py_srvsvc_NetSrvInfo403_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
   14615             : {
   14616           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14617           0 :         if (value == NULL) {
   14618           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->alertsched");
   14619           0 :                 return -1;
   14620             :         }
   14621             :         {
   14622           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
   14623           0 :                 if (PyLong_Check(value)) {
   14624           0 :                         unsigned long long test_var;
   14625           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14626           0 :                         if (PyErr_Occurred() != NULL) {
   14627           0 :                                 return -1;
   14628             :                         }
   14629           0 :                         if (test_var > uint_max) {
   14630           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14631             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14632           0 :                                 return -1;
   14633             :                         }
   14634           0 :                         object->alertsched = test_var;
   14635             :                 } else {
   14636           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14637             :                           PyLong_Type.tp_name);
   14638           0 :                         return -1;
   14639             :                 }
   14640             :         }
   14641           0 :         return 0;
   14642             : }
   14643             : 
   14644           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_erroralert(PyObject *obj, void *closure)
   14645             : {
   14646           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14647           0 :         PyObject *py_erroralert;
   14648           0 :         py_erroralert = PyLong_FromUnsignedLongLong((uint32_t)(object->erroralert));
   14649           0 :         return py_erroralert;
   14650             : }
   14651             : 
   14652           0 : static int py_srvsvc_NetSrvInfo403_set_erroralert(PyObject *py_obj, PyObject *value, void *closure)
   14653             : {
   14654           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14655           0 :         if (value == NULL) {
   14656           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->erroralert");
   14657           0 :                 return -1;
   14658             :         }
   14659             :         {
   14660           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->erroralert));
   14661           0 :                 if (PyLong_Check(value)) {
   14662           0 :                         unsigned long long test_var;
   14663           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14664           0 :                         if (PyErr_Occurred() != NULL) {
   14665           0 :                                 return -1;
   14666             :                         }
   14667           0 :                         if (test_var > uint_max) {
   14668           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14669             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14670           0 :                                 return -1;
   14671             :                         }
   14672           0 :                         object->erroralert = test_var;
   14673             :                 } else {
   14674           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14675             :                           PyLong_Type.tp_name);
   14676           0 :                         return -1;
   14677             :                 }
   14678             :         }
   14679           0 :         return 0;
   14680             : }
   14681             : 
   14682           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_logonalert(PyObject *obj, void *closure)
   14683             : {
   14684           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14685           0 :         PyObject *py_logonalert;
   14686           0 :         py_logonalert = PyLong_FromUnsignedLongLong((uint32_t)(object->logonalert));
   14687           0 :         return py_logonalert;
   14688             : }
   14689             : 
   14690           0 : static int py_srvsvc_NetSrvInfo403_set_logonalert(PyObject *py_obj, PyObject *value, void *closure)
   14691             : {
   14692           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14693           0 :         if (value == NULL) {
   14694           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logonalert");
   14695           0 :                 return -1;
   14696             :         }
   14697             :         {
   14698           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logonalert));
   14699           0 :                 if (PyLong_Check(value)) {
   14700           0 :                         unsigned long long test_var;
   14701           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14702           0 :                         if (PyErr_Occurred() != NULL) {
   14703           0 :                                 return -1;
   14704             :                         }
   14705           0 :                         if (test_var > uint_max) {
   14706           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14707             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14708           0 :                                 return -1;
   14709             :                         }
   14710           0 :                         object->logonalert = test_var;
   14711             :                 } else {
   14712           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14713             :                           PyLong_Type.tp_name);
   14714           0 :                         return -1;
   14715             :                 }
   14716             :         }
   14717           0 :         return 0;
   14718             : }
   14719             : 
   14720           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_accessalert(PyObject *obj, void *closure)
   14721             : {
   14722           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14723           0 :         PyObject *py_accessalert;
   14724           0 :         py_accessalert = PyLong_FromUnsignedLongLong((uint32_t)(object->accessalert));
   14725           0 :         return py_accessalert;
   14726             : }
   14727             : 
   14728           0 : static int py_srvsvc_NetSrvInfo403_set_accessalert(PyObject *py_obj, PyObject *value, void *closure)
   14729             : {
   14730           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14731           0 :         if (value == NULL) {
   14732           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->accessalert");
   14733           0 :                 return -1;
   14734             :         }
   14735             :         {
   14736           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->accessalert));
   14737           0 :                 if (PyLong_Check(value)) {
   14738           0 :                         unsigned long long test_var;
   14739           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14740           0 :                         if (PyErr_Occurred() != NULL) {
   14741           0 :                                 return -1;
   14742             :                         }
   14743           0 :                         if (test_var > uint_max) {
   14744           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14745             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14746           0 :                                 return -1;
   14747             :                         }
   14748           0 :                         object->accessalert = test_var;
   14749             :                 } else {
   14750           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14751             :                           PyLong_Type.tp_name);
   14752           0 :                         return -1;
   14753             :                 }
   14754             :         }
   14755           0 :         return 0;
   14756             : }
   14757             : 
   14758           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_diskalert(PyObject *obj, void *closure)
   14759             : {
   14760           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14761           0 :         PyObject *py_diskalert;
   14762           0 :         py_diskalert = PyLong_FromUnsignedLongLong((uint32_t)(object->diskalert));
   14763           0 :         return py_diskalert;
   14764             : }
   14765             : 
   14766           0 : static int py_srvsvc_NetSrvInfo403_set_diskalert(PyObject *py_obj, PyObject *value, void *closure)
   14767             : {
   14768           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14769           0 :         if (value == NULL) {
   14770           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->diskalert");
   14771           0 :                 return -1;
   14772             :         }
   14773             :         {
   14774           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskalert));
   14775           0 :                 if (PyLong_Check(value)) {
   14776           0 :                         unsigned long long test_var;
   14777           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14778           0 :                         if (PyErr_Occurred() != NULL) {
   14779           0 :                                 return -1;
   14780             :                         }
   14781           0 :                         if (test_var > uint_max) {
   14782           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14783             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14784           0 :                                 return -1;
   14785             :                         }
   14786           0 :                         object->diskalert = test_var;
   14787             :                 } else {
   14788           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14789             :                           PyLong_Type.tp_name);
   14790           0 :                         return -1;
   14791             :                 }
   14792             :         }
   14793           0 :         return 0;
   14794             : }
   14795             : 
   14796           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_netioalert(PyObject *obj, void *closure)
   14797             : {
   14798           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14799           0 :         PyObject *py_netioalert;
   14800           0 :         py_netioalert = PyLong_FromUnsignedLongLong((uint32_t)(object->netioalert));
   14801           0 :         return py_netioalert;
   14802             : }
   14803             : 
   14804           0 : static int py_srvsvc_NetSrvInfo403_set_netioalert(PyObject *py_obj, PyObject *value, void *closure)
   14805             : {
   14806           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14807           0 :         if (value == NULL) {
   14808           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->netioalert");
   14809           0 :                 return -1;
   14810             :         }
   14811             :         {
   14812           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->netioalert));
   14813           0 :                 if (PyLong_Check(value)) {
   14814           0 :                         unsigned long long test_var;
   14815           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14816           0 :                         if (PyErr_Occurred() != NULL) {
   14817           0 :                                 return -1;
   14818             :                         }
   14819           0 :                         if (test_var > uint_max) {
   14820           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14821             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14822           0 :                                 return -1;
   14823             :                         }
   14824           0 :                         object->netioalert = test_var;
   14825             :                 } else {
   14826           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14827             :                           PyLong_Type.tp_name);
   14828           0 :                         return -1;
   14829             :                 }
   14830             :         }
   14831           0 :         return 0;
   14832             : }
   14833             : 
   14834           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_maxaudits(PyObject *obj, void *closure)
   14835             : {
   14836           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14837           0 :         PyObject *py_maxaudits;
   14838           0 :         py_maxaudits = PyLong_FromUnsignedLongLong((uint32_t)(object->maxaudits));
   14839           0 :         return py_maxaudits;
   14840             : }
   14841             : 
   14842           0 : static int py_srvsvc_NetSrvInfo403_set_maxaudits(PyObject *py_obj, PyObject *value, void *closure)
   14843             : {
   14844           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14845           0 :         if (value == NULL) {
   14846           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxaudits");
   14847           0 :                 return -1;
   14848             :         }
   14849             :         {
   14850           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxaudits));
   14851           0 :                 if (PyLong_Check(value)) {
   14852           0 :                         unsigned long long test_var;
   14853           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14854           0 :                         if (PyErr_Occurred() != NULL) {
   14855           0 :                                 return -1;
   14856             :                         }
   14857           0 :                         if (test_var > uint_max) {
   14858           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14859             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14860           0 :                                 return -1;
   14861             :                         }
   14862           0 :                         object->maxaudits = test_var;
   14863             :                 } else {
   14864           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14865             :                           PyLong_Type.tp_name);
   14866           0 :                         return -1;
   14867             :                 }
   14868             :         }
   14869           0 :         return 0;
   14870             : }
   14871             : 
   14872           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_srvheuristics(PyObject *obj, void *closure)
   14873             : {
   14874           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14875           0 :         PyObject *py_srvheuristics;
   14876           0 :         if (object->srvheuristics == NULL) {
   14877           0 :                 Py_RETURN_NONE;
   14878             :         }
   14879           0 :         if (object->srvheuristics == NULL) {
   14880           0 :                 py_srvheuristics = Py_None;
   14881           0 :                 Py_INCREF(py_srvheuristics);
   14882             :         } else {
   14883           0 :                 if (object->srvheuristics == NULL) {
   14884           0 :                         py_srvheuristics = Py_None;
   14885           0 :                         Py_INCREF(py_srvheuristics);
   14886             :                 } else {
   14887           0 :                         py_srvheuristics = PyUnicode_Decode(object->srvheuristics, strlen(object->srvheuristics), "utf-8", "ignore");
   14888             :                 }
   14889             :         }
   14890           0 :         return py_srvheuristics;
   14891             : }
   14892             : 
   14893           0 : static int py_srvsvc_NetSrvInfo403_set_srvheuristics(PyObject *py_obj, PyObject *value, void *closure)
   14894             : {
   14895           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14896           0 :         if (value == NULL) {
   14897           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->srvheuristics");
   14898           0 :                 return -1;
   14899             :         }
   14900           0 :         if (value == Py_None) {
   14901           0 :                 object->srvheuristics = NULL;
   14902             :         } else {
   14903           0 :                 object->srvheuristics = NULL;
   14904             :                 {
   14905           0 :                         const char *test_str;
   14906           0 :                         const char *talloc_str;
   14907           0 :                         PyObject *unicode = NULL;
   14908           0 :                         if (PyUnicode_Check(value)) {
   14909           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   14910           0 :                                 if (unicode == NULL) {
   14911           0 :                                         return -1;
   14912             :                                 }
   14913           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   14914           0 :                         } else if (PyBytes_Check(value)) {
   14915           0 :                                 test_str = PyBytes_AS_STRING(value);
   14916             :                         } else {
   14917           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   14918           0 :                                 return -1;
   14919             :                         }
   14920           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   14921           0 :                         if (unicode != NULL) {
   14922           0 :                                 Py_DECREF(unicode);
   14923             :                         }
   14924           0 :                         if (talloc_str == NULL) {
   14925           0 :                                 PyErr_NoMemory();
   14926           0 :                                 return -1;
   14927             :                         }
   14928           0 :                         object->srvheuristics = talloc_str;
   14929             :                 }
   14930             :         }
   14931           0 :         return 0;
   14932             : }
   14933             : 
   14934           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_auditedevents(PyObject *obj, void *closure)
   14935             : {
   14936           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14937           0 :         PyObject *py_auditedevents;
   14938           0 :         py_auditedevents = PyLong_FromUnsignedLongLong((uint32_t)(object->auditedevents));
   14939           0 :         return py_auditedevents;
   14940             : }
   14941             : 
   14942           0 : static int py_srvsvc_NetSrvInfo403_set_auditedevents(PyObject *py_obj, PyObject *value, void *closure)
   14943             : {
   14944           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14945           0 :         if (value == NULL) {
   14946           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->auditedevents");
   14947           0 :                 return -1;
   14948             :         }
   14949             :         {
   14950           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditedevents));
   14951           0 :                 if (PyLong_Check(value)) {
   14952           0 :                         unsigned long long test_var;
   14953           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14954           0 :                         if (PyErr_Occurred() != NULL) {
   14955           0 :                                 return -1;
   14956             :                         }
   14957           0 :                         if (test_var > uint_max) {
   14958           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14959             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14960           0 :                                 return -1;
   14961             :                         }
   14962           0 :                         object->auditedevents = test_var;
   14963             :                 } else {
   14964           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14965             :                           PyLong_Type.tp_name);
   14966           0 :                         return -1;
   14967             :                 }
   14968             :         }
   14969           0 :         return 0;
   14970             : }
   14971             : 
   14972           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_auditprofile(PyObject *obj, void *closure)
   14973             : {
   14974           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   14975           0 :         PyObject *py_auditprofile;
   14976           0 :         py_auditprofile = PyLong_FromUnsignedLongLong((uint32_t)(object->auditprofile));
   14977           0 :         return py_auditprofile;
   14978             : }
   14979             : 
   14980           0 : static int py_srvsvc_NetSrvInfo403_set_auditprofile(PyObject *py_obj, PyObject *value, void *closure)
   14981             : {
   14982           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   14983           0 :         if (value == NULL) {
   14984           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->auditprofile");
   14985           0 :                 return -1;
   14986             :         }
   14987             :         {
   14988           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditprofile));
   14989           0 :                 if (PyLong_Check(value)) {
   14990           0 :                         unsigned long long test_var;
   14991           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14992           0 :                         if (PyErr_Occurred() != NULL) {
   14993           0 :                                 return -1;
   14994             :                         }
   14995           0 :                         if (test_var > uint_max) {
   14996           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14997             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14998           0 :                                 return -1;
   14999             :                         }
   15000           0 :                         object->auditprofile = test_var;
   15001             :                 } else {
   15002           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15003             :                           PyLong_Type.tp_name);
   15004           0 :                         return -1;
   15005             :                 }
   15006             :         }
   15007           0 :         return 0;
   15008             : }
   15009             : 
   15010           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_autopath(PyObject *obj, void *closure)
   15011             : {
   15012           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(obj);
   15013           0 :         PyObject *py_autopath;
   15014           0 :         if (object->autopath == NULL) {
   15015           0 :                 Py_RETURN_NONE;
   15016             :         }
   15017           0 :         if (object->autopath == NULL) {
   15018           0 :                 py_autopath = Py_None;
   15019           0 :                 Py_INCREF(py_autopath);
   15020             :         } else {
   15021           0 :                 if (object->autopath == NULL) {
   15022           0 :                         py_autopath = Py_None;
   15023           0 :                         Py_INCREF(py_autopath);
   15024             :                 } else {
   15025           0 :                         py_autopath = PyUnicode_Decode(object->autopath, strlen(object->autopath), "utf-8", "ignore");
   15026             :                 }
   15027             :         }
   15028           0 :         return py_autopath;
   15029             : }
   15030             : 
   15031           0 : static int py_srvsvc_NetSrvInfo403_set_autopath(PyObject *py_obj, PyObject *value, void *closure)
   15032             : {
   15033           0 :         struct srvsvc_NetSrvInfo403 *object = pytalloc_get_ptr(py_obj);
   15034           0 :         if (value == NULL) {
   15035           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->autopath");
   15036           0 :                 return -1;
   15037             :         }
   15038           0 :         if (value == Py_None) {
   15039           0 :                 object->autopath = NULL;
   15040             :         } else {
   15041           0 :                 object->autopath = NULL;
   15042             :                 {
   15043           0 :                         const char *test_str;
   15044           0 :                         const char *talloc_str;
   15045           0 :                         PyObject *unicode = NULL;
   15046           0 :                         if (PyUnicode_Check(value)) {
   15047           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   15048           0 :                                 if (unicode == NULL) {
   15049           0 :                                         return -1;
   15050             :                                 }
   15051           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   15052           0 :                         } else if (PyBytes_Check(value)) {
   15053           0 :                                 test_str = PyBytes_AS_STRING(value);
   15054             :                         } else {
   15055           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   15056           0 :                                 return -1;
   15057             :                         }
   15058           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   15059           0 :                         if (unicode != NULL) {
   15060           0 :                                 Py_DECREF(unicode);
   15061             :                         }
   15062           0 :                         if (talloc_str == NULL) {
   15063           0 :                                 PyErr_NoMemory();
   15064           0 :                                 return -1;
   15065             :                         }
   15066           0 :                         object->autopath = talloc_str;
   15067             :                 }
   15068             :         }
   15069           0 :         return 0;
   15070             : }
   15071             : 
   15072             : static PyGetSetDef py_srvsvc_NetSrvInfo403_getsetters[] = {
   15073             :         {
   15074             :                 .name = discard_const_p(char, "ulist_mtime"),
   15075             :                 .get = py_srvsvc_NetSrvInfo403_get_ulist_mtime,
   15076             :                 .set = py_srvsvc_NetSrvInfo403_set_ulist_mtime,
   15077             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15078             :         },
   15079             :         {
   15080             :                 .name = discard_const_p(char, "glist_mtime"),
   15081             :                 .get = py_srvsvc_NetSrvInfo403_get_glist_mtime,
   15082             :                 .set = py_srvsvc_NetSrvInfo403_set_glist_mtime,
   15083             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15084             :         },
   15085             :         {
   15086             :                 .name = discard_const_p(char, "alist_mtime"),
   15087             :                 .get = py_srvsvc_NetSrvInfo403_get_alist_mtime,
   15088             :                 .set = py_srvsvc_NetSrvInfo403_set_alist_mtime,
   15089             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15090             :         },
   15091             :         {
   15092             :                 .name = discard_const_p(char, "alerts"),
   15093             :                 .get = py_srvsvc_NetSrvInfo403_get_alerts,
   15094             :                 .set = py_srvsvc_NetSrvInfo403_set_alerts,
   15095             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   15096             :         },
   15097             :         {
   15098             :                 .name = discard_const_p(char, "security"),
   15099             :                 .get = py_srvsvc_NetSrvInfo403_get_security,
   15100             :                 .set = py_srvsvc_NetSrvInfo403_set_security,
   15101             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15102             :         },
   15103             :         {
   15104             :                 .name = discard_const_p(char, "numadmin"),
   15105             :                 .get = py_srvsvc_NetSrvInfo403_get_numadmin,
   15106             :                 .set = py_srvsvc_NetSrvInfo403_set_numadmin,
   15107             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15108             :         },
   15109             :         {
   15110             :                 .name = discard_const_p(char, "lanmask"),
   15111             :                 .get = py_srvsvc_NetSrvInfo403_get_lanmask,
   15112             :                 .set = py_srvsvc_NetSrvInfo403_set_lanmask,
   15113             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15114             :         },
   15115             :         {
   15116             :                 .name = discard_const_p(char, "guestaccount"),
   15117             :                 .get = py_srvsvc_NetSrvInfo403_get_guestaccount,
   15118             :                 .set = py_srvsvc_NetSrvInfo403_set_guestaccount,
   15119             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   15120             :         },
   15121             :         {
   15122             :                 .name = discard_const_p(char, "chdevs"),
   15123             :                 .get = py_srvsvc_NetSrvInfo403_get_chdevs,
   15124             :                 .set = py_srvsvc_NetSrvInfo403_set_chdevs,
   15125             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15126             :         },
   15127             :         {
   15128             :                 .name = discard_const_p(char, "chdevqs"),
   15129             :                 .get = py_srvsvc_NetSrvInfo403_get_chdevqs,
   15130             :                 .set = py_srvsvc_NetSrvInfo403_set_chdevqs,
   15131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15132             :         },
   15133             :         {
   15134             :                 .name = discard_const_p(char, "chdevjobs"),
   15135             :                 .get = py_srvsvc_NetSrvInfo403_get_chdevjobs,
   15136             :                 .set = py_srvsvc_NetSrvInfo403_set_chdevjobs,
   15137             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15138             :         },
   15139             :         {
   15140             :                 .name = discard_const_p(char, "connections"),
   15141             :                 .get = py_srvsvc_NetSrvInfo403_get_connections,
   15142             :                 .set = py_srvsvc_NetSrvInfo403_set_connections,
   15143             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15144             :         },
   15145             :         {
   15146             :                 .name = discard_const_p(char, "shares"),
   15147             :                 .get = py_srvsvc_NetSrvInfo403_get_shares,
   15148             :                 .set = py_srvsvc_NetSrvInfo403_set_shares,
   15149             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15150             :         },
   15151             :         {
   15152             :                 .name = discard_const_p(char, "openfiles"),
   15153             :                 .get = py_srvsvc_NetSrvInfo403_get_openfiles,
   15154             :                 .set = py_srvsvc_NetSrvInfo403_set_openfiles,
   15155             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15156             :         },
   15157             :         {
   15158             :                 .name = discard_const_p(char, "sessopen"),
   15159             :                 .get = py_srvsvc_NetSrvInfo403_get_sessopen,
   15160             :                 .set = py_srvsvc_NetSrvInfo403_set_sessopen,
   15161             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15162             :         },
   15163             :         {
   15164             :                 .name = discard_const_p(char, "sesssvc"),
   15165             :                 .get = py_srvsvc_NetSrvInfo403_get_sesssvc,
   15166             :                 .set = py_srvsvc_NetSrvInfo403_set_sesssvc,
   15167             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15168             :         },
   15169             :         {
   15170             :                 .name = discard_const_p(char, "sessreqs"),
   15171             :                 .get = py_srvsvc_NetSrvInfo403_get_sessreqs,
   15172             :                 .set = py_srvsvc_NetSrvInfo403_set_sessreqs,
   15173             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15174             :         },
   15175             :         {
   15176             :                 .name = discard_const_p(char, "opensearch"),
   15177             :                 .get = py_srvsvc_NetSrvInfo403_get_opensearch,
   15178             :                 .set = py_srvsvc_NetSrvInfo403_set_opensearch,
   15179             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15180             :         },
   15181             :         {
   15182             :                 .name = discard_const_p(char, "activelocks"),
   15183             :                 .get = py_srvsvc_NetSrvInfo403_get_activelocks,
   15184             :                 .set = py_srvsvc_NetSrvInfo403_set_activelocks,
   15185             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15186             :         },
   15187             :         {
   15188             :                 .name = discard_const_p(char, "numreqbufs"),
   15189             :                 .get = py_srvsvc_NetSrvInfo403_get_numreqbufs,
   15190             :                 .set = py_srvsvc_NetSrvInfo403_set_numreqbufs,
   15191             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15192             :         },
   15193             :         {
   15194             :                 .name = discard_const_p(char, "sizereqbufs"),
   15195             :                 .get = py_srvsvc_NetSrvInfo403_get_sizereqbufs,
   15196             :                 .set = py_srvsvc_NetSrvInfo403_set_sizereqbufs,
   15197             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15198             :         },
   15199             :         {
   15200             :                 .name = discard_const_p(char, "numbigbufs"),
   15201             :                 .get = py_srvsvc_NetSrvInfo403_get_numbigbufs,
   15202             :                 .set = py_srvsvc_NetSrvInfo403_set_numbigbufs,
   15203             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15204             :         },
   15205             :         {
   15206             :                 .name = discard_const_p(char, "numfiletasks"),
   15207             :                 .get = py_srvsvc_NetSrvInfo403_get_numfiletasks,
   15208             :                 .set = py_srvsvc_NetSrvInfo403_set_numfiletasks,
   15209             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15210             :         },
   15211             :         {
   15212             :                 .name = discard_const_p(char, "alertsched"),
   15213             :                 .get = py_srvsvc_NetSrvInfo403_get_alertsched,
   15214             :                 .set = py_srvsvc_NetSrvInfo403_set_alertsched,
   15215             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15216             :         },
   15217             :         {
   15218             :                 .name = discard_const_p(char, "erroralert"),
   15219             :                 .get = py_srvsvc_NetSrvInfo403_get_erroralert,
   15220             :                 .set = py_srvsvc_NetSrvInfo403_set_erroralert,
   15221             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15222             :         },
   15223             :         {
   15224             :                 .name = discard_const_p(char, "logonalert"),
   15225             :                 .get = py_srvsvc_NetSrvInfo403_get_logonalert,
   15226             :                 .set = py_srvsvc_NetSrvInfo403_set_logonalert,
   15227             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15228             :         },
   15229             :         {
   15230             :                 .name = discard_const_p(char, "accessalert"),
   15231             :                 .get = py_srvsvc_NetSrvInfo403_get_accessalert,
   15232             :                 .set = py_srvsvc_NetSrvInfo403_set_accessalert,
   15233             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15234             :         },
   15235             :         {
   15236             :                 .name = discard_const_p(char, "diskalert"),
   15237             :                 .get = py_srvsvc_NetSrvInfo403_get_diskalert,
   15238             :                 .set = py_srvsvc_NetSrvInfo403_set_diskalert,
   15239             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15240             :         },
   15241             :         {
   15242             :                 .name = discard_const_p(char, "netioalert"),
   15243             :                 .get = py_srvsvc_NetSrvInfo403_get_netioalert,
   15244             :                 .set = py_srvsvc_NetSrvInfo403_set_netioalert,
   15245             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15246             :         },
   15247             :         {
   15248             :                 .name = discard_const_p(char, "maxaudits"),
   15249             :                 .get = py_srvsvc_NetSrvInfo403_get_maxaudits,
   15250             :                 .set = py_srvsvc_NetSrvInfo403_set_maxaudits,
   15251             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15252             :         },
   15253             :         {
   15254             :                 .name = discard_const_p(char, "srvheuristics"),
   15255             :                 .get = py_srvsvc_NetSrvInfo403_get_srvheuristics,
   15256             :                 .set = py_srvsvc_NetSrvInfo403_set_srvheuristics,
   15257             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   15258             :         },
   15259             :         {
   15260             :                 .name = discard_const_p(char, "auditedevents"),
   15261             :                 .get = py_srvsvc_NetSrvInfo403_get_auditedevents,
   15262             :                 .set = py_srvsvc_NetSrvInfo403_set_auditedevents,
   15263             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15264             :         },
   15265             :         {
   15266             :                 .name = discard_const_p(char, "auditprofile"),
   15267             :                 .get = py_srvsvc_NetSrvInfo403_get_auditprofile,
   15268             :                 .set = py_srvsvc_NetSrvInfo403_set_auditprofile,
   15269             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15270             :         },
   15271             :         {
   15272             :                 .name = discard_const_p(char, "autopath"),
   15273             :                 .get = py_srvsvc_NetSrvInfo403_get_autopath,
   15274             :                 .set = py_srvsvc_NetSrvInfo403_set_autopath,
   15275             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   15276             :         },
   15277             :         { .name = NULL }
   15278             : };
   15279             : 
   15280           0 : static PyObject *py_srvsvc_NetSrvInfo403_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15281             : {
   15282           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo403, type);
   15283             : }
   15284             : 
   15285             : 
   15286             : static PyTypeObject srvsvc_NetSrvInfo403_Type = {
   15287             :         PyVarObject_HEAD_INIT(NULL, 0)
   15288             :         .tp_name = "srvsvc.NetSrvInfo403",
   15289             :         .tp_getset = py_srvsvc_NetSrvInfo403_getsetters,
   15290             :         .tp_methods = NULL,
   15291             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15292             :         .tp_new = py_srvsvc_NetSrvInfo403_new,
   15293             : };
   15294             : 
   15295             : 
   15296           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_sessopen(PyObject *obj, void *closure)
   15297             : {
   15298           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15299           0 :         PyObject *py_sessopen;
   15300           0 :         py_sessopen = PyLong_FromUnsignedLongLong((uint32_t)(object->sessopen));
   15301           0 :         return py_sessopen;
   15302             : }
   15303             : 
   15304           0 : static int py_srvsvc_NetSrvInfo502_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
   15305             : {
   15306           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15307           0 :         if (value == NULL) {
   15308           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessopen");
   15309           0 :                 return -1;
   15310             :         }
   15311             :         {
   15312           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
   15313           0 :                 if (PyLong_Check(value)) {
   15314           0 :                         unsigned long long test_var;
   15315           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15316           0 :                         if (PyErr_Occurred() != NULL) {
   15317           0 :                                 return -1;
   15318             :                         }
   15319           0 :                         if (test_var > uint_max) {
   15320           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15321             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15322           0 :                                 return -1;
   15323             :                         }
   15324           0 :                         object->sessopen = test_var;
   15325             :                 } else {
   15326           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15327             :                           PyLong_Type.tp_name);
   15328           0 :                         return -1;
   15329             :                 }
   15330             :         }
   15331           0 :         return 0;
   15332             : }
   15333             : 
   15334           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_sesssvc(PyObject *obj, void *closure)
   15335             : {
   15336           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15337           0 :         PyObject *py_sesssvc;
   15338           0 :         py_sesssvc = PyLong_FromUnsignedLongLong((uint32_t)(object->sesssvc));
   15339           0 :         return py_sesssvc;
   15340             : }
   15341             : 
   15342           0 : static int py_srvsvc_NetSrvInfo502_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
   15343             : {
   15344           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15345           0 :         if (value == NULL) {
   15346           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sesssvc");
   15347           0 :                 return -1;
   15348             :         }
   15349             :         {
   15350           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
   15351           0 :                 if (PyLong_Check(value)) {
   15352           0 :                         unsigned long long test_var;
   15353           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15354           0 :                         if (PyErr_Occurred() != NULL) {
   15355           0 :                                 return -1;
   15356             :                         }
   15357           0 :                         if (test_var > uint_max) {
   15358           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15359             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15360           0 :                                 return -1;
   15361             :                         }
   15362           0 :                         object->sesssvc = test_var;
   15363             :                 } else {
   15364           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15365             :                           PyLong_Type.tp_name);
   15366           0 :                         return -1;
   15367             :                 }
   15368             :         }
   15369           0 :         return 0;
   15370             : }
   15371             : 
   15372           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_opensearch(PyObject *obj, void *closure)
   15373             : {
   15374           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15375           0 :         PyObject *py_opensearch;
   15376           0 :         py_opensearch = PyLong_FromUnsignedLongLong((uint32_t)(object->opensearch));
   15377           0 :         return py_opensearch;
   15378             : }
   15379             : 
   15380           0 : static int py_srvsvc_NetSrvInfo502_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
   15381             : {
   15382           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15383           0 :         if (value == NULL) {
   15384           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->opensearch");
   15385           0 :                 return -1;
   15386             :         }
   15387             :         {
   15388           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
   15389           0 :                 if (PyLong_Check(value)) {
   15390           0 :                         unsigned long long test_var;
   15391           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15392           0 :                         if (PyErr_Occurred() != NULL) {
   15393           0 :                                 return -1;
   15394             :                         }
   15395           0 :                         if (test_var > uint_max) {
   15396           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15397             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15398           0 :                                 return -1;
   15399             :                         }
   15400           0 :                         object->opensearch = test_var;
   15401             :                 } else {
   15402           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15403             :                           PyLong_Type.tp_name);
   15404           0 :                         return -1;
   15405             :                 }
   15406             :         }
   15407           0 :         return 0;
   15408             : }
   15409             : 
   15410           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_sizereqbufs(PyObject *obj, void *closure)
   15411             : {
   15412           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15413           0 :         PyObject *py_sizereqbufs;
   15414           0 :         py_sizereqbufs = PyLong_FromUnsignedLongLong((uint32_t)(object->sizereqbufs));
   15415           0 :         return py_sizereqbufs;
   15416             : }
   15417             : 
   15418           0 : static int py_srvsvc_NetSrvInfo502_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
   15419             : {
   15420           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15421           0 :         if (value == NULL) {
   15422           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sizereqbufs");
   15423           0 :                 return -1;
   15424             :         }
   15425             :         {
   15426           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
   15427           0 :                 if (PyLong_Check(value)) {
   15428           0 :                         unsigned long long test_var;
   15429           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15430           0 :                         if (PyErr_Occurred() != NULL) {
   15431           0 :                                 return -1;
   15432             :                         }
   15433           0 :                         if (test_var > uint_max) {
   15434           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15435             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15436           0 :                                 return -1;
   15437             :                         }
   15438           0 :                         object->sizereqbufs = test_var;
   15439             :                 } else {
   15440           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15441             :                           PyLong_Type.tp_name);
   15442           0 :                         return -1;
   15443             :                 }
   15444             :         }
   15445           0 :         return 0;
   15446             : }
   15447             : 
   15448           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_initworkitems(PyObject *obj, void *closure)
   15449             : {
   15450           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15451           0 :         PyObject *py_initworkitems;
   15452           0 :         py_initworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->initworkitems));
   15453           0 :         return py_initworkitems;
   15454             : }
   15455             : 
   15456           0 : static int py_srvsvc_NetSrvInfo502_set_initworkitems(PyObject *py_obj, PyObject *value, void *closure)
   15457             : {
   15458           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15459           0 :         if (value == NULL) {
   15460           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->initworkitems");
   15461           0 :                 return -1;
   15462             :         }
   15463             :         {
   15464           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initworkitems));
   15465           0 :                 if (PyLong_Check(value)) {
   15466           0 :                         unsigned long long test_var;
   15467           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15468           0 :                         if (PyErr_Occurred() != NULL) {
   15469           0 :                                 return -1;
   15470             :                         }
   15471           0 :                         if (test_var > uint_max) {
   15472           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15473             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15474           0 :                                 return -1;
   15475             :                         }
   15476           0 :                         object->initworkitems = test_var;
   15477             :                 } else {
   15478           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15479             :                           PyLong_Type.tp_name);
   15480           0 :                         return -1;
   15481             :                 }
   15482             :         }
   15483           0 :         return 0;
   15484             : }
   15485             : 
   15486           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_maxworkitems(PyObject *obj, void *closure)
   15487             : {
   15488           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15489           0 :         PyObject *py_maxworkitems;
   15490           0 :         py_maxworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->maxworkitems));
   15491           0 :         return py_maxworkitems;
   15492             : }
   15493             : 
   15494           0 : static int py_srvsvc_NetSrvInfo502_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
   15495             : {
   15496           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15497           0 :         if (value == NULL) {
   15498           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxworkitems");
   15499           0 :                 return -1;
   15500             :         }
   15501             :         {
   15502           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
   15503           0 :                 if (PyLong_Check(value)) {
   15504           0 :                         unsigned long long test_var;
   15505           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15506           0 :                         if (PyErr_Occurred() != NULL) {
   15507           0 :                                 return -1;
   15508             :                         }
   15509           0 :                         if (test_var > uint_max) {
   15510           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15511             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15512           0 :                                 return -1;
   15513             :                         }
   15514           0 :                         object->maxworkitems = test_var;
   15515             :                 } else {
   15516           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15517             :                           PyLong_Type.tp_name);
   15518           0 :                         return -1;
   15519             :                 }
   15520             :         }
   15521           0 :         return 0;
   15522             : }
   15523             : 
   15524           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_rawworkitems(PyObject *obj, void *closure)
   15525             : {
   15526           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15527           0 :         PyObject *py_rawworkitems;
   15528           0 :         py_rawworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->rawworkitems));
   15529           0 :         return py_rawworkitems;
   15530             : }
   15531             : 
   15532           0 : static int py_srvsvc_NetSrvInfo502_set_rawworkitems(PyObject *py_obj, PyObject *value, void *closure)
   15533             : {
   15534           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15535           0 :         if (value == NULL) {
   15536           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rawworkitems");
   15537           0 :                 return -1;
   15538             :         }
   15539             :         {
   15540           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rawworkitems));
   15541           0 :                 if (PyLong_Check(value)) {
   15542           0 :                         unsigned long long test_var;
   15543           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15544           0 :                         if (PyErr_Occurred() != NULL) {
   15545           0 :                                 return -1;
   15546             :                         }
   15547           0 :                         if (test_var > uint_max) {
   15548           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15549             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15550           0 :                                 return -1;
   15551             :                         }
   15552           0 :                         object->rawworkitems = test_var;
   15553             :                 } else {
   15554           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15555             :                           PyLong_Type.tp_name);
   15556           0 :                         return -1;
   15557             :                 }
   15558             :         }
   15559           0 :         return 0;
   15560             : }
   15561             : 
   15562           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_irpstacksize(PyObject *obj, void *closure)
   15563             : {
   15564           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15565           0 :         PyObject *py_irpstacksize;
   15566           0 :         py_irpstacksize = PyLong_FromUnsignedLongLong((uint32_t)(object->irpstacksize));
   15567           0 :         return py_irpstacksize;
   15568             : }
   15569             : 
   15570           0 : static int py_srvsvc_NetSrvInfo502_set_irpstacksize(PyObject *py_obj, PyObject *value, void *closure)
   15571             : {
   15572           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15573           0 :         if (value == NULL) {
   15574           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->irpstacksize");
   15575           0 :                 return -1;
   15576             :         }
   15577             :         {
   15578           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->irpstacksize));
   15579           0 :                 if (PyLong_Check(value)) {
   15580           0 :                         unsigned long long test_var;
   15581           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15582           0 :                         if (PyErr_Occurred() != NULL) {
   15583           0 :                                 return -1;
   15584             :                         }
   15585           0 :                         if (test_var > uint_max) {
   15586           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15587             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15588           0 :                                 return -1;
   15589             :                         }
   15590           0 :                         object->irpstacksize = test_var;
   15591             :                 } else {
   15592           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15593             :                           PyLong_Type.tp_name);
   15594           0 :                         return -1;
   15595             :                 }
   15596             :         }
   15597           0 :         return 0;
   15598             : }
   15599             : 
   15600           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_maxrawbuflen(PyObject *obj, void *closure)
   15601             : {
   15602           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15603           0 :         PyObject *py_maxrawbuflen;
   15604           0 :         py_maxrawbuflen = PyLong_FromUnsignedLongLong((uint32_t)(object->maxrawbuflen));
   15605           0 :         return py_maxrawbuflen;
   15606             : }
   15607             : 
   15608           0 : static int py_srvsvc_NetSrvInfo502_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
   15609             : {
   15610           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15611           0 :         if (value == NULL) {
   15612           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxrawbuflen");
   15613           0 :                 return -1;
   15614             :         }
   15615             :         {
   15616           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
   15617           0 :                 if (PyLong_Check(value)) {
   15618           0 :                         unsigned long long test_var;
   15619           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15620           0 :                         if (PyErr_Occurred() != NULL) {
   15621           0 :                                 return -1;
   15622             :                         }
   15623           0 :                         if (test_var > uint_max) {
   15624           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15625             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15626           0 :                                 return -1;
   15627             :                         }
   15628           0 :                         object->maxrawbuflen = test_var;
   15629             :                 } else {
   15630           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15631             :                           PyLong_Type.tp_name);
   15632           0 :                         return -1;
   15633             :                 }
   15634             :         }
   15635           0 :         return 0;
   15636             : }
   15637             : 
   15638           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_sessusers(PyObject *obj, void *closure)
   15639             : {
   15640           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15641           0 :         PyObject *py_sessusers;
   15642           0 :         py_sessusers = PyLong_FromUnsignedLongLong((uint32_t)(object->sessusers));
   15643           0 :         return py_sessusers;
   15644             : }
   15645             : 
   15646           0 : static int py_srvsvc_NetSrvInfo502_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
   15647             : {
   15648           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15649           0 :         if (value == NULL) {
   15650           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessusers");
   15651           0 :                 return -1;
   15652             :         }
   15653             :         {
   15654           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
   15655           0 :                 if (PyLong_Check(value)) {
   15656           0 :                         unsigned long long test_var;
   15657           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15658           0 :                         if (PyErr_Occurred() != NULL) {
   15659           0 :                                 return -1;
   15660             :                         }
   15661           0 :                         if (test_var > uint_max) {
   15662           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15663             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15664           0 :                                 return -1;
   15665             :                         }
   15666           0 :                         object->sessusers = test_var;
   15667             :                 } else {
   15668           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15669             :                           PyLong_Type.tp_name);
   15670           0 :                         return -1;
   15671             :                 }
   15672             :         }
   15673           0 :         return 0;
   15674             : }
   15675             : 
   15676           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_sessconns(PyObject *obj, void *closure)
   15677             : {
   15678           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15679           0 :         PyObject *py_sessconns;
   15680           0 :         py_sessconns = PyLong_FromUnsignedLongLong((uint32_t)(object->sessconns));
   15681           0 :         return py_sessconns;
   15682             : }
   15683             : 
   15684           0 : static int py_srvsvc_NetSrvInfo502_set_sessconns(PyObject *py_obj, PyObject *value, void *closure)
   15685             : {
   15686           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15687           0 :         if (value == NULL) {
   15688           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessconns");
   15689           0 :                 return -1;
   15690             :         }
   15691             :         {
   15692           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessconns));
   15693           0 :                 if (PyLong_Check(value)) {
   15694           0 :                         unsigned long long test_var;
   15695           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15696           0 :                         if (PyErr_Occurred() != NULL) {
   15697           0 :                                 return -1;
   15698             :                         }
   15699           0 :                         if (test_var > uint_max) {
   15700           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15701             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15702           0 :                                 return -1;
   15703             :                         }
   15704           0 :                         object->sessconns = test_var;
   15705             :                 } else {
   15706           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15707             :                           PyLong_Type.tp_name);
   15708           0 :                         return -1;
   15709             :                 }
   15710             :         }
   15711           0 :         return 0;
   15712             : }
   15713             : 
   15714           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_maxpagedmemoryusage(PyObject *obj, void *closure)
   15715             : {
   15716           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15717           0 :         PyObject *py_maxpagedmemoryusage;
   15718           0 :         py_maxpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)(object->maxpagedmemoryusage));
   15719           0 :         return py_maxpagedmemoryusage;
   15720             : }
   15721             : 
   15722           0 : static int py_srvsvc_NetSrvInfo502_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   15723             : {
   15724           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15725           0 :         if (value == NULL) {
   15726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxpagedmemoryusage");
   15727           0 :                 return -1;
   15728             :         }
   15729             :         {
   15730           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
   15731           0 :                 if (PyLong_Check(value)) {
   15732           0 :                         unsigned long long test_var;
   15733           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15734           0 :                         if (PyErr_Occurred() != NULL) {
   15735           0 :                                 return -1;
   15736             :                         }
   15737           0 :                         if (test_var > uint_max) {
   15738           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15739             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15740           0 :                                 return -1;
   15741             :                         }
   15742           0 :                         object->maxpagedmemoryusage = test_var;
   15743             :                 } else {
   15744           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15745             :                           PyLong_Type.tp_name);
   15746           0 :                         return -1;
   15747             :                 }
   15748             :         }
   15749           0 :         return 0;
   15750             : }
   15751             : 
   15752           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_maxnonpagedmemoryusage(PyObject *obj, void *closure)
   15753             : {
   15754           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15755           0 :         PyObject *py_maxnonpagedmemoryusage;
   15756           0 :         py_maxnonpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)(object->maxnonpagedmemoryusage));
   15757           0 :         return py_maxnonpagedmemoryusage;
   15758             : }
   15759             : 
   15760           0 : static int py_srvsvc_NetSrvInfo502_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   15761             : {
   15762           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15763           0 :         if (value == NULL) {
   15764           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxnonpagedmemoryusage");
   15765           0 :                 return -1;
   15766             :         }
   15767             :         {
   15768           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
   15769           0 :                 if (PyLong_Check(value)) {
   15770           0 :                         unsigned long long test_var;
   15771           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15772           0 :                         if (PyErr_Occurred() != NULL) {
   15773           0 :                                 return -1;
   15774             :                         }
   15775           0 :                         if (test_var > uint_max) {
   15776           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15777             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15778           0 :                                 return -1;
   15779             :                         }
   15780           0 :                         object->maxnonpagedmemoryusage = test_var;
   15781             :                 } else {
   15782           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15783             :                           PyLong_Type.tp_name);
   15784           0 :                         return -1;
   15785             :                 }
   15786             :         }
   15787           0 :         return 0;
   15788             : }
   15789             : 
   15790           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_enablesoftcompat(PyObject *obj, void *closure)
   15791             : {
   15792           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15793           0 :         PyObject *py_enablesoftcompat;
   15794           0 :         py_enablesoftcompat = PyLong_FromUnsignedLongLong((uint32_t)(object->enablesoftcompat));
   15795           0 :         return py_enablesoftcompat;
   15796             : }
   15797             : 
   15798           0 : static int py_srvsvc_NetSrvInfo502_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
   15799             : {
   15800           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15801           0 :         if (value == NULL) {
   15802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enablesoftcompat");
   15803           0 :                 return -1;
   15804             :         }
   15805             :         {
   15806           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
   15807           0 :                 if (PyLong_Check(value)) {
   15808           0 :                         unsigned long long test_var;
   15809           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15810           0 :                         if (PyErr_Occurred() != NULL) {
   15811           0 :                                 return -1;
   15812             :                         }
   15813           0 :                         if (test_var > uint_max) {
   15814           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15815             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15816           0 :                                 return -1;
   15817             :                         }
   15818           0 :                         object->enablesoftcompat = test_var;
   15819             :                 } else {
   15820           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15821             :                           PyLong_Type.tp_name);
   15822           0 :                         return -1;
   15823             :                 }
   15824             :         }
   15825           0 :         return 0;
   15826             : }
   15827             : 
   15828           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_enableforcedlogoff(PyObject *obj, void *closure)
   15829             : {
   15830           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15831           0 :         PyObject *py_enableforcedlogoff;
   15832           0 :         py_enableforcedlogoff = PyLong_FromUnsignedLongLong((uint32_t)(object->enableforcedlogoff));
   15833           0 :         return py_enableforcedlogoff;
   15834             : }
   15835             : 
   15836           0 : static int py_srvsvc_NetSrvInfo502_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
   15837             : {
   15838           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15839           0 :         if (value == NULL) {
   15840           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableforcedlogoff");
   15841           0 :                 return -1;
   15842             :         }
   15843             :         {
   15844           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
   15845           0 :                 if (PyLong_Check(value)) {
   15846           0 :                         unsigned long long test_var;
   15847           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15848           0 :                         if (PyErr_Occurred() != NULL) {
   15849           0 :                                 return -1;
   15850             :                         }
   15851           0 :                         if (test_var > uint_max) {
   15852           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15853             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15854           0 :                                 return -1;
   15855             :                         }
   15856           0 :                         object->enableforcedlogoff = test_var;
   15857             :                 } else {
   15858           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15859             :                           PyLong_Type.tp_name);
   15860           0 :                         return -1;
   15861             :                 }
   15862             :         }
   15863           0 :         return 0;
   15864             : }
   15865             : 
   15866           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_timesource(PyObject *obj, void *closure)
   15867             : {
   15868           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15869           0 :         PyObject *py_timesource;
   15870           0 :         py_timesource = PyLong_FromUnsignedLongLong((uint32_t)(object->timesource));
   15871           0 :         return py_timesource;
   15872             : }
   15873             : 
   15874           0 : static int py_srvsvc_NetSrvInfo502_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
   15875             : {
   15876           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15877           0 :         if (value == NULL) {
   15878           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timesource");
   15879           0 :                 return -1;
   15880             :         }
   15881             :         {
   15882           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
   15883           0 :                 if (PyLong_Check(value)) {
   15884           0 :                         unsigned long long test_var;
   15885           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15886           0 :                         if (PyErr_Occurred() != NULL) {
   15887           0 :                                 return -1;
   15888             :                         }
   15889           0 :                         if (test_var > uint_max) {
   15890           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15891             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15892           0 :                                 return -1;
   15893             :                         }
   15894           0 :                         object->timesource = test_var;
   15895             :                 } else {
   15896           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15897             :                           PyLong_Type.tp_name);
   15898           0 :                         return -1;
   15899             :                 }
   15900             :         }
   15901           0 :         return 0;
   15902             : }
   15903             : 
   15904           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_acceptdownlevelapis(PyObject *obj, void *closure)
   15905             : {
   15906           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15907           0 :         PyObject *py_acceptdownlevelapis;
   15908           0 :         py_acceptdownlevelapis = PyLong_FromUnsignedLongLong((uint32_t)(object->acceptdownlevelapis));
   15909           0 :         return py_acceptdownlevelapis;
   15910             : }
   15911             : 
   15912           0 : static int py_srvsvc_NetSrvInfo502_set_acceptdownlevelapis(PyObject *py_obj, PyObject *value, void *closure)
   15913             : {
   15914           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15915           0 :         if (value == NULL) {
   15916           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->acceptdownlevelapis");
   15917           0 :                 return -1;
   15918             :         }
   15919             :         {
   15920           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acceptdownlevelapis));
   15921           0 :                 if (PyLong_Check(value)) {
   15922           0 :                         unsigned long long test_var;
   15923           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15924           0 :                         if (PyErr_Occurred() != NULL) {
   15925           0 :                                 return -1;
   15926             :                         }
   15927           0 :                         if (test_var > uint_max) {
   15928           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15929             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15930           0 :                                 return -1;
   15931             :                         }
   15932           0 :                         object->acceptdownlevelapis = test_var;
   15933             :                 } else {
   15934           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15935             :                           PyLong_Type.tp_name);
   15936           0 :                         return -1;
   15937             :                 }
   15938             :         }
   15939           0 :         return 0;
   15940             : }
   15941             : 
   15942           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_lmannounce(PyObject *obj, void *closure)
   15943             : {
   15944           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(obj);
   15945           0 :         PyObject *py_lmannounce;
   15946           0 :         py_lmannounce = PyLong_FromUnsignedLongLong((uint32_t)(object->lmannounce));
   15947           0 :         return py_lmannounce;
   15948             : }
   15949             : 
   15950           0 : static int py_srvsvc_NetSrvInfo502_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
   15951             : {
   15952           0 :         struct srvsvc_NetSrvInfo502 *object = pytalloc_get_ptr(py_obj);
   15953           0 :         if (value == NULL) {
   15954           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lmannounce");
   15955           0 :                 return -1;
   15956             :         }
   15957             :         {
   15958           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
   15959           0 :                 if (PyLong_Check(value)) {
   15960           0 :                         unsigned long long test_var;
   15961           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15962           0 :                         if (PyErr_Occurred() != NULL) {
   15963           0 :                                 return -1;
   15964             :                         }
   15965           0 :                         if (test_var > uint_max) {
   15966           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15967             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15968           0 :                                 return -1;
   15969             :                         }
   15970           0 :                         object->lmannounce = test_var;
   15971             :                 } else {
   15972           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15973             :                           PyLong_Type.tp_name);
   15974           0 :                         return -1;
   15975             :                 }
   15976             :         }
   15977           0 :         return 0;
   15978             : }
   15979             : 
   15980             : static PyGetSetDef py_srvsvc_NetSrvInfo502_getsetters[] = {
   15981             :         {
   15982             :                 .name = discard_const_p(char, "sessopen"),
   15983             :                 .get = py_srvsvc_NetSrvInfo502_get_sessopen,
   15984             :                 .set = py_srvsvc_NetSrvInfo502_set_sessopen,
   15985             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15986             :         },
   15987             :         {
   15988             :                 .name = discard_const_p(char, "sesssvc"),
   15989             :                 .get = py_srvsvc_NetSrvInfo502_get_sesssvc,
   15990             :                 .set = py_srvsvc_NetSrvInfo502_set_sesssvc,
   15991             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15992             :         },
   15993             :         {
   15994             :                 .name = discard_const_p(char, "opensearch"),
   15995             :                 .get = py_srvsvc_NetSrvInfo502_get_opensearch,
   15996             :                 .set = py_srvsvc_NetSrvInfo502_set_opensearch,
   15997             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15998             :         },
   15999             :         {
   16000             :                 .name = discard_const_p(char, "sizereqbufs"),
   16001             :                 .get = py_srvsvc_NetSrvInfo502_get_sizereqbufs,
   16002             :                 .set = py_srvsvc_NetSrvInfo502_set_sizereqbufs,
   16003             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16004             :         },
   16005             :         {
   16006             :                 .name = discard_const_p(char, "initworkitems"),
   16007             :                 .get = py_srvsvc_NetSrvInfo502_get_initworkitems,
   16008             :                 .set = py_srvsvc_NetSrvInfo502_set_initworkitems,
   16009             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16010             :         },
   16011             :         {
   16012             :                 .name = discard_const_p(char, "maxworkitems"),
   16013             :                 .get = py_srvsvc_NetSrvInfo502_get_maxworkitems,
   16014             :                 .set = py_srvsvc_NetSrvInfo502_set_maxworkitems,
   16015             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16016             :         },
   16017             :         {
   16018             :                 .name = discard_const_p(char, "rawworkitems"),
   16019             :                 .get = py_srvsvc_NetSrvInfo502_get_rawworkitems,
   16020             :                 .set = py_srvsvc_NetSrvInfo502_set_rawworkitems,
   16021             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16022             :         },
   16023             :         {
   16024             :                 .name = discard_const_p(char, "irpstacksize"),
   16025             :                 .get = py_srvsvc_NetSrvInfo502_get_irpstacksize,
   16026             :                 .set = py_srvsvc_NetSrvInfo502_set_irpstacksize,
   16027             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16028             :         },
   16029             :         {
   16030             :                 .name = discard_const_p(char, "maxrawbuflen"),
   16031             :                 .get = py_srvsvc_NetSrvInfo502_get_maxrawbuflen,
   16032             :                 .set = py_srvsvc_NetSrvInfo502_set_maxrawbuflen,
   16033             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16034             :         },
   16035             :         {
   16036             :                 .name = discard_const_p(char, "sessusers"),
   16037             :                 .get = py_srvsvc_NetSrvInfo502_get_sessusers,
   16038             :                 .set = py_srvsvc_NetSrvInfo502_set_sessusers,
   16039             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16040             :         },
   16041             :         {
   16042             :                 .name = discard_const_p(char, "sessconns"),
   16043             :                 .get = py_srvsvc_NetSrvInfo502_get_sessconns,
   16044             :                 .set = py_srvsvc_NetSrvInfo502_set_sessconns,
   16045             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16046             :         },
   16047             :         {
   16048             :                 .name = discard_const_p(char, "maxpagedmemoryusage"),
   16049             :                 .get = py_srvsvc_NetSrvInfo502_get_maxpagedmemoryusage,
   16050             :                 .set = py_srvsvc_NetSrvInfo502_set_maxpagedmemoryusage,
   16051             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16052             :         },
   16053             :         {
   16054             :                 .name = discard_const_p(char, "maxnonpagedmemoryusage"),
   16055             :                 .get = py_srvsvc_NetSrvInfo502_get_maxnonpagedmemoryusage,
   16056             :                 .set = py_srvsvc_NetSrvInfo502_set_maxnonpagedmemoryusage,
   16057             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16058             :         },
   16059             :         {
   16060             :                 .name = discard_const_p(char, "enablesoftcompat"),
   16061             :                 .get = py_srvsvc_NetSrvInfo502_get_enablesoftcompat,
   16062             :                 .set = py_srvsvc_NetSrvInfo502_set_enablesoftcompat,
   16063             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16064             :         },
   16065             :         {
   16066             :                 .name = discard_const_p(char, "enableforcedlogoff"),
   16067             :                 .get = py_srvsvc_NetSrvInfo502_get_enableforcedlogoff,
   16068             :                 .set = py_srvsvc_NetSrvInfo502_set_enableforcedlogoff,
   16069             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16070             :         },
   16071             :         {
   16072             :                 .name = discard_const_p(char, "timesource"),
   16073             :                 .get = py_srvsvc_NetSrvInfo502_get_timesource,
   16074             :                 .set = py_srvsvc_NetSrvInfo502_set_timesource,
   16075             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16076             :         },
   16077             :         {
   16078             :                 .name = discard_const_p(char, "acceptdownlevelapis"),
   16079             :                 .get = py_srvsvc_NetSrvInfo502_get_acceptdownlevelapis,
   16080             :                 .set = py_srvsvc_NetSrvInfo502_set_acceptdownlevelapis,
   16081             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16082             :         },
   16083             :         {
   16084             :                 .name = discard_const_p(char, "lmannounce"),
   16085             :                 .get = py_srvsvc_NetSrvInfo502_get_lmannounce,
   16086             :                 .set = py_srvsvc_NetSrvInfo502_set_lmannounce,
   16087             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16088             :         },
   16089             :         { .name = NULL }
   16090             : };
   16091             : 
   16092           0 : static PyObject *py_srvsvc_NetSrvInfo502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16093             : {
   16094           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo502, type);
   16095             : }
   16096             : 
   16097             : 
   16098             : static PyTypeObject srvsvc_NetSrvInfo502_Type = {
   16099             :         PyVarObject_HEAD_INIT(NULL, 0)
   16100             :         .tp_name = "srvsvc.NetSrvInfo502",
   16101             :         .tp_getset = py_srvsvc_NetSrvInfo502_getsetters,
   16102             :         .tp_methods = NULL,
   16103             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16104             :         .tp_new = py_srvsvc_NetSrvInfo502_new,
   16105             : };
   16106             : 
   16107             : 
   16108           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_sessopen(PyObject *obj, void *closure)
   16109             : {
   16110           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16111           0 :         PyObject *py_sessopen;
   16112           0 :         py_sessopen = PyLong_FromUnsignedLongLong((uint32_t)(object->sessopen));
   16113           0 :         return py_sessopen;
   16114             : }
   16115             : 
   16116           0 : static int py_srvsvc_NetSrvInfo503_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
   16117             : {
   16118           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16119           0 :         if (value == NULL) {
   16120           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessopen");
   16121           0 :                 return -1;
   16122             :         }
   16123             :         {
   16124           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
   16125           0 :                 if (PyLong_Check(value)) {
   16126           0 :                         unsigned long long test_var;
   16127           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16128           0 :                         if (PyErr_Occurred() != NULL) {
   16129           0 :                                 return -1;
   16130             :                         }
   16131           0 :                         if (test_var > uint_max) {
   16132           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16133             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16134           0 :                                 return -1;
   16135             :                         }
   16136           0 :                         object->sessopen = test_var;
   16137             :                 } else {
   16138           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16139             :                           PyLong_Type.tp_name);
   16140           0 :                         return -1;
   16141             :                 }
   16142             :         }
   16143           0 :         return 0;
   16144             : }
   16145             : 
   16146           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_sesssvc(PyObject *obj, void *closure)
   16147             : {
   16148           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16149           0 :         PyObject *py_sesssvc;
   16150           0 :         py_sesssvc = PyLong_FromUnsignedLongLong((uint32_t)(object->sesssvc));
   16151           0 :         return py_sesssvc;
   16152             : }
   16153             : 
   16154           0 : static int py_srvsvc_NetSrvInfo503_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
   16155             : {
   16156           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16157           0 :         if (value == NULL) {
   16158           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sesssvc");
   16159           0 :                 return -1;
   16160             :         }
   16161             :         {
   16162           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
   16163           0 :                 if (PyLong_Check(value)) {
   16164           0 :                         unsigned long long test_var;
   16165           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16166           0 :                         if (PyErr_Occurred() != NULL) {
   16167           0 :                                 return -1;
   16168             :                         }
   16169           0 :                         if (test_var > uint_max) {
   16170           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16171             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16172           0 :                                 return -1;
   16173             :                         }
   16174           0 :                         object->sesssvc = test_var;
   16175             :                 } else {
   16176           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16177             :                           PyLong_Type.tp_name);
   16178           0 :                         return -1;
   16179             :                 }
   16180             :         }
   16181           0 :         return 0;
   16182             : }
   16183             : 
   16184           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_opensearch(PyObject *obj, void *closure)
   16185             : {
   16186           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16187           0 :         PyObject *py_opensearch;
   16188           0 :         py_opensearch = PyLong_FromUnsignedLongLong((uint32_t)(object->opensearch));
   16189           0 :         return py_opensearch;
   16190             : }
   16191             : 
   16192           0 : static int py_srvsvc_NetSrvInfo503_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
   16193             : {
   16194           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16195           0 :         if (value == NULL) {
   16196           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->opensearch");
   16197           0 :                 return -1;
   16198             :         }
   16199             :         {
   16200           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
   16201           0 :                 if (PyLong_Check(value)) {
   16202           0 :                         unsigned long long test_var;
   16203           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16204           0 :                         if (PyErr_Occurred() != NULL) {
   16205           0 :                                 return -1;
   16206             :                         }
   16207           0 :                         if (test_var > uint_max) {
   16208           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16209             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16210           0 :                                 return -1;
   16211             :                         }
   16212           0 :                         object->opensearch = test_var;
   16213             :                 } else {
   16214           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16215             :                           PyLong_Type.tp_name);
   16216           0 :                         return -1;
   16217             :                 }
   16218             :         }
   16219           0 :         return 0;
   16220             : }
   16221             : 
   16222           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_sizereqbufs(PyObject *obj, void *closure)
   16223             : {
   16224           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16225           0 :         PyObject *py_sizereqbufs;
   16226           0 :         py_sizereqbufs = PyLong_FromUnsignedLongLong((uint32_t)(object->sizereqbufs));
   16227           0 :         return py_sizereqbufs;
   16228             : }
   16229             : 
   16230           0 : static int py_srvsvc_NetSrvInfo503_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
   16231             : {
   16232           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16233           0 :         if (value == NULL) {
   16234           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sizereqbufs");
   16235           0 :                 return -1;
   16236             :         }
   16237             :         {
   16238           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
   16239           0 :                 if (PyLong_Check(value)) {
   16240           0 :                         unsigned long long test_var;
   16241           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16242           0 :                         if (PyErr_Occurred() != NULL) {
   16243           0 :                                 return -1;
   16244             :                         }
   16245           0 :                         if (test_var > uint_max) {
   16246           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16247             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16248           0 :                                 return -1;
   16249             :                         }
   16250           0 :                         object->sizereqbufs = test_var;
   16251             :                 } else {
   16252           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16253             :                           PyLong_Type.tp_name);
   16254           0 :                         return -1;
   16255             :                 }
   16256             :         }
   16257           0 :         return 0;
   16258             : }
   16259             : 
   16260           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_initworkitems(PyObject *obj, void *closure)
   16261             : {
   16262           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16263           0 :         PyObject *py_initworkitems;
   16264           0 :         py_initworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->initworkitems));
   16265           0 :         return py_initworkitems;
   16266             : }
   16267             : 
   16268           0 : static int py_srvsvc_NetSrvInfo503_set_initworkitems(PyObject *py_obj, PyObject *value, void *closure)
   16269             : {
   16270           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16271           0 :         if (value == NULL) {
   16272           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->initworkitems");
   16273           0 :                 return -1;
   16274             :         }
   16275             :         {
   16276           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initworkitems));
   16277           0 :                 if (PyLong_Check(value)) {
   16278           0 :                         unsigned long long test_var;
   16279           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16280           0 :                         if (PyErr_Occurred() != NULL) {
   16281           0 :                                 return -1;
   16282             :                         }
   16283           0 :                         if (test_var > uint_max) {
   16284           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16285             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16286           0 :                                 return -1;
   16287             :                         }
   16288           0 :                         object->initworkitems = test_var;
   16289             :                 } else {
   16290           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16291             :                           PyLong_Type.tp_name);
   16292           0 :                         return -1;
   16293             :                 }
   16294             :         }
   16295           0 :         return 0;
   16296             : }
   16297             : 
   16298           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxworkitems(PyObject *obj, void *closure)
   16299             : {
   16300           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16301           0 :         PyObject *py_maxworkitems;
   16302           0 :         py_maxworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->maxworkitems));
   16303           0 :         return py_maxworkitems;
   16304             : }
   16305             : 
   16306           0 : static int py_srvsvc_NetSrvInfo503_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
   16307             : {
   16308           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16309           0 :         if (value == NULL) {
   16310           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxworkitems");
   16311           0 :                 return -1;
   16312             :         }
   16313             :         {
   16314           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
   16315           0 :                 if (PyLong_Check(value)) {
   16316           0 :                         unsigned long long test_var;
   16317           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16318           0 :                         if (PyErr_Occurred() != NULL) {
   16319           0 :                                 return -1;
   16320             :                         }
   16321           0 :                         if (test_var > uint_max) {
   16322           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16323             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16324           0 :                                 return -1;
   16325             :                         }
   16326           0 :                         object->maxworkitems = test_var;
   16327             :                 } else {
   16328           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16329             :                           PyLong_Type.tp_name);
   16330           0 :                         return -1;
   16331             :                 }
   16332             :         }
   16333           0 :         return 0;
   16334             : }
   16335             : 
   16336           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_rawworkitems(PyObject *obj, void *closure)
   16337             : {
   16338           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16339           0 :         PyObject *py_rawworkitems;
   16340           0 :         py_rawworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->rawworkitems));
   16341           0 :         return py_rawworkitems;
   16342             : }
   16343             : 
   16344           0 : static int py_srvsvc_NetSrvInfo503_set_rawworkitems(PyObject *py_obj, PyObject *value, void *closure)
   16345             : {
   16346           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16347           0 :         if (value == NULL) {
   16348           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rawworkitems");
   16349           0 :                 return -1;
   16350             :         }
   16351             :         {
   16352           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rawworkitems));
   16353           0 :                 if (PyLong_Check(value)) {
   16354           0 :                         unsigned long long test_var;
   16355           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16356           0 :                         if (PyErr_Occurred() != NULL) {
   16357           0 :                                 return -1;
   16358             :                         }
   16359           0 :                         if (test_var > uint_max) {
   16360           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16361             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16362           0 :                                 return -1;
   16363             :                         }
   16364           0 :                         object->rawworkitems = test_var;
   16365             :                 } else {
   16366           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16367             :                           PyLong_Type.tp_name);
   16368           0 :                         return -1;
   16369             :                 }
   16370             :         }
   16371           0 :         return 0;
   16372             : }
   16373             : 
   16374           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_irpstacksize(PyObject *obj, void *closure)
   16375             : {
   16376           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16377           0 :         PyObject *py_irpstacksize;
   16378           0 :         py_irpstacksize = PyLong_FromUnsignedLongLong((uint32_t)(object->irpstacksize));
   16379           0 :         return py_irpstacksize;
   16380             : }
   16381             : 
   16382           0 : static int py_srvsvc_NetSrvInfo503_set_irpstacksize(PyObject *py_obj, PyObject *value, void *closure)
   16383             : {
   16384           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16385           0 :         if (value == NULL) {
   16386           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->irpstacksize");
   16387           0 :                 return -1;
   16388             :         }
   16389             :         {
   16390           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->irpstacksize));
   16391           0 :                 if (PyLong_Check(value)) {
   16392           0 :                         unsigned long long test_var;
   16393           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16394           0 :                         if (PyErr_Occurred() != NULL) {
   16395           0 :                                 return -1;
   16396             :                         }
   16397           0 :                         if (test_var > uint_max) {
   16398           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16399             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16400           0 :                                 return -1;
   16401             :                         }
   16402           0 :                         object->irpstacksize = test_var;
   16403             :                 } else {
   16404           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16405             :                           PyLong_Type.tp_name);
   16406           0 :                         return -1;
   16407             :                 }
   16408             :         }
   16409           0 :         return 0;
   16410             : }
   16411             : 
   16412           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxrawbuflen(PyObject *obj, void *closure)
   16413             : {
   16414           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16415           0 :         PyObject *py_maxrawbuflen;
   16416           0 :         py_maxrawbuflen = PyLong_FromUnsignedLongLong((uint32_t)(object->maxrawbuflen));
   16417           0 :         return py_maxrawbuflen;
   16418             : }
   16419             : 
   16420           0 : static int py_srvsvc_NetSrvInfo503_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
   16421             : {
   16422           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16423           0 :         if (value == NULL) {
   16424           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxrawbuflen");
   16425           0 :                 return -1;
   16426             :         }
   16427             :         {
   16428           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
   16429           0 :                 if (PyLong_Check(value)) {
   16430           0 :                         unsigned long long test_var;
   16431           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16432           0 :                         if (PyErr_Occurred() != NULL) {
   16433           0 :                                 return -1;
   16434             :                         }
   16435           0 :                         if (test_var > uint_max) {
   16436           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16437             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16438           0 :                                 return -1;
   16439             :                         }
   16440           0 :                         object->maxrawbuflen = test_var;
   16441             :                 } else {
   16442           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16443             :                           PyLong_Type.tp_name);
   16444           0 :                         return -1;
   16445             :                 }
   16446             :         }
   16447           0 :         return 0;
   16448             : }
   16449             : 
   16450           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_sessusers(PyObject *obj, void *closure)
   16451             : {
   16452           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16453           0 :         PyObject *py_sessusers;
   16454           0 :         py_sessusers = PyLong_FromUnsignedLongLong((uint32_t)(object->sessusers));
   16455           0 :         return py_sessusers;
   16456             : }
   16457             : 
   16458           0 : static int py_srvsvc_NetSrvInfo503_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
   16459             : {
   16460           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16461           0 :         if (value == NULL) {
   16462           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessusers");
   16463           0 :                 return -1;
   16464             :         }
   16465             :         {
   16466           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
   16467           0 :                 if (PyLong_Check(value)) {
   16468           0 :                         unsigned long long test_var;
   16469           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16470           0 :                         if (PyErr_Occurred() != NULL) {
   16471           0 :                                 return -1;
   16472             :                         }
   16473           0 :                         if (test_var > uint_max) {
   16474           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16475             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16476           0 :                                 return -1;
   16477             :                         }
   16478           0 :                         object->sessusers = test_var;
   16479             :                 } else {
   16480           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16481             :                           PyLong_Type.tp_name);
   16482           0 :                         return -1;
   16483             :                 }
   16484             :         }
   16485           0 :         return 0;
   16486             : }
   16487             : 
   16488           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_sessconns(PyObject *obj, void *closure)
   16489             : {
   16490           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16491           0 :         PyObject *py_sessconns;
   16492           0 :         py_sessconns = PyLong_FromUnsignedLongLong((uint32_t)(object->sessconns));
   16493           0 :         return py_sessconns;
   16494             : }
   16495             : 
   16496           0 : static int py_srvsvc_NetSrvInfo503_set_sessconns(PyObject *py_obj, PyObject *value, void *closure)
   16497             : {
   16498           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16499           0 :         if (value == NULL) {
   16500           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessconns");
   16501           0 :                 return -1;
   16502             :         }
   16503             :         {
   16504           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessconns));
   16505           0 :                 if (PyLong_Check(value)) {
   16506           0 :                         unsigned long long test_var;
   16507           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16508           0 :                         if (PyErr_Occurred() != NULL) {
   16509           0 :                                 return -1;
   16510             :                         }
   16511           0 :                         if (test_var > uint_max) {
   16512           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16513             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16514           0 :                                 return -1;
   16515             :                         }
   16516           0 :                         object->sessconns = test_var;
   16517             :                 } else {
   16518           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16519             :                           PyLong_Type.tp_name);
   16520           0 :                         return -1;
   16521             :                 }
   16522             :         }
   16523           0 :         return 0;
   16524             : }
   16525             : 
   16526           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxpagedmemoryusage(PyObject *obj, void *closure)
   16527             : {
   16528           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16529           0 :         PyObject *py_maxpagedmemoryusage;
   16530           0 :         py_maxpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)(object->maxpagedmemoryusage));
   16531           0 :         return py_maxpagedmemoryusage;
   16532             : }
   16533             : 
   16534           0 : static int py_srvsvc_NetSrvInfo503_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   16535             : {
   16536           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16537           0 :         if (value == NULL) {
   16538           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxpagedmemoryusage");
   16539           0 :                 return -1;
   16540             :         }
   16541             :         {
   16542           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
   16543           0 :                 if (PyLong_Check(value)) {
   16544           0 :                         unsigned long long test_var;
   16545           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16546           0 :                         if (PyErr_Occurred() != NULL) {
   16547           0 :                                 return -1;
   16548             :                         }
   16549           0 :                         if (test_var > uint_max) {
   16550           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16551             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16552           0 :                                 return -1;
   16553             :                         }
   16554           0 :                         object->maxpagedmemoryusage = test_var;
   16555             :                 } else {
   16556           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16557             :                           PyLong_Type.tp_name);
   16558           0 :                         return -1;
   16559             :                 }
   16560             :         }
   16561           0 :         return 0;
   16562             : }
   16563             : 
   16564           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxnonpagedmemoryusage(PyObject *obj, void *closure)
   16565             : {
   16566           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16567           0 :         PyObject *py_maxnonpagedmemoryusage;
   16568           0 :         py_maxnonpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)(object->maxnonpagedmemoryusage));
   16569           0 :         return py_maxnonpagedmemoryusage;
   16570             : }
   16571             : 
   16572           0 : static int py_srvsvc_NetSrvInfo503_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   16573             : {
   16574           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16575           0 :         if (value == NULL) {
   16576           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxnonpagedmemoryusage");
   16577           0 :                 return -1;
   16578             :         }
   16579             :         {
   16580           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
   16581           0 :                 if (PyLong_Check(value)) {
   16582           0 :                         unsigned long long test_var;
   16583           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16584           0 :                         if (PyErr_Occurred() != NULL) {
   16585           0 :                                 return -1;
   16586             :                         }
   16587           0 :                         if (test_var > uint_max) {
   16588           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16589             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16590           0 :                                 return -1;
   16591             :                         }
   16592           0 :                         object->maxnonpagedmemoryusage = test_var;
   16593             :                 } else {
   16594           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16595             :                           PyLong_Type.tp_name);
   16596           0 :                         return -1;
   16597             :                 }
   16598             :         }
   16599           0 :         return 0;
   16600             : }
   16601             : 
   16602           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enablesoftcompat(PyObject *obj, void *closure)
   16603             : {
   16604           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16605           0 :         PyObject *py_enablesoftcompat;
   16606           0 :         py_enablesoftcompat = PyLong_FromUnsignedLongLong((uint32_t)(object->enablesoftcompat));
   16607           0 :         return py_enablesoftcompat;
   16608             : }
   16609             : 
   16610           0 : static int py_srvsvc_NetSrvInfo503_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
   16611             : {
   16612           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16613           0 :         if (value == NULL) {
   16614           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enablesoftcompat");
   16615           0 :                 return -1;
   16616             :         }
   16617             :         {
   16618           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
   16619           0 :                 if (PyLong_Check(value)) {
   16620           0 :                         unsigned long long test_var;
   16621           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16622           0 :                         if (PyErr_Occurred() != NULL) {
   16623           0 :                                 return -1;
   16624             :                         }
   16625           0 :                         if (test_var > uint_max) {
   16626           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16627             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16628           0 :                                 return -1;
   16629             :                         }
   16630           0 :                         object->enablesoftcompat = test_var;
   16631             :                 } else {
   16632           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16633             :                           PyLong_Type.tp_name);
   16634           0 :                         return -1;
   16635             :                 }
   16636             :         }
   16637           0 :         return 0;
   16638             : }
   16639             : 
   16640           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enableforcedlogoff(PyObject *obj, void *closure)
   16641             : {
   16642           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16643           0 :         PyObject *py_enableforcedlogoff;
   16644           0 :         py_enableforcedlogoff = PyLong_FromUnsignedLongLong((uint32_t)(object->enableforcedlogoff));
   16645           0 :         return py_enableforcedlogoff;
   16646             : }
   16647             : 
   16648           0 : static int py_srvsvc_NetSrvInfo503_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
   16649             : {
   16650           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16651           0 :         if (value == NULL) {
   16652           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableforcedlogoff");
   16653           0 :                 return -1;
   16654             :         }
   16655             :         {
   16656           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
   16657           0 :                 if (PyLong_Check(value)) {
   16658           0 :                         unsigned long long test_var;
   16659           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16660           0 :                         if (PyErr_Occurred() != NULL) {
   16661           0 :                                 return -1;
   16662             :                         }
   16663           0 :                         if (test_var > uint_max) {
   16664           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16665             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16666           0 :                                 return -1;
   16667             :                         }
   16668           0 :                         object->enableforcedlogoff = test_var;
   16669             :                 } else {
   16670           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16671             :                           PyLong_Type.tp_name);
   16672           0 :                         return -1;
   16673             :                 }
   16674             :         }
   16675           0 :         return 0;
   16676             : }
   16677             : 
   16678           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_timesource(PyObject *obj, void *closure)
   16679             : {
   16680           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16681           0 :         PyObject *py_timesource;
   16682           0 :         py_timesource = PyLong_FromUnsignedLongLong((uint32_t)(object->timesource));
   16683           0 :         return py_timesource;
   16684             : }
   16685             : 
   16686           0 : static int py_srvsvc_NetSrvInfo503_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
   16687             : {
   16688           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16689           0 :         if (value == NULL) {
   16690           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timesource");
   16691           0 :                 return -1;
   16692             :         }
   16693             :         {
   16694           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
   16695           0 :                 if (PyLong_Check(value)) {
   16696           0 :                         unsigned long long test_var;
   16697           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16698           0 :                         if (PyErr_Occurred() != NULL) {
   16699           0 :                                 return -1;
   16700             :                         }
   16701           0 :                         if (test_var > uint_max) {
   16702           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16703             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16704           0 :                                 return -1;
   16705             :                         }
   16706           0 :                         object->timesource = test_var;
   16707             :                 } else {
   16708           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16709             :                           PyLong_Type.tp_name);
   16710           0 :                         return -1;
   16711             :                 }
   16712             :         }
   16713           0 :         return 0;
   16714             : }
   16715             : 
   16716           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_acceptdownlevelapis(PyObject *obj, void *closure)
   16717             : {
   16718           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16719           0 :         PyObject *py_acceptdownlevelapis;
   16720           0 :         py_acceptdownlevelapis = PyLong_FromUnsignedLongLong((uint32_t)(object->acceptdownlevelapis));
   16721           0 :         return py_acceptdownlevelapis;
   16722             : }
   16723             : 
   16724           0 : static int py_srvsvc_NetSrvInfo503_set_acceptdownlevelapis(PyObject *py_obj, PyObject *value, void *closure)
   16725             : {
   16726           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16727           0 :         if (value == NULL) {
   16728           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->acceptdownlevelapis");
   16729           0 :                 return -1;
   16730             :         }
   16731             :         {
   16732           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acceptdownlevelapis));
   16733           0 :                 if (PyLong_Check(value)) {
   16734           0 :                         unsigned long long test_var;
   16735           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16736           0 :                         if (PyErr_Occurred() != NULL) {
   16737           0 :                                 return -1;
   16738             :                         }
   16739           0 :                         if (test_var > uint_max) {
   16740           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16741             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16742           0 :                                 return -1;
   16743             :                         }
   16744           0 :                         object->acceptdownlevelapis = test_var;
   16745             :                 } else {
   16746           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16747             :                           PyLong_Type.tp_name);
   16748           0 :                         return -1;
   16749             :                 }
   16750             :         }
   16751           0 :         return 0;
   16752             : }
   16753             : 
   16754           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_lmannounce(PyObject *obj, void *closure)
   16755             : {
   16756           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16757           0 :         PyObject *py_lmannounce;
   16758           0 :         py_lmannounce = PyLong_FromUnsignedLongLong((uint32_t)(object->lmannounce));
   16759           0 :         return py_lmannounce;
   16760             : }
   16761             : 
   16762           0 : static int py_srvsvc_NetSrvInfo503_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
   16763             : {
   16764           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16765           0 :         if (value == NULL) {
   16766           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lmannounce");
   16767           0 :                 return -1;
   16768             :         }
   16769             :         {
   16770           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
   16771           0 :                 if (PyLong_Check(value)) {
   16772           0 :                         unsigned long long test_var;
   16773           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16774           0 :                         if (PyErr_Occurred() != NULL) {
   16775           0 :                                 return -1;
   16776             :                         }
   16777           0 :                         if (test_var > uint_max) {
   16778           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16779             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16780           0 :                                 return -1;
   16781             :                         }
   16782           0 :                         object->lmannounce = test_var;
   16783             :                 } else {
   16784           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16785             :                           PyLong_Type.tp_name);
   16786           0 :                         return -1;
   16787             :                 }
   16788             :         }
   16789           0 :         return 0;
   16790             : }
   16791             : 
   16792           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_domain(PyObject *obj, void *closure)
   16793             : {
   16794           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16795           0 :         PyObject *py_domain;
   16796           0 :         if (object->domain == NULL) {
   16797           0 :                 Py_RETURN_NONE;
   16798             :         }
   16799           0 :         if (object->domain == NULL) {
   16800           0 :                 py_domain = Py_None;
   16801           0 :                 Py_INCREF(py_domain);
   16802             :         } else {
   16803           0 :                 if (object->domain == NULL) {
   16804           0 :                         py_domain = Py_None;
   16805           0 :                         Py_INCREF(py_domain);
   16806             :                 } else {
   16807           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
   16808             :                 }
   16809             :         }
   16810           0 :         return py_domain;
   16811             : }
   16812             : 
   16813           0 : static int py_srvsvc_NetSrvInfo503_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   16814             : {
   16815           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16816           0 :         if (value == NULL) {
   16817           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain");
   16818           0 :                 return -1;
   16819             :         }
   16820           0 :         if (value == Py_None) {
   16821           0 :                 object->domain = NULL;
   16822             :         } else {
   16823           0 :                 object->domain = NULL;
   16824             :                 {
   16825           0 :                         const char *test_str;
   16826           0 :                         const char *talloc_str;
   16827           0 :                         PyObject *unicode = NULL;
   16828           0 :                         if (PyUnicode_Check(value)) {
   16829           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   16830           0 :                                 if (unicode == NULL) {
   16831           0 :                                         return -1;
   16832             :                                 }
   16833           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   16834           0 :                         } else if (PyBytes_Check(value)) {
   16835           0 :                                 test_str = PyBytes_AS_STRING(value);
   16836             :                         } else {
   16837           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   16838           0 :                                 return -1;
   16839             :                         }
   16840           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   16841           0 :                         if (unicode != NULL) {
   16842           0 :                                 Py_DECREF(unicode);
   16843             :                         }
   16844           0 :                         if (talloc_str == NULL) {
   16845           0 :                                 PyErr_NoMemory();
   16846           0 :                                 return -1;
   16847             :                         }
   16848           0 :                         object->domain = talloc_str;
   16849             :                 }
   16850             :         }
   16851           0 :         return 0;
   16852             : }
   16853             : 
   16854           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxcopyreadlen(PyObject *obj, void *closure)
   16855             : {
   16856           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16857           0 :         PyObject *py_maxcopyreadlen;
   16858           0 :         py_maxcopyreadlen = PyLong_FromUnsignedLongLong((uint32_t)(object->maxcopyreadlen));
   16859           0 :         return py_maxcopyreadlen;
   16860             : }
   16861             : 
   16862           0 : static int py_srvsvc_NetSrvInfo503_set_maxcopyreadlen(PyObject *py_obj, PyObject *value, void *closure)
   16863             : {
   16864           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16865           0 :         if (value == NULL) {
   16866           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxcopyreadlen");
   16867           0 :                 return -1;
   16868             :         }
   16869             :         {
   16870           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopyreadlen));
   16871           0 :                 if (PyLong_Check(value)) {
   16872           0 :                         unsigned long long test_var;
   16873           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16874           0 :                         if (PyErr_Occurred() != NULL) {
   16875           0 :                                 return -1;
   16876             :                         }
   16877           0 :                         if (test_var > uint_max) {
   16878           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16879             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16880           0 :                                 return -1;
   16881             :                         }
   16882           0 :                         object->maxcopyreadlen = test_var;
   16883             :                 } else {
   16884           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16885             :                           PyLong_Type.tp_name);
   16886           0 :                         return -1;
   16887             :                 }
   16888             :         }
   16889           0 :         return 0;
   16890             : }
   16891             : 
   16892           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxcopywritelen(PyObject *obj, void *closure)
   16893             : {
   16894           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16895           0 :         PyObject *py_maxcopywritelen;
   16896           0 :         py_maxcopywritelen = PyLong_FromUnsignedLongLong((uint32_t)(object->maxcopywritelen));
   16897           0 :         return py_maxcopywritelen;
   16898             : }
   16899             : 
   16900           0 : static int py_srvsvc_NetSrvInfo503_set_maxcopywritelen(PyObject *py_obj, PyObject *value, void *closure)
   16901             : {
   16902           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16903           0 :         if (value == NULL) {
   16904           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxcopywritelen");
   16905           0 :                 return -1;
   16906             :         }
   16907             :         {
   16908           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopywritelen));
   16909           0 :                 if (PyLong_Check(value)) {
   16910           0 :                         unsigned long long test_var;
   16911           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16912           0 :                         if (PyErr_Occurred() != NULL) {
   16913           0 :                                 return -1;
   16914             :                         }
   16915           0 :                         if (test_var > uint_max) {
   16916           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16917             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16918           0 :                                 return -1;
   16919             :                         }
   16920           0 :                         object->maxcopywritelen = test_var;
   16921             :                 } else {
   16922           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16923             :                           PyLong_Type.tp_name);
   16924           0 :                         return -1;
   16925             :                 }
   16926             :         }
   16927           0 :         return 0;
   16928             : }
   16929             : 
   16930           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_minkeepsearch(PyObject *obj, void *closure)
   16931             : {
   16932           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16933           0 :         PyObject *py_minkeepsearch;
   16934           0 :         py_minkeepsearch = PyLong_FromUnsignedLongLong((uint32_t)(object->minkeepsearch));
   16935           0 :         return py_minkeepsearch;
   16936             : }
   16937             : 
   16938           0 : static int py_srvsvc_NetSrvInfo503_set_minkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
   16939             : {
   16940           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16941           0 :         if (value == NULL) {
   16942           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minkeepsearch");
   16943           0 :                 return -1;
   16944             :         }
   16945             :         {
   16946           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepsearch));
   16947           0 :                 if (PyLong_Check(value)) {
   16948           0 :                         unsigned long long test_var;
   16949           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16950           0 :                         if (PyErr_Occurred() != NULL) {
   16951           0 :                                 return -1;
   16952             :                         }
   16953           0 :                         if (test_var > uint_max) {
   16954           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16955             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16956           0 :                                 return -1;
   16957             :                         }
   16958           0 :                         object->minkeepsearch = test_var;
   16959             :                 } else {
   16960           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16961             :                           PyLong_Type.tp_name);
   16962           0 :                         return -1;
   16963             :                 }
   16964             :         }
   16965           0 :         return 0;
   16966             : }
   16967             : 
   16968           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxkeepsearch(PyObject *obj, void *closure)
   16969             : {
   16970           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   16971           0 :         PyObject *py_maxkeepsearch;
   16972           0 :         py_maxkeepsearch = PyLong_FromUnsignedLongLong((uint32_t)(object->maxkeepsearch));
   16973           0 :         return py_maxkeepsearch;
   16974             : }
   16975             : 
   16976           0 : static int py_srvsvc_NetSrvInfo503_set_maxkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
   16977             : {
   16978           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   16979           0 :         if (value == NULL) {
   16980           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxkeepsearch");
   16981           0 :                 return -1;
   16982             :         }
   16983             :         {
   16984           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepsearch));
   16985           0 :                 if (PyLong_Check(value)) {
   16986           0 :                         unsigned long long test_var;
   16987           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16988           0 :                         if (PyErr_Occurred() != NULL) {
   16989           0 :                                 return -1;
   16990             :                         }
   16991           0 :                         if (test_var > uint_max) {
   16992           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16993             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16994           0 :                                 return -1;
   16995             :                         }
   16996           0 :                         object->maxkeepsearch = test_var;
   16997             :                 } else {
   16998           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16999             :                           PyLong_Type.tp_name);
   17000           0 :                         return -1;
   17001             :                 }
   17002             :         }
   17003           0 :         return 0;
   17004             : }
   17005             : 
   17006           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_minkeepcomplsearch(PyObject *obj, void *closure)
   17007             : {
   17008           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17009           0 :         PyObject *py_minkeepcomplsearch;
   17010           0 :         py_minkeepcomplsearch = PyLong_FromUnsignedLongLong((uint32_t)(object->minkeepcomplsearch));
   17011           0 :         return py_minkeepcomplsearch;
   17012             : }
   17013             : 
   17014           0 : static int py_srvsvc_NetSrvInfo503_set_minkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
   17015             : {
   17016           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17017           0 :         if (value == NULL) {
   17018           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minkeepcomplsearch");
   17019           0 :                 return -1;
   17020             :         }
   17021             :         {
   17022           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepcomplsearch));
   17023           0 :                 if (PyLong_Check(value)) {
   17024           0 :                         unsigned long long test_var;
   17025           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17026           0 :                         if (PyErr_Occurred() != NULL) {
   17027           0 :                                 return -1;
   17028             :                         }
   17029           0 :                         if (test_var > uint_max) {
   17030           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17031             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17032           0 :                                 return -1;
   17033             :                         }
   17034           0 :                         object->minkeepcomplsearch = test_var;
   17035             :                 } else {
   17036           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17037             :                           PyLong_Type.tp_name);
   17038           0 :                         return -1;
   17039             :                 }
   17040             :         }
   17041           0 :         return 0;
   17042             : }
   17043             : 
   17044           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxkeepcomplsearch(PyObject *obj, void *closure)
   17045             : {
   17046           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17047           0 :         PyObject *py_maxkeepcomplsearch;
   17048           0 :         py_maxkeepcomplsearch = PyLong_FromUnsignedLongLong((uint32_t)(object->maxkeepcomplsearch));
   17049           0 :         return py_maxkeepcomplsearch;
   17050             : }
   17051             : 
   17052           0 : static int py_srvsvc_NetSrvInfo503_set_maxkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
   17053             : {
   17054           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17055           0 :         if (value == NULL) {
   17056           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxkeepcomplsearch");
   17057           0 :                 return -1;
   17058             :         }
   17059             :         {
   17060           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepcomplsearch));
   17061           0 :                 if (PyLong_Check(value)) {
   17062           0 :                         unsigned long long test_var;
   17063           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17064           0 :                         if (PyErr_Occurred() != NULL) {
   17065           0 :                                 return -1;
   17066             :                         }
   17067           0 :                         if (test_var > uint_max) {
   17068           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17069             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17070           0 :                                 return -1;
   17071             :                         }
   17072           0 :                         object->maxkeepcomplsearch = test_var;
   17073             :                 } else {
   17074           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17075             :                           PyLong_Type.tp_name);
   17076           0 :                         return -1;
   17077             :                 }
   17078             :         }
   17079           0 :         return 0;
   17080             : }
   17081             : 
   17082           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_threadcountadd(PyObject *obj, void *closure)
   17083             : {
   17084           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17085           0 :         PyObject *py_threadcountadd;
   17086           0 :         py_threadcountadd = PyLong_FromUnsignedLongLong((uint32_t)(object->threadcountadd));
   17087           0 :         return py_threadcountadd;
   17088             : }
   17089             : 
   17090           0 : static int py_srvsvc_NetSrvInfo503_set_threadcountadd(PyObject *py_obj, PyObject *value, void *closure)
   17091             : {
   17092           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17093           0 :         if (value == NULL) {
   17094           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->threadcountadd");
   17095           0 :                 return -1;
   17096             :         }
   17097             :         {
   17098           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadcountadd));
   17099           0 :                 if (PyLong_Check(value)) {
   17100           0 :                         unsigned long long test_var;
   17101           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17102           0 :                         if (PyErr_Occurred() != NULL) {
   17103           0 :                                 return -1;
   17104             :                         }
   17105           0 :                         if (test_var > uint_max) {
   17106           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17107             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17108           0 :                                 return -1;
   17109             :                         }
   17110           0 :                         object->threadcountadd = test_var;
   17111             :                 } else {
   17112           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17113             :                           PyLong_Type.tp_name);
   17114           0 :                         return -1;
   17115             :                 }
   17116             :         }
   17117           0 :         return 0;
   17118             : }
   17119             : 
   17120           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_numlockthreads(PyObject *obj, void *closure)
   17121             : {
   17122           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17123           0 :         PyObject *py_numlockthreads;
   17124           0 :         py_numlockthreads = PyLong_FromUnsignedLongLong((uint32_t)(object->numlockthreads));
   17125           0 :         return py_numlockthreads;
   17126             : }
   17127             : 
   17128           0 : static int py_srvsvc_NetSrvInfo503_set_numlockthreads(PyObject *py_obj, PyObject *value, void *closure)
   17129             : {
   17130           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17131           0 :         if (value == NULL) {
   17132           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->numlockthreads");
   17133           0 :                 return -1;
   17134             :         }
   17135             :         {
   17136           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numlockthreads));
   17137           0 :                 if (PyLong_Check(value)) {
   17138           0 :                         unsigned long long test_var;
   17139           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17140           0 :                         if (PyErr_Occurred() != NULL) {
   17141           0 :                                 return -1;
   17142             :                         }
   17143           0 :                         if (test_var > uint_max) {
   17144           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17145             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17146           0 :                                 return -1;
   17147             :                         }
   17148           0 :                         object->numlockthreads = test_var;
   17149             :                 } else {
   17150           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17151             :                           PyLong_Type.tp_name);
   17152           0 :                         return -1;
   17153             :                 }
   17154             :         }
   17155           0 :         return 0;
   17156             : }
   17157             : 
   17158           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_scavtimeout(PyObject *obj, void *closure)
   17159             : {
   17160           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17161           0 :         PyObject *py_scavtimeout;
   17162           0 :         py_scavtimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->scavtimeout));
   17163           0 :         return py_scavtimeout;
   17164             : }
   17165             : 
   17166           0 : static int py_srvsvc_NetSrvInfo503_set_scavtimeout(PyObject *py_obj, PyObject *value, void *closure)
   17167             : {
   17168           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17169           0 :         if (value == NULL) {
   17170           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->scavtimeout");
   17171           0 :                 return -1;
   17172             :         }
   17173             :         {
   17174           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavtimeout));
   17175           0 :                 if (PyLong_Check(value)) {
   17176           0 :                         unsigned long long test_var;
   17177           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17178           0 :                         if (PyErr_Occurred() != NULL) {
   17179           0 :                                 return -1;
   17180             :                         }
   17181           0 :                         if (test_var > uint_max) {
   17182           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17183             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17184           0 :                                 return -1;
   17185             :                         }
   17186           0 :                         object->scavtimeout = test_var;
   17187             :                 } else {
   17188           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17189             :                           PyLong_Type.tp_name);
   17190           0 :                         return -1;
   17191             :                 }
   17192             :         }
   17193           0 :         return 0;
   17194             : }
   17195             : 
   17196           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_minrcvqueue(PyObject *obj, void *closure)
   17197             : {
   17198           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17199           0 :         PyObject *py_minrcvqueue;
   17200           0 :         py_minrcvqueue = PyLong_FromUnsignedLongLong((uint32_t)(object->minrcvqueue));
   17201           0 :         return py_minrcvqueue;
   17202             : }
   17203             : 
   17204           0 : static int py_srvsvc_NetSrvInfo503_set_minrcvqueue(PyObject *py_obj, PyObject *value, void *closure)
   17205             : {
   17206           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17207           0 :         if (value == NULL) {
   17208           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minrcvqueue");
   17209           0 :                 return -1;
   17210             :         }
   17211             :         {
   17212           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minrcvqueue));
   17213           0 :                 if (PyLong_Check(value)) {
   17214           0 :                         unsigned long long test_var;
   17215           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17216           0 :                         if (PyErr_Occurred() != NULL) {
   17217           0 :                                 return -1;
   17218             :                         }
   17219           0 :                         if (test_var > uint_max) {
   17220           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17221             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17222           0 :                                 return -1;
   17223             :                         }
   17224           0 :                         object->minrcvqueue = test_var;
   17225             :                 } else {
   17226           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17227             :                           PyLong_Type.tp_name);
   17228           0 :                         return -1;
   17229             :                 }
   17230             :         }
   17231           0 :         return 0;
   17232             : }
   17233             : 
   17234           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_minfreeworkitems(PyObject *obj, void *closure)
   17235             : {
   17236           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17237           0 :         PyObject *py_minfreeworkitems;
   17238           0 :         py_minfreeworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->minfreeworkitems));
   17239           0 :         return py_minfreeworkitems;
   17240             : }
   17241             : 
   17242           0 : static int py_srvsvc_NetSrvInfo503_set_minfreeworkitems(PyObject *py_obj, PyObject *value, void *closure)
   17243             : {
   17244           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17245           0 :         if (value == NULL) {
   17246           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minfreeworkitems");
   17247           0 :                 return -1;
   17248             :         }
   17249             :         {
   17250           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeworkitems));
   17251           0 :                 if (PyLong_Check(value)) {
   17252           0 :                         unsigned long long test_var;
   17253           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17254           0 :                         if (PyErr_Occurred() != NULL) {
   17255           0 :                                 return -1;
   17256             :                         }
   17257           0 :                         if (test_var > uint_max) {
   17258           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17259             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17260           0 :                                 return -1;
   17261             :                         }
   17262           0 :                         object->minfreeworkitems = test_var;
   17263             :                 } else {
   17264           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17265             :                           PyLong_Type.tp_name);
   17266           0 :                         return -1;
   17267             :                 }
   17268             :         }
   17269           0 :         return 0;
   17270             : }
   17271             : 
   17272           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_xactmemsize(PyObject *obj, void *closure)
   17273             : {
   17274           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17275           0 :         PyObject *py_xactmemsize;
   17276           0 :         py_xactmemsize = PyLong_FromUnsignedLongLong((uint32_t)(object->xactmemsize));
   17277           0 :         return py_xactmemsize;
   17278             : }
   17279             : 
   17280           0 : static int py_srvsvc_NetSrvInfo503_set_xactmemsize(PyObject *py_obj, PyObject *value, void *closure)
   17281             : {
   17282           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17283           0 :         if (value == NULL) {
   17284           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->xactmemsize");
   17285           0 :                 return -1;
   17286             :         }
   17287             :         {
   17288           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->xactmemsize));
   17289           0 :                 if (PyLong_Check(value)) {
   17290           0 :                         unsigned long long test_var;
   17291           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17292           0 :                         if (PyErr_Occurred() != NULL) {
   17293           0 :                                 return -1;
   17294             :                         }
   17295           0 :                         if (test_var > uint_max) {
   17296           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17297             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17298           0 :                                 return -1;
   17299             :                         }
   17300           0 :                         object->xactmemsize = test_var;
   17301             :                 } else {
   17302           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17303             :                           PyLong_Type.tp_name);
   17304           0 :                         return -1;
   17305             :                 }
   17306             :         }
   17307           0 :         return 0;
   17308             : }
   17309             : 
   17310           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_threadpriority(PyObject *obj, void *closure)
   17311             : {
   17312           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17313           0 :         PyObject *py_threadpriority;
   17314           0 :         py_threadpriority = PyLong_FromUnsignedLongLong((uint32_t)(object->threadpriority));
   17315           0 :         return py_threadpriority;
   17316             : }
   17317             : 
   17318           0 : static int py_srvsvc_NetSrvInfo503_set_threadpriority(PyObject *py_obj, PyObject *value, void *closure)
   17319             : {
   17320           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17321           0 :         if (value == NULL) {
   17322           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->threadpriority");
   17323           0 :                 return -1;
   17324             :         }
   17325             :         {
   17326           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadpriority));
   17327           0 :                 if (PyLong_Check(value)) {
   17328           0 :                         unsigned long long test_var;
   17329           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17330           0 :                         if (PyErr_Occurred() != NULL) {
   17331           0 :                                 return -1;
   17332             :                         }
   17333           0 :                         if (test_var > uint_max) {
   17334           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17335             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17336           0 :                                 return -1;
   17337             :                         }
   17338           0 :                         object->threadpriority = test_var;
   17339             :                 } else {
   17340           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17341             :                           PyLong_Type.tp_name);
   17342           0 :                         return -1;
   17343             :                 }
   17344             :         }
   17345           0 :         return 0;
   17346             : }
   17347             : 
   17348           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxmpxct(PyObject *obj, void *closure)
   17349             : {
   17350           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17351           0 :         PyObject *py_maxmpxct;
   17352           0 :         py_maxmpxct = PyLong_FromUnsignedLongLong((uint32_t)(object->maxmpxct));
   17353           0 :         return py_maxmpxct;
   17354             : }
   17355             : 
   17356           0 : static int py_srvsvc_NetSrvInfo503_set_maxmpxct(PyObject *py_obj, PyObject *value, void *closure)
   17357             : {
   17358           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17359           0 :         if (value == NULL) {
   17360           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxmpxct");
   17361           0 :                 return -1;
   17362             :         }
   17363             :         {
   17364           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxmpxct));
   17365           0 :                 if (PyLong_Check(value)) {
   17366           0 :                         unsigned long long test_var;
   17367           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17368           0 :                         if (PyErr_Occurred() != NULL) {
   17369           0 :                                 return -1;
   17370             :                         }
   17371           0 :                         if (test_var > uint_max) {
   17372           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17373             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17374           0 :                                 return -1;
   17375             :                         }
   17376           0 :                         object->maxmpxct = test_var;
   17377             :                 } else {
   17378           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17379             :                           PyLong_Type.tp_name);
   17380           0 :                         return -1;
   17381             :                 }
   17382             :         }
   17383           0 :         return 0;
   17384             : }
   17385             : 
   17386           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_oplockbreakwait(PyObject *obj, void *closure)
   17387             : {
   17388           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17389           0 :         PyObject *py_oplockbreakwait;
   17390           0 :         py_oplockbreakwait = PyLong_FromUnsignedLongLong((uint32_t)(object->oplockbreakwait));
   17391           0 :         return py_oplockbreakwait;
   17392             : }
   17393             : 
   17394           0 : static int py_srvsvc_NetSrvInfo503_set_oplockbreakwait(PyObject *py_obj, PyObject *value, void *closure)
   17395             : {
   17396           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17397           0 :         if (value == NULL) {
   17398           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->oplockbreakwait");
   17399           0 :                 return -1;
   17400             :         }
   17401             :         {
   17402           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakwait));
   17403           0 :                 if (PyLong_Check(value)) {
   17404           0 :                         unsigned long long test_var;
   17405           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17406           0 :                         if (PyErr_Occurred() != NULL) {
   17407           0 :                                 return -1;
   17408             :                         }
   17409           0 :                         if (test_var > uint_max) {
   17410           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17411             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17412           0 :                                 return -1;
   17413             :                         }
   17414           0 :                         object->oplockbreakwait = test_var;
   17415             :                 } else {
   17416           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17417             :                           PyLong_Type.tp_name);
   17418           0 :                         return -1;
   17419             :                 }
   17420             :         }
   17421           0 :         return 0;
   17422             : }
   17423             : 
   17424           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_oplockbreakresponsewait(PyObject *obj, void *closure)
   17425             : {
   17426           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17427           0 :         PyObject *py_oplockbreakresponsewait;
   17428           0 :         py_oplockbreakresponsewait = PyLong_FromUnsignedLongLong((uint32_t)(object->oplockbreakresponsewait));
   17429           0 :         return py_oplockbreakresponsewait;
   17430             : }
   17431             : 
   17432           0 : static int py_srvsvc_NetSrvInfo503_set_oplockbreakresponsewait(PyObject *py_obj, PyObject *value, void *closure)
   17433             : {
   17434           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17435           0 :         if (value == NULL) {
   17436           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->oplockbreakresponsewait");
   17437           0 :                 return -1;
   17438             :         }
   17439             :         {
   17440           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakresponsewait));
   17441           0 :                 if (PyLong_Check(value)) {
   17442           0 :                         unsigned long long test_var;
   17443           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17444           0 :                         if (PyErr_Occurred() != NULL) {
   17445           0 :                                 return -1;
   17446             :                         }
   17447           0 :                         if (test_var > uint_max) {
   17448           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17449             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17450           0 :                                 return -1;
   17451             :                         }
   17452           0 :                         object->oplockbreakresponsewait = test_var;
   17453             :                 } else {
   17454           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17455             :                           PyLong_Type.tp_name);
   17456           0 :                         return -1;
   17457             :                 }
   17458             :         }
   17459           0 :         return 0;
   17460             : }
   17461             : 
   17462           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enableoplocks(PyObject *obj, void *closure)
   17463             : {
   17464           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17465           0 :         PyObject *py_enableoplocks;
   17466           0 :         py_enableoplocks = PyLong_FromUnsignedLongLong((uint32_t)(object->enableoplocks));
   17467           0 :         return py_enableoplocks;
   17468             : }
   17469             : 
   17470           0 : static int py_srvsvc_NetSrvInfo503_set_enableoplocks(PyObject *py_obj, PyObject *value, void *closure)
   17471             : {
   17472           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17473           0 :         if (value == NULL) {
   17474           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableoplocks");
   17475           0 :                 return -1;
   17476             :         }
   17477             :         {
   17478           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplocks));
   17479           0 :                 if (PyLong_Check(value)) {
   17480           0 :                         unsigned long long test_var;
   17481           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17482           0 :                         if (PyErr_Occurred() != NULL) {
   17483           0 :                                 return -1;
   17484             :                         }
   17485           0 :                         if (test_var > uint_max) {
   17486           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17487             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17488           0 :                                 return -1;
   17489             :                         }
   17490           0 :                         object->enableoplocks = test_var;
   17491             :                 } else {
   17492           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17493             :                           PyLong_Type.tp_name);
   17494           0 :                         return -1;
   17495             :                 }
   17496             :         }
   17497           0 :         return 0;
   17498             : }
   17499             : 
   17500           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enableoplockforceclose(PyObject *obj, void *closure)
   17501             : {
   17502           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17503           0 :         PyObject *py_enableoplockforceclose;
   17504           0 :         py_enableoplockforceclose = PyLong_FromUnsignedLongLong((uint32_t)(object->enableoplockforceclose));
   17505           0 :         return py_enableoplockforceclose;
   17506             : }
   17507             : 
   17508           0 : static int py_srvsvc_NetSrvInfo503_set_enableoplockforceclose(PyObject *py_obj, PyObject *value, void *closure)
   17509             : {
   17510           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17511           0 :         if (value == NULL) {
   17512           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableoplockforceclose");
   17513           0 :                 return -1;
   17514             :         }
   17515             :         {
   17516           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplockforceclose));
   17517           0 :                 if (PyLong_Check(value)) {
   17518           0 :                         unsigned long long test_var;
   17519           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17520           0 :                         if (PyErr_Occurred() != NULL) {
   17521           0 :                                 return -1;
   17522             :                         }
   17523           0 :                         if (test_var > uint_max) {
   17524           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17525             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17526           0 :                                 return -1;
   17527             :                         }
   17528           0 :                         object->enableoplockforceclose = test_var;
   17529             :                 } else {
   17530           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17531             :                           PyLong_Type.tp_name);
   17532           0 :                         return -1;
   17533             :                 }
   17534             :         }
   17535           0 :         return 0;
   17536             : }
   17537             : 
   17538           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enablefcbopens(PyObject *obj, void *closure)
   17539             : {
   17540           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17541           0 :         PyObject *py_enablefcbopens;
   17542           0 :         py_enablefcbopens = PyLong_FromUnsignedLongLong((uint32_t)(object->enablefcbopens));
   17543           0 :         return py_enablefcbopens;
   17544             : }
   17545             : 
   17546           0 : static int py_srvsvc_NetSrvInfo503_set_enablefcbopens(PyObject *py_obj, PyObject *value, void *closure)
   17547             : {
   17548           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17549           0 :         if (value == NULL) {
   17550           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enablefcbopens");
   17551           0 :                 return -1;
   17552             :         }
   17553             :         {
   17554           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablefcbopens));
   17555           0 :                 if (PyLong_Check(value)) {
   17556           0 :                         unsigned long long test_var;
   17557           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17558           0 :                         if (PyErr_Occurred() != NULL) {
   17559           0 :                                 return -1;
   17560             :                         }
   17561           0 :                         if (test_var > uint_max) {
   17562           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17563             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17564           0 :                                 return -1;
   17565             :                         }
   17566           0 :                         object->enablefcbopens = test_var;
   17567             :                 } else {
   17568           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17569             :                           PyLong_Type.tp_name);
   17570           0 :                         return -1;
   17571             :                 }
   17572             :         }
   17573           0 :         return 0;
   17574             : }
   17575             : 
   17576           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enableraw(PyObject *obj, void *closure)
   17577             : {
   17578           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17579           0 :         PyObject *py_enableraw;
   17580           0 :         py_enableraw = PyLong_FromUnsignedLongLong((uint32_t)(object->enableraw));
   17581           0 :         return py_enableraw;
   17582             : }
   17583             : 
   17584           0 : static int py_srvsvc_NetSrvInfo503_set_enableraw(PyObject *py_obj, PyObject *value, void *closure)
   17585             : {
   17586           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17587           0 :         if (value == NULL) {
   17588           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableraw");
   17589           0 :                 return -1;
   17590             :         }
   17591             :         {
   17592           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableraw));
   17593           0 :                 if (PyLong_Check(value)) {
   17594           0 :                         unsigned long long test_var;
   17595           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17596           0 :                         if (PyErr_Occurred() != NULL) {
   17597           0 :                                 return -1;
   17598             :                         }
   17599           0 :                         if (test_var > uint_max) {
   17600           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17601             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17602           0 :                                 return -1;
   17603             :                         }
   17604           0 :                         object->enableraw = test_var;
   17605             :                 } else {
   17606           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17607             :                           PyLong_Type.tp_name);
   17608           0 :                         return -1;
   17609             :                 }
   17610             :         }
   17611           0 :         return 0;
   17612             : }
   17613             : 
   17614           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enablesharednetdrives(PyObject *obj, void *closure)
   17615             : {
   17616           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17617           0 :         PyObject *py_enablesharednetdrives;
   17618           0 :         py_enablesharednetdrives = PyLong_FromUnsignedLongLong((uint32_t)(object->enablesharednetdrives));
   17619           0 :         return py_enablesharednetdrives;
   17620             : }
   17621             : 
   17622           0 : static int py_srvsvc_NetSrvInfo503_set_enablesharednetdrives(PyObject *py_obj, PyObject *value, void *closure)
   17623             : {
   17624           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17625           0 :         if (value == NULL) {
   17626           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enablesharednetdrives");
   17627           0 :                 return -1;
   17628             :         }
   17629             :         {
   17630           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesharednetdrives));
   17631           0 :                 if (PyLong_Check(value)) {
   17632           0 :                         unsigned long long test_var;
   17633           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17634           0 :                         if (PyErr_Occurred() != NULL) {
   17635           0 :                                 return -1;
   17636             :                         }
   17637           0 :                         if (test_var > uint_max) {
   17638           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17639             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17640           0 :                                 return -1;
   17641             :                         }
   17642           0 :                         object->enablesharednetdrives = test_var;
   17643             :                 } else {
   17644           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17645             :                           PyLong_Type.tp_name);
   17646           0 :                         return -1;
   17647             :                 }
   17648             :         }
   17649           0 :         return 0;
   17650             : }
   17651             : 
   17652           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_minfreeconnections(PyObject *obj, void *closure)
   17653             : {
   17654           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17655           0 :         PyObject *py_minfreeconnections;
   17656           0 :         py_minfreeconnections = PyLong_FromUnsignedLongLong((uint32_t)(object->minfreeconnections));
   17657           0 :         return py_minfreeconnections;
   17658             : }
   17659             : 
   17660           0 : static int py_srvsvc_NetSrvInfo503_set_minfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
   17661             : {
   17662           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17663           0 :         if (value == NULL) {
   17664           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minfreeconnections");
   17665           0 :                 return -1;
   17666             :         }
   17667             :         {
   17668           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeconnections));
   17669           0 :                 if (PyLong_Check(value)) {
   17670           0 :                         unsigned long long test_var;
   17671           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17672           0 :                         if (PyErr_Occurred() != NULL) {
   17673           0 :                                 return -1;
   17674             :                         }
   17675           0 :                         if (test_var > uint_max) {
   17676           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17677             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17678           0 :                                 return -1;
   17679             :                         }
   17680           0 :                         object->minfreeconnections = test_var;
   17681             :                 } else {
   17682           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17683             :                           PyLong_Type.tp_name);
   17684           0 :                         return -1;
   17685             :                 }
   17686             :         }
   17687           0 :         return 0;
   17688             : }
   17689             : 
   17690           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxfreeconnections(PyObject *obj, void *closure)
   17691             : {
   17692           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(obj);
   17693           0 :         PyObject *py_maxfreeconnections;
   17694           0 :         py_maxfreeconnections = PyLong_FromUnsignedLongLong((uint32_t)(object->maxfreeconnections));
   17695           0 :         return py_maxfreeconnections;
   17696             : }
   17697             : 
   17698           0 : static int py_srvsvc_NetSrvInfo503_set_maxfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
   17699             : {
   17700           0 :         struct srvsvc_NetSrvInfo503 *object = pytalloc_get_ptr(py_obj);
   17701           0 :         if (value == NULL) {
   17702           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxfreeconnections");
   17703           0 :                 return -1;
   17704             :         }
   17705             :         {
   17706           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxfreeconnections));
   17707           0 :                 if (PyLong_Check(value)) {
   17708           0 :                         unsigned long long test_var;
   17709           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17710           0 :                         if (PyErr_Occurred() != NULL) {
   17711           0 :                                 return -1;
   17712             :                         }
   17713           0 :                         if (test_var > uint_max) {
   17714           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17715             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17716           0 :                                 return -1;
   17717             :                         }
   17718           0 :                         object->maxfreeconnections = test_var;
   17719             :                 } else {
   17720           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17721             :                           PyLong_Type.tp_name);
   17722           0 :                         return -1;
   17723             :                 }
   17724             :         }
   17725           0 :         return 0;
   17726             : }
   17727             : 
   17728             : static PyGetSetDef py_srvsvc_NetSrvInfo503_getsetters[] = {
   17729             :         {
   17730             :                 .name = discard_const_p(char, "sessopen"),
   17731             :                 .get = py_srvsvc_NetSrvInfo503_get_sessopen,
   17732             :                 .set = py_srvsvc_NetSrvInfo503_set_sessopen,
   17733             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17734             :         },
   17735             :         {
   17736             :                 .name = discard_const_p(char, "sesssvc"),
   17737             :                 .get = py_srvsvc_NetSrvInfo503_get_sesssvc,
   17738             :                 .set = py_srvsvc_NetSrvInfo503_set_sesssvc,
   17739             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17740             :         },
   17741             :         {
   17742             :                 .name = discard_const_p(char, "opensearch"),
   17743             :                 .get = py_srvsvc_NetSrvInfo503_get_opensearch,
   17744             :                 .set = py_srvsvc_NetSrvInfo503_set_opensearch,
   17745             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17746             :         },
   17747             :         {
   17748             :                 .name = discard_const_p(char, "sizereqbufs"),
   17749             :                 .get = py_srvsvc_NetSrvInfo503_get_sizereqbufs,
   17750             :                 .set = py_srvsvc_NetSrvInfo503_set_sizereqbufs,
   17751             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17752             :         },
   17753             :         {
   17754             :                 .name = discard_const_p(char, "initworkitems"),
   17755             :                 .get = py_srvsvc_NetSrvInfo503_get_initworkitems,
   17756             :                 .set = py_srvsvc_NetSrvInfo503_set_initworkitems,
   17757             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17758             :         },
   17759             :         {
   17760             :                 .name = discard_const_p(char, "maxworkitems"),
   17761             :                 .get = py_srvsvc_NetSrvInfo503_get_maxworkitems,
   17762             :                 .set = py_srvsvc_NetSrvInfo503_set_maxworkitems,
   17763             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17764             :         },
   17765             :         {
   17766             :                 .name = discard_const_p(char, "rawworkitems"),
   17767             :                 .get = py_srvsvc_NetSrvInfo503_get_rawworkitems,
   17768             :                 .set = py_srvsvc_NetSrvInfo503_set_rawworkitems,
   17769             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17770             :         },
   17771             :         {
   17772             :                 .name = discard_const_p(char, "irpstacksize"),
   17773             :                 .get = py_srvsvc_NetSrvInfo503_get_irpstacksize,
   17774             :                 .set = py_srvsvc_NetSrvInfo503_set_irpstacksize,
   17775             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17776             :         },
   17777             :         {
   17778             :                 .name = discard_const_p(char, "maxrawbuflen"),
   17779             :                 .get = py_srvsvc_NetSrvInfo503_get_maxrawbuflen,
   17780             :                 .set = py_srvsvc_NetSrvInfo503_set_maxrawbuflen,
   17781             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17782             :         },
   17783             :         {
   17784             :                 .name = discard_const_p(char, "sessusers"),
   17785             :                 .get = py_srvsvc_NetSrvInfo503_get_sessusers,
   17786             :                 .set = py_srvsvc_NetSrvInfo503_set_sessusers,
   17787             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17788             :         },
   17789             :         {
   17790             :                 .name = discard_const_p(char, "sessconns"),
   17791             :                 .get = py_srvsvc_NetSrvInfo503_get_sessconns,
   17792             :                 .set = py_srvsvc_NetSrvInfo503_set_sessconns,
   17793             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17794             :         },
   17795             :         {
   17796             :                 .name = discard_const_p(char, "maxpagedmemoryusage"),
   17797             :                 .get = py_srvsvc_NetSrvInfo503_get_maxpagedmemoryusage,
   17798             :                 .set = py_srvsvc_NetSrvInfo503_set_maxpagedmemoryusage,
   17799             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17800             :         },
   17801             :         {
   17802             :                 .name = discard_const_p(char, "maxnonpagedmemoryusage"),
   17803             :                 .get = py_srvsvc_NetSrvInfo503_get_maxnonpagedmemoryusage,
   17804             :                 .set = py_srvsvc_NetSrvInfo503_set_maxnonpagedmemoryusage,
   17805             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17806             :         },
   17807             :         {
   17808             :                 .name = discard_const_p(char, "enablesoftcompat"),
   17809             :                 .get = py_srvsvc_NetSrvInfo503_get_enablesoftcompat,
   17810             :                 .set = py_srvsvc_NetSrvInfo503_set_enablesoftcompat,
   17811             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17812             :         },
   17813             :         {
   17814             :                 .name = discard_const_p(char, "enableforcedlogoff"),
   17815             :                 .get = py_srvsvc_NetSrvInfo503_get_enableforcedlogoff,
   17816             :                 .set = py_srvsvc_NetSrvInfo503_set_enableforcedlogoff,
   17817             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17818             :         },
   17819             :         {
   17820             :                 .name = discard_const_p(char, "timesource"),
   17821             :                 .get = py_srvsvc_NetSrvInfo503_get_timesource,
   17822             :                 .set = py_srvsvc_NetSrvInfo503_set_timesource,
   17823             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17824             :         },
   17825             :         {
   17826             :                 .name = discard_const_p(char, "acceptdownlevelapis"),
   17827             :                 .get = py_srvsvc_NetSrvInfo503_get_acceptdownlevelapis,
   17828             :                 .set = py_srvsvc_NetSrvInfo503_set_acceptdownlevelapis,
   17829             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17830             :         },
   17831             :         {
   17832             :                 .name = discard_const_p(char, "lmannounce"),
   17833             :                 .get = py_srvsvc_NetSrvInfo503_get_lmannounce,
   17834             :                 .set = py_srvsvc_NetSrvInfo503_set_lmannounce,
   17835             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17836             :         },
   17837             :         {
   17838             :                 .name = discard_const_p(char, "domain"),
   17839             :                 .get = py_srvsvc_NetSrvInfo503_get_domain,
   17840             :                 .set = py_srvsvc_NetSrvInfo503_set_domain,
   17841             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17842             :         },
   17843             :         {
   17844             :                 .name = discard_const_p(char, "maxcopyreadlen"),
   17845             :                 .get = py_srvsvc_NetSrvInfo503_get_maxcopyreadlen,
   17846             :                 .set = py_srvsvc_NetSrvInfo503_set_maxcopyreadlen,
   17847             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17848             :         },
   17849             :         {
   17850             :                 .name = discard_const_p(char, "maxcopywritelen"),
   17851             :                 .get = py_srvsvc_NetSrvInfo503_get_maxcopywritelen,
   17852             :                 .set = py_srvsvc_NetSrvInfo503_set_maxcopywritelen,
   17853             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17854             :         },
   17855             :         {
   17856             :                 .name = discard_const_p(char, "minkeepsearch"),
   17857             :                 .get = py_srvsvc_NetSrvInfo503_get_minkeepsearch,
   17858             :                 .set = py_srvsvc_NetSrvInfo503_set_minkeepsearch,
   17859             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17860             :         },
   17861             :         {
   17862             :                 .name = discard_const_p(char, "maxkeepsearch"),
   17863             :                 .get = py_srvsvc_NetSrvInfo503_get_maxkeepsearch,
   17864             :                 .set = py_srvsvc_NetSrvInfo503_set_maxkeepsearch,
   17865             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17866             :         },
   17867             :         {
   17868             :                 .name = discard_const_p(char, "minkeepcomplsearch"),
   17869             :                 .get = py_srvsvc_NetSrvInfo503_get_minkeepcomplsearch,
   17870             :                 .set = py_srvsvc_NetSrvInfo503_set_minkeepcomplsearch,
   17871             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17872             :         },
   17873             :         {
   17874             :                 .name = discard_const_p(char, "maxkeepcomplsearch"),
   17875             :                 .get = py_srvsvc_NetSrvInfo503_get_maxkeepcomplsearch,
   17876             :                 .set = py_srvsvc_NetSrvInfo503_set_maxkeepcomplsearch,
   17877             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17878             :         },
   17879             :         {
   17880             :                 .name = discard_const_p(char, "threadcountadd"),
   17881             :                 .get = py_srvsvc_NetSrvInfo503_get_threadcountadd,
   17882             :                 .set = py_srvsvc_NetSrvInfo503_set_threadcountadd,
   17883             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17884             :         },
   17885             :         {
   17886             :                 .name = discard_const_p(char, "numlockthreads"),
   17887             :                 .get = py_srvsvc_NetSrvInfo503_get_numlockthreads,
   17888             :                 .set = py_srvsvc_NetSrvInfo503_set_numlockthreads,
   17889             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17890             :         },
   17891             :         {
   17892             :                 .name = discard_const_p(char, "scavtimeout"),
   17893             :                 .get = py_srvsvc_NetSrvInfo503_get_scavtimeout,
   17894             :                 .set = py_srvsvc_NetSrvInfo503_set_scavtimeout,
   17895             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17896             :         },
   17897             :         {
   17898             :                 .name = discard_const_p(char, "minrcvqueue"),
   17899             :                 .get = py_srvsvc_NetSrvInfo503_get_minrcvqueue,
   17900             :                 .set = py_srvsvc_NetSrvInfo503_set_minrcvqueue,
   17901             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17902             :         },
   17903             :         {
   17904             :                 .name = discard_const_p(char, "minfreeworkitems"),
   17905             :                 .get = py_srvsvc_NetSrvInfo503_get_minfreeworkitems,
   17906             :                 .set = py_srvsvc_NetSrvInfo503_set_minfreeworkitems,
   17907             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17908             :         },
   17909             :         {
   17910             :                 .name = discard_const_p(char, "xactmemsize"),
   17911             :                 .get = py_srvsvc_NetSrvInfo503_get_xactmemsize,
   17912             :                 .set = py_srvsvc_NetSrvInfo503_set_xactmemsize,
   17913             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17914             :         },
   17915             :         {
   17916             :                 .name = discard_const_p(char, "threadpriority"),
   17917             :                 .get = py_srvsvc_NetSrvInfo503_get_threadpriority,
   17918             :                 .set = py_srvsvc_NetSrvInfo503_set_threadpriority,
   17919             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17920             :         },
   17921             :         {
   17922             :                 .name = discard_const_p(char, "maxmpxct"),
   17923             :                 .get = py_srvsvc_NetSrvInfo503_get_maxmpxct,
   17924             :                 .set = py_srvsvc_NetSrvInfo503_set_maxmpxct,
   17925             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17926             :         },
   17927             :         {
   17928             :                 .name = discard_const_p(char, "oplockbreakwait"),
   17929             :                 .get = py_srvsvc_NetSrvInfo503_get_oplockbreakwait,
   17930             :                 .set = py_srvsvc_NetSrvInfo503_set_oplockbreakwait,
   17931             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17932             :         },
   17933             :         {
   17934             :                 .name = discard_const_p(char, "oplockbreakresponsewait"),
   17935             :                 .get = py_srvsvc_NetSrvInfo503_get_oplockbreakresponsewait,
   17936             :                 .set = py_srvsvc_NetSrvInfo503_set_oplockbreakresponsewait,
   17937             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17938             :         },
   17939             :         {
   17940             :                 .name = discard_const_p(char, "enableoplocks"),
   17941             :                 .get = py_srvsvc_NetSrvInfo503_get_enableoplocks,
   17942             :                 .set = py_srvsvc_NetSrvInfo503_set_enableoplocks,
   17943             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17944             :         },
   17945             :         {
   17946             :                 .name = discard_const_p(char, "enableoplockforceclose"),
   17947             :                 .get = py_srvsvc_NetSrvInfo503_get_enableoplockforceclose,
   17948             :                 .set = py_srvsvc_NetSrvInfo503_set_enableoplockforceclose,
   17949             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17950             :         },
   17951             :         {
   17952             :                 .name = discard_const_p(char, "enablefcbopens"),
   17953             :                 .get = py_srvsvc_NetSrvInfo503_get_enablefcbopens,
   17954             :                 .set = py_srvsvc_NetSrvInfo503_set_enablefcbopens,
   17955             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17956             :         },
   17957             :         {
   17958             :                 .name = discard_const_p(char, "enableraw"),
   17959             :                 .get = py_srvsvc_NetSrvInfo503_get_enableraw,
   17960             :                 .set = py_srvsvc_NetSrvInfo503_set_enableraw,
   17961             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17962             :         },
   17963             :         {
   17964             :                 .name = discard_const_p(char, "enablesharednetdrives"),
   17965             :                 .get = py_srvsvc_NetSrvInfo503_get_enablesharednetdrives,
   17966             :                 .set = py_srvsvc_NetSrvInfo503_set_enablesharednetdrives,
   17967             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17968             :         },
   17969             :         {
   17970             :                 .name = discard_const_p(char, "minfreeconnections"),
   17971             :                 .get = py_srvsvc_NetSrvInfo503_get_minfreeconnections,
   17972             :                 .set = py_srvsvc_NetSrvInfo503_set_minfreeconnections,
   17973             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17974             :         },
   17975             :         {
   17976             :                 .name = discard_const_p(char, "maxfreeconnections"),
   17977             :                 .get = py_srvsvc_NetSrvInfo503_get_maxfreeconnections,
   17978             :                 .set = py_srvsvc_NetSrvInfo503_set_maxfreeconnections,
   17979             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17980             :         },
   17981             :         { .name = NULL }
   17982             : };
   17983             : 
   17984           0 : static PyObject *py_srvsvc_NetSrvInfo503_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17985             : {
   17986           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo503, type);
   17987             : }
   17988             : 
   17989             : 
   17990             : static PyTypeObject srvsvc_NetSrvInfo503_Type = {
   17991             :         PyVarObject_HEAD_INIT(NULL, 0)
   17992             :         .tp_name = "srvsvc.NetSrvInfo503",
   17993             :         .tp_getset = py_srvsvc_NetSrvInfo503_getsetters,
   17994             :         .tp_methods = NULL,
   17995             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17996             :         .tp_new = py_srvsvc_NetSrvInfo503_new,
   17997             : };
   17998             : 
   17999             : 
   18000           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_sessopen(PyObject *obj, void *closure)
   18001             : {
   18002           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18003           0 :         PyObject *py_sessopen;
   18004           0 :         py_sessopen = PyLong_FromUnsignedLongLong((uint32_t)(object->sessopen));
   18005           0 :         return py_sessopen;
   18006             : }
   18007             : 
   18008           0 : static int py_srvsvc_NetSrvInfo599_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
   18009             : {
   18010           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18011           0 :         if (value == NULL) {
   18012           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessopen");
   18013           0 :                 return -1;
   18014             :         }
   18015             :         {
   18016           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
   18017           0 :                 if (PyLong_Check(value)) {
   18018           0 :                         unsigned long long test_var;
   18019           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18020           0 :                         if (PyErr_Occurred() != NULL) {
   18021           0 :                                 return -1;
   18022             :                         }
   18023           0 :                         if (test_var > uint_max) {
   18024           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18025             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18026           0 :                                 return -1;
   18027             :                         }
   18028           0 :                         object->sessopen = test_var;
   18029             :                 } else {
   18030           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18031             :                           PyLong_Type.tp_name);
   18032           0 :                         return -1;
   18033             :                 }
   18034             :         }
   18035           0 :         return 0;
   18036             : }
   18037             : 
   18038           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_sesssvc(PyObject *obj, void *closure)
   18039             : {
   18040           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18041           0 :         PyObject *py_sesssvc;
   18042           0 :         py_sesssvc = PyLong_FromUnsignedLongLong((uint32_t)(object->sesssvc));
   18043           0 :         return py_sesssvc;
   18044             : }
   18045             : 
   18046           0 : static int py_srvsvc_NetSrvInfo599_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
   18047             : {
   18048           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18049           0 :         if (value == NULL) {
   18050           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sesssvc");
   18051           0 :                 return -1;
   18052             :         }
   18053             :         {
   18054           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
   18055           0 :                 if (PyLong_Check(value)) {
   18056           0 :                         unsigned long long test_var;
   18057           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18058           0 :                         if (PyErr_Occurred() != NULL) {
   18059           0 :                                 return -1;
   18060             :                         }
   18061           0 :                         if (test_var > uint_max) {
   18062           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18063             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18064           0 :                                 return -1;
   18065             :                         }
   18066           0 :                         object->sesssvc = test_var;
   18067             :                 } else {
   18068           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18069             :                           PyLong_Type.tp_name);
   18070           0 :                         return -1;
   18071             :                 }
   18072             :         }
   18073           0 :         return 0;
   18074             : }
   18075             : 
   18076           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_opensearch(PyObject *obj, void *closure)
   18077             : {
   18078           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18079           0 :         PyObject *py_opensearch;
   18080           0 :         py_opensearch = PyLong_FromUnsignedLongLong((uint32_t)(object->opensearch));
   18081           0 :         return py_opensearch;
   18082             : }
   18083             : 
   18084           0 : static int py_srvsvc_NetSrvInfo599_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
   18085             : {
   18086           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18087           0 :         if (value == NULL) {
   18088           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->opensearch");
   18089           0 :                 return -1;
   18090             :         }
   18091             :         {
   18092           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
   18093           0 :                 if (PyLong_Check(value)) {
   18094           0 :                         unsigned long long test_var;
   18095           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18096           0 :                         if (PyErr_Occurred() != NULL) {
   18097           0 :                                 return -1;
   18098             :                         }
   18099           0 :                         if (test_var > uint_max) {
   18100           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18101             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18102           0 :                                 return -1;
   18103             :                         }
   18104           0 :                         object->opensearch = test_var;
   18105             :                 } else {
   18106           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18107             :                           PyLong_Type.tp_name);
   18108           0 :                         return -1;
   18109             :                 }
   18110             :         }
   18111           0 :         return 0;
   18112             : }
   18113             : 
   18114           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_sizereqbufs(PyObject *obj, void *closure)
   18115             : {
   18116           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18117           0 :         PyObject *py_sizereqbufs;
   18118           0 :         py_sizereqbufs = PyLong_FromUnsignedLongLong((uint32_t)(object->sizereqbufs));
   18119           0 :         return py_sizereqbufs;
   18120             : }
   18121             : 
   18122           0 : static int py_srvsvc_NetSrvInfo599_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
   18123             : {
   18124           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18125           0 :         if (value == NULL) {
   18126           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sizereqbufs");
   18127           0 :                 return -1;
   18128             :         }
   18129             :         {
   18130           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
   18131           0 :                 if (PyLong_Check(value)) {
   18132           0 :                         unsigned long long test_var;
   18133           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18134           0 :                         if (PyErr_Occurred() != NULL) {
   18135           0 :                                 return -1;
   18136             :                         }
   18137           0 :                         if (test_var > uint_max) {
   18138           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18139             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18140           0 :                                 return -1;
   18141             :                         }
   18142           0 :                         object->sizereqbufs = test_var;
   18143             :                 } else {
   18144           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18145             :                           PyLong_Type.tp_name);
   18146           0 :                         return -1;
   18147             :                 }
   18148             :         }
   18149           0 :         return 0;
   18150             : }
   18151             : 
   18152           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_initworkitems(PyObject *obj, void *closure)
   18153             : {
   18154           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18155           0 :         PyObject *py_initworkitems;
   18156           0 :         py_initworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->initworkitems));
   18157           0 :         return py_initworkitems;
   18158             : }
   18159             : 
   18160           0 : static int py_srvsvc_NetSrvInfo599_set_initworkitems(PyObject *py_obj, PyObject *value, void *closure)
   18161             : {
   18162           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18163           0 :         if (value == NULL) {
   18164           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->initworkitems");
   18165           0 :                 return -1;
   18166             :         }
   18167             :         {
   18168           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initworkitems));
   18169           0 :                 if (PyLong_Check(value)) {
   18170           0 :                         unsigned long long test_var;
   18171           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18172           0 :                         if (PyErr_Occurred() != NULL) {
   18173           0 :                                 return -1;
   18174             :                         }
   18175           0 :                         if (test_var > uint_max) {
   18176           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18177             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18178           0 :                                 return -1;
   18179             :                         }
   18180           0 :                         object->initworkitems = test_var;
   18181             :                 } else {
   18182           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18183             :                           PyLong_Type.tp_name);
   18184           0 :                         return -1;
   18185             :                 }
   18186             :         }
   18187           0 :         return 0;
   18188             : }
   18189             : 
   18190           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxworkitems(PyObject *obj, void *closure)
   18191             : {
   18192           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18193           0 :         PyObject *py_maxworkitems;
   18194           0 :         py_maxworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->maxworkitems));
   18195           0 :         return py_maxworkitems;
   18196             : }
   18197             : 
   18198           0 : static int py_srvsvc_NetSrvInfo599_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
   18199             : {
   18200           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18201           0 :         if (value == NULL) {
   18202           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxworkitems");
   18203           0 :                 return -1;
   18204             :         }
   18205             :         {
   18206           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
   18207           0 :                 if (PyLong_Check(value)) {
   18208           0 :                         unsigned long long test_var;
   18209           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18210           0 :                         if (PyErr_Occurred() != NULL) {
   18211           0 :                                 return -1;
   18212             :                         }
   18213           0 :                         if (test_var > uint_max) {
   18214           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18215             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18216           0 :                                 return -1;
   18217             :                         }
   18218           0 :                         object->maxworkitems = test_var;
   18219             :                 } else {
   18220           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18221             :                           PyLong_Type.tp_name);
   18222           0 :                         return -1;
   18223             :                 }
   18224             :         }
   18225           0 :         return 0;
   18226             : }
   18227             : 
   18228           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_rawworkitems(PyObject *obj, void *closure)
   18229             : {
   18230           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18231           0 :         PyObject *py_rawworkitems;
   18232           0 :         py_rawworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->rawworkitems));
   18233           0 :         return py_rawworkitems;
   18234             : }
   18235             : 
   18236           0 : static int py_srvsvc_NetSrvInfo599_set_rawworkitems(PyObject *py_obj, PyObject *value, void *closure)
   18237             : {
   18238           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18239           0 :         if (value == NULL) {
   18240           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rawworkitems");
   18241           0 :                 return -1;
   18242             :         }
   18243             :         {
   18244           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rawworkitems));
   18245           0 :                 if (PyLong_Check(value)) {
   18246           0 :                         unsigned long long test_var;
   18247           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18248           0 :                         if (PyErr_Occurred() != NULL) {
   18249           0 :                                 return -1;
   18250             :                         }
   18251           0 :                         if (test_var > uint_max) {
   18252           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18253             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18254           0 :                                 return -1;
   18255             :                         }
   18256           0 :                         object->rawworkitems = test_var;
   18257             :                 } else {
   18258           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18259             :                           PyLong_Type.tp_name);
   18260           0 :                         return -1;
   18261             :                 }
   18262             :         }
   18263           0 :         return 0;
   18264             : }
   18265             : 
   18266           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_irpstacksize(PyObject *obj, void *closure)
   18267             : {
   18268           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18269           0 :         PyObject *py_irpstacksize;
   18270           0 :         py_irpstacksize = PyLong_FromUnsignedLongLong((uint32_t)(object->irpstacksize));
   18271           0 :         return py_irpstacksize;
   18272             : }
   18273             : 
   18274           0 : static int py_srvsvc_NetSrvInfo599_set_irpstacksize(PyObject *py_obj, PyObject *value, void *closure)
   18275             : {
   18276           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18277           0 :         if (value == NULL) {
   18278           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->irpstacksize");
   18279           0 :                 return -1;
   18280             :         }
   18281             :         {
   18282           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->irpstacksize));
   18283           0 :                 if (PyLong_Check(value)) {
   18284           0 :                         unsigned long long test_var;
   18285           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18286           0 :                         if (PyErr_Occurred() != NULL) {
   18287           0 :                                 return -1;
   18288             :                         }
   18289           0 :                         if (test_var > uint_max) {
   18290           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18291             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18292           0 :                                 return -1;
   18293             :                         }
   18294           0 :                         object->irpstacksize = test_var;
   18295             :                 } else {
   18296           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18297             :                           PyLong_Type.tp_name);
   18298           0 :                         return -1;
   18299             :                 }
   18300             :         }
   18301           0 :         return 0;
   18302             : }
   18303             : 
   18304           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxrawbuflen(PyObject *obj, void *closure)
   18305             : {
   18306           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18307           0 :         PyObject *py_maxrawbuflen;
   18308           0 :         py_maxrawbuflen = PyLong_FromUnsignedLongLong((uint32_t)(object->maxrawbuflen));
   18309           0 :         return py_maxrawbuflen;
   18310             : }
   18311             : 
   18312           0 : static int py_srvsvc_NetSrvInfo599_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
   18313             : {
   18314           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18315           0 :         if (value == NULL) {
   18316           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxrawbuflen");
   18317           0 :                 return -1;
   18318             :         }
   18319             :         {
   18320           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
   18321           0 :                 if (PyLong_Check(value)) {
   18322           0 :                         unsigned long long test_var;
   18323           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18324           0 :                         if (PyErr_Occurred() != NULL) {
   18325           0 :                                 return -1;
   18326             :                         }
   18327           0 :                         if (test_var > uint_max) {
   18328           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18329             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18330           0 :                                 return -1;
   18331             :                         }
   18332           0 :                         object->maxrawbuflen = test_var;
   18333             :                 } else {
   18334           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18335             :                           PyLong_Type.tp_name);
   18336           0 :                         return -1;
   18337             :                 }
   18338             :         }
   18339           0 :         return 0;
   18340             : }
   18341             : 
   18342           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_sessusers(PyObject *obj, void *closure)
   18343             : {
   18344           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18345           0 :         PyObject *py_sessusers;
   18346           0 :         py_sessusers = PyLong_FromUnsignedLongLong((uint32_t)(object->sessusers));
   18347           0 :         return py_sessusers;
   18348             : }
   18349             : 
   18350           0 : static int py_srvsvc_NetSrvInfo599_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
   18351             : {
   18352           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18353           0 :         if (value == NULL) {
   18354           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessusers");
   18355           0 :                 return -1;
   18356             :         }
   18357             :         {
   18358           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
   18359           0 :                 if (PyLong_Check(value)) {
   18360           0 :                         unsigned long long test_var;
   18361           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18362           0 :                         if (PyErr_Occurred() != NULL) {
   18363           0 :                                 return -1;
   18364             :                         }
   18365           0 :                         if (test_var > uint_max) {
   18366           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18367             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18368           0 :                                 return -1;
   18369             :                         }
   18370           0 :                         object->sessusers = test_var;
   18371             :                 } else {
   18372           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18373             :                           PyLong_Type.tp_name);
   18374           0 :                         return -1;
   18375             :                 }
   18376             :         }
   18377           0 :         return 0;
   18378             : }
   18379             : 
   18380           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_sessconns(PyObject *obj, void *closure)
   18381             : {
   18382           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18383           0 :         PyObject *py_sessconns;
   18384           0 :         py_sessconns = PyLong_FromUnsignedLongLong((uint32_t)(object->sessconns));
   18385           0 :         return py_sessconns;
   18386             : }
   18387             : 
   18388           0 : static int py_srvsvc_NetSrvInfo599_set_sessconns(PyObject *py_obj, PyObject *value, void *closure)
   18389             : {
   18390           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18391           0 :         if (value == NULL) {
   18392           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessconns");
   18393           0 :                 return -1;
   18394             :         }
   18395             :         {
   18396           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessconns));
   18397           0 :                 if (PyLong_Check(value)) {
   18398           0 :                         unsigned long long test_var;
   18399           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18400           0 :                         if (PyErr_Occurred() != NULL) {
   18401           0 :                                 return -1;
   18402             :                         }
   18403           0 :                         if (test_var > uint_max) {
   18404           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18405             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18406           0 :                                 return -1;
   18407             :                         }
   18408           0 :                         object->sessconns = test_var;
   18409             :                 } else {
   18410           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18411             :                           PyLong_Type.tp_name);
   18412           0 :                         return -1;
   18413             :                 }
   18414             :         }
   18415           0 :         return 0;
   18416             : }
   18417             : 
   18418           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxpagedmemoryusage(PyObject *obj, void *closure)
   18419             : {
   18420           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18421           0 :         PyObject *py_maxpagedmemoryusage;
   18422           0 :         py_maxpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)(object->maxpagedmemoryusage));
   18423           0 :         return py_maxpagedmemoryusage;
   18424             : }
   18425             : 
   18426           0 : static int py_srvsvc_NetSrvInfo599_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   18427             : {
   18428           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18429           0 :         if (value == NULL) {
   18430           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxpagedmemoryusage");
   18431           0 :                 return -1;
   18432             :         }
   18433             :         {
   18434           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
   18435           0 :                 if (PyLong_Check(value)) {
   18436           0 :                         unsigned long long test_var;
   18437           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18438           0 :                         if (PyErr_Occurred() != NULL) {
   18439           0 :                                 return -1;
   18440             :                         }
   18441           0 :                         if (test_var > uint_max) {
   18442           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18443             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18444           0 :                                 return -1;
   18445             :                         }
   18446           0 :                         object->maxpagedmemoryusage = test_var;
   18447             :                 } else {
   18448           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18449             :                           PyLong_Type.tp_name);
   18450           0 :                         return -1;
   18451             :                 }
   18452             :         }
   18453           0 :         return 0;
   18454             : }
   18455             : 
   18456           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxnonpagedmemoryusage(PyObject *obj, void *closure)
   18457             : {
   18458           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18459           0 :         PyObject *py_maxnonpagedmemoryusage;
   18460           0 :         py_maxnonpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)(object->maxnonpagedmemoryusage));
   18461           0 :         return py_maxnonpagedmemoryusage;
   18462             : }
   18463             : 
   18464           0 : static int py_srvsvc_NetSrvInfo599_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   18465             : {
   18466           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18467           0 :         if (value == NULL) {
   18468           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxnonpagedmemoryusage");
   18469           0 :                 return -1;
   18470             :         }
   18471             :         {
   18472           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
   18473           0 :                 if (PyLong_Check(value)) {
   18474           0 :                         unsigned long long test_var;
   18475           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18476           0 :                         if (PyErr_Occurred() != NULL) {
   18477           0 :                                 return -1;
   18478             :                         }
   18479           0 :                         if (test_var > uint_max) {
   18480           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18481             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18482           0 :                                 return -1;
   18483             :                         }
   18484           0 :                         object->maxnonpagedmemoryusage = test_var;
   18485             :                 } else {
   18486           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18487             :                           PyLong_Type.tp_name);
   18488           0 :                         return -1;
   18489             :                 }
   18490             :         }
   18491           0 :         return 0;
   18492             : }
   18493             : 
   18494           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enablesoftcompat(PyObject *obj, void *closure)
   18495             : {
   18496           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18497           0 :         PyObject *py_enablesoftcompat;
   18498           0 :         py_enablesoftcompat = PyLong_FromUnsignedLongLong((uint32_t)(object->enablesoftcompat));
   18499           0 :         return py_enablesoftcompat;
   18500             : }
   18501             : 
   18502           0 : static int py_srvsvc_NetSrvInfo599_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
   18503             : {
   18504           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18505           0 :         if (value == NULL) {
   18506           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enablesoftcompat");
   18507           0 :                 return -1;
   18508             :         }
   18509             :         {
   18510           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
   18511           0 :                 if (PyLong_Check(value)) {
   18512           0 :                         unsigned long long test_var;
   18513           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18514           0 :                         if (PyErr_Occurred() != NULL) {
   18515           0 :                                 return -1;
   18516             :                         }
   18517           0 :                         if (test_var > uint_max) {
   18518           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18519             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18520           0 :                                 return -1;
   18521             :                         }
   18522           0 :                         object->enablesoftcompat = test_var;
   18523             :                 } else {
   18524           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18525             :                           PyLong_Type.tp_name);
   18526           0 :                         return -1;
   18527             :                 }
   18528             :         }
   18529           0 :         return 0;
   18530             : }
   18531             : 
   18532           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enableforcedlogoff(PyObject *obj, void *closure)
   18533             : {
   18534           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18535           0 :         PyObject *py_enableforcedlogoff;
   18536           0 :         py_enableforcedlogoff = PyLong_FromUnsignedLongLong((uint32_t)(object->enableforcedlogoff));
   18537           0 :         return py_enableforcedlogoff;
   18538             : }
   18539             : 
   18540           0 : static int py_srvsvc_NetSrvInfo599_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
   18541             : {
   18542           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18543           0 :         if (value == NULL) {
   18544           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableforcedlogoff");
   18545           0 :                 return -1;
   18546             :         }
   18547             :         {
   18548           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
   18549           0 :                 if (PyLong_Check(value)) {
   18550           0 :                         unsigned long long test_var;
   18551           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18552           0 :                         if (PyErr_Occurred() != NULL) {
   18553           0 :                                 return -1;
   18554             :                         }
   18555           0 :                         if (test_var > uint_max) {
   18556           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18557             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18558           0 :                                 return -1;
   18559             :                         }
   18560           0 :                         object->enableforcedlogoff = test_var;
   18561             :                 } else {
   18562           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18563             :                           PyLong_Type.tp_name);
   18564           0 :                         return -1;
   18565             :                 }
   18566             :         }
   18567           0 :         return 0;
   18568             : }
   18569             : 
   18570           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_timesource(PyObject *obj, void *closure)
   18571             : {
   18572           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18573           0 :         PyObject *py_timesource;
   18574           0 :         py_timesource = PyLong_FromUnsignedLongLong((uint32_t)(object->timesource));
   18575           0 :         return py_timesource;
   18576             : }
   18577             : 
   18578           0 : static int py_srvsvc_NetSrvInfo599_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
   18579             : {
   18580           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18581           0 :         if (value == NULL) {
   18582           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timesource");
   18583           0 :                 return -1;
   18584             :         }
   18585             :         {
   18586           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
   18587           0 :                 if (PyLong_Check(value)) {
   18588           0 :                         unsigned long long test_var;
   18589           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18590           0 :                         if (PyErr_Occurred() != NULL) {
   18591           0 :                                 return -1;
   18592             :                         }
   18593           0 :                         if (test_var > uint_max) {
   18594           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18595             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18596           0 :                                 return -1;
   18597             :                         }
   18598           0 :                         object->timesource = test_var;
   18599             :                 } else {
   18600           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18601             :                           PyLong_Type.tp_name);
   18602           0 :                         return -1;
   18603             :                 }
   18604             :         }
   18605           0 :         return 0;
   18606             : }
   18607             : 
   18608           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_acceptdownlevelapis(PyObject *obj, void *closure)
   18609             : {
   18610           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18611           0 :         PyObject *py_acceptdownlevelapis;
   18612           0 :         py_acceptdownlevelapis = PyLong_FromUnsignedLongLong((uint32_t)(object->acceptdownlevelapis));
   18613           0 :         return py_acceptdownlevelapis;
   18614             : }
   18615             : 
   18616           0 : static int py_srvsvc_NetSrvInfo599_set_acceptdownlevelapis(PyObject *py_obj, PyObject *value, void *closure)
   18617             : {
   18618           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18619           0 :         if (value == NULL) {
   18620           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->acceptdownlevelapis");
   18621           0 :                 return -1;
   18622             :         }
   18623             :         {
   18624           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acceptdownlevelapis));
   18625           0 :                 if (PyLong_Check(value)) {
   18626           0 :                         unsigned long long test_var;
   18627           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18628           0 :                         if (PyErr_Occurred() != NULL) {
   18629           0 :                                 return -1;
   18630             :                         }
   18631           0 :                         if (test_var > uint_max) {
   18632           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18633             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18634           0 :                                 return -1;
   18635             :                         }
   18636           0 :                         object->acceptdownlevelapis = test_var;
   18637             :                 } else {
   18638           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18639             :                           PyLong_Type.tp_name);
   18640           0 :                         return -1;
   18641             :                 }
   18642             :         }
   18643           0 :         return 0;
   18644             : }
   18645             : 
   18646           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_lmannounce(PyObject *obj, void *closure)
   18647             : {
   18648           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18649           0 :         PyObject *py_lmannounce;
   18650           0 :         py_lmannounce = PyLong_FromUnsignedLongLong((uint32_t)(object->lmannounce));
   18651           0 :         return py_lmannounce;
   18652             : }
   18653             : 
   18654           0 : static int py_srvsvc_NetSrvInfo599_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
   18655             : {
   18656           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18657           0 :         if (value == NULL) {
   18658           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lmannounce");
   18659           0 :                 return -1;
   18660             :         }
   18661             :         {
   18662           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
   18663           0 :                 if (PyLong_Check(value)) {
   18664           0 :                         unsigned long long test_var;
   18665           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18666           0 :                         if (PyErr_Occurred() != NULL) {
   18667           0 :                                 return -1;
   18668             :                         }
   18669           0 :                         if (test_var > uint_max) {
   18670           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18671             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18672           0 :                                 return -1;
   18673             :                         }
   18674           0 :                         object->lmannounce = test_var;
   18675             :                 } else {
   18676           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18677             :                           PyLong_Type.tp_name);
   18678           0 :                         return -1;
   18679             :                 }
   18680             :         }
   18681           0 :         return 0;
   18682             : }
   18683             : 
   18684           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_domain(PyObject *obj, void *closure)
   18685             : {
   18686           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18687           0 :         PyObject *py_domain;
   18688           0 :         if (object->domain == NULL) {
   18689           0 :                 Py_RETURN_NONE;
   18690             :         }
   18691           0 :         if (object->domain == NULL) {
   18692           0 :                 py_domain = Py_None;
   18693           0 :                 Py_INCREF(py_domain);
   18694             :         } else {
   18695           0 :                 if (object->domain == NULL) {
   18696           0 :                         py_domain = Py_None;
   18697           0 :                         Py_INCREF(py_domain);
   18698             :                 } else {
   18699           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
   18700             :                 }
   18701             :         }
   18702           0 :         return py_domain;
   18703             : }
   18704             : 
   18705           0 : static int py_srvsvc_NetSrvInfo599_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   18706             : {
   18707           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18708           0 :         if (value == NULL) {
   18709           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain");
   18710           0 :                 return -1;
   18711             :         }
   18712           0 :         if (value == Py_None) {
   18713           0 :                 object->domain = NULL;
   18714             :         } else {
   18715           0 :                 object->domain = NULL;
   18716             :                 {
   18717           0 :                         const char *test_str;
   18718           0 :                         const char *talloc_str;
   18719           0 :                         PyObject *unicode = NULL;
   18720           0 :                         if (PyUnicode_Check(value)) {
   18721           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18722           0 :                                 if (unicode == NULL) {
   18723           0 :                                         return -1;
   18724             :                                 }
   18725           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18726           0 :                         } else if (PyBytes_Check(value)) {
   18727           0 :                                 test_str = PyBytes_AS_STRING(value);
   18728             :                         } else {
   18729           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18730           0 :                                 return -1;
   18731             :                         }
   18732           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18733           0 :                         if (unicode != NULL) {
   18734           0 :                                 Py_DECREF(unicode);
   18735             :                         }
   18736           0 :                         if (talloc_str == NULL) {
   18737           0 :                                 PyErr_NoMemory();
   18738           0 :                                 return -1;
   18739             :                         }
   18740           0 :                         object->domain = talloc_str;
   18741             :                 }
   18742             :         }
   18743           0 :         return 0;
   18744             : }
   18745             : 
   18746           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxcopyreadlen(PyObject *obj, void *closure)
   18747             : {
   18748           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18749           0 :         PyObject *py_maxcopyreadlen;
   18750           0 :         py_maxcopyreadlen = PyLong_FromUnsignedLongLong((uint32_t)(object->maxcopyreadlen));
   18751           0 :         return py_maxcopyreadlen;
   18752             : }
   18753             : 
   18754           0 : static int py_srvsvc_NetSrvInfo599_set_maxcopyreadlen(PyObject *py_obj, PyObject *value, void *closure)
   18755             : {
   18756           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18757           0 :         if (value == NULL) {
   18758           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxcopyreadlen");
   18759           0 :                 return -1;
   18760             :         }
   18761             :         {
   18762           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopyreadlen));
   18763           0 :                 if (PyLong_Check(value)) {
   18764           0 :                         unsigned long long test_var;
   18765           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18766           0 :                         if (PyErr_Occurred() != NULL) {
   18767           0 :                                 return -1;
   18768             :                         }
   18769           0 :                         if (test_var > uint_max) {
   18770           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18771             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18772           0 :                                 return -1;
   18773             :                         }
   18774           0 :                         object->maxcopyreadlen = test_var;
   18775             :                 } else {
   18776           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18777             :                           PyLong_Type.tp_name);
   18778           0 :                         return -1;
   18779             :                 }
   18780             :         }
   18781           0 :         return 0;
   18782             : }
   18783             : 
   18784           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxcopywritelen(PyObject *obj, void *closure)
   18785             : {
   18786           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18787           0 :         PyObject *py_maxcopywritelen;
   18788           0 :         py_maxcopywritelen = PyLong_FromUnsignedLongLong((uint32_t)(object->maxcopywritelen));
   18789           0 :         return py_maxcopywritelen;
   18790             : }
   18791             : 
   18792           0 : static int py_srvsvc_NetSrvInfo599_set_maxcopywritelen(PyObject *py_obj, PyObject *value, void *closure)
   18793             : {
   18794           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18795           0 :         if (value == NULL) {
   18796           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxcopywritelen");
   18797           0 :                 return -1;
   18798             :         }
   18799             :         {
   18800           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopywritelen));
   18801           0 :                 if (PyLong_Check(value)) {
   18802           0 :                         unsigned long long test_var;
   18803           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18804           0 :                         if (PyErr_Occurred() != NULL) {
   18805           0 :                                 return -1;
   18806             :                         }
   18807           0 :                         if (test_var > uint_max) {
   18808           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18809             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18810           0 :                                 return -1;
   18811             :                         }
   18812           0 :                         object->maxcopywritelen = test_var;
   18813             :                 } else {
   18814           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18815             :                           PyLong_Type.tp_name);
   18816           0 :                         return -1;
   18817             :                 }
   18818             :         }
   18819           0 :         return 0;
   18820             : }
   18821             : 
   18822           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_minkeepsearch(PyObject *obj, void *closure)
   18823             : {
   18824           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18825           0 :         PyObject *py_minkeepsearch;
   18826           0 :         py_minkeepsearch = PyLong_FromUnsignedLongLong((uint32_t)(object->minkeepsearch));
   18827           0 :         return py_minkeepsearch;
   18828             : }
   18829             : 
   18830           0 : static int py_srvsvc_NetSrvInfo599_set_minkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
   18831             : {
   18832           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18833           0 :         if (value == NULL) {
   18834           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minkeepsearch");
   18835           0 :                 return -1;
   18836             :         }
   18837             :         {
   18838           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepsearch));
   18839           0 :                 if (PyLong_Check(value)) {
   18840           0 :                         unsigned long long test_var;
   18841           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18842           0 :                         if (PyErr_Occurred() != NULL) {
   18843           0 :                                 return -1;
   18844             :                         }
   18845           0 :                         if (test_var > uint_max) {
   18846           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18847             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18848           0 :                                 return -1;
   18849             :                         }
   18850           0 :                         object->minkeepsearch = test_var;
   18851             :                 } else {
   18852           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18853             :                           PyLong_Type.tp_name);
   18854           0 :                         return -1;
   18855             :                 }
   18856             :         }
   18857           0 :         return 0;
   18858             : }
   18859             : 
   18860           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_minkeepcomplsearch(PyObject *obj, void *closure)
   18861             : {
   18862           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18863           0 :         PyObject *py_minkeepcomplsearch;
   18864           0 :         py_minkeepcomplsearch = PyLong_FromUnsignedLongLong((uint32_t)(object->minkeepcomplsearch));
   18865           0 :         return py_minkeepcomplsearch;
   18866             : }
   18867             : 
   18868           0 : static int py_srvsvc_NetSrvInfo599_set_minkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
   18869             : {
   18870           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18871           0 :         if (value == NULL) {
   18872           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minkeepcomplsearch");
   18873           0 :                 return -1;
   18874             :         }
   18875             :         {
   18876           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepcomplsearch));
   18877           0 :                 if (PyLong_Check(value)) {
   18878           0 :                         unsigned long long test_var;
   18879           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18880           0 :                         if (PyErr_Occurred() != NULL) {
   18881           0 :                                 return -1;
   18882             :                         }
   18883           0 :                         if (test_var > uint_max) {
   18884           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18885             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18886           0 :                                 return -1;
   18887             :                         }
   18888           0 :                         object->minkeepcomplsearch = test_var;
   18889             :                 } else {
   18890           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18891             :                           PyLong_Type.tp_name);
   18892           0 :                         return -1;
   18893             :                 }
   18894             :         }
   18895           0 :         return 0;
   18896             : }
   18897             : 
   18898           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxkeepcomplsearch(PyObject *obj, void *closure)
   18899             : {
   18900           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18901           0 :         PyObject *py_maxkeepcomplsearch;
   18902           0 :         py_maxkeepcomplsearch = PyLong_FromUnsignedLongLong((uint32_t)(object->maxkeepcomplsearch));
   18903           0 :         return py_maxkeepcomplsearch;
   18904             : }
   18905             : 
   18906           0 : static int py_srvsvc_NetSrvInfo599_set_maxkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
   18907             : {
   18908           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18909           0 :         if (value == NULL) {
   18910           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxkeepcomplsearch");
   18911           0 :                 return -1;
   18912             :         }
   18913             :         {
   18914           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepcomplsearch));
   18915           0 :                 if (PyLong_Check(value)) {
   18916           0 :                         unsigned long long test_var;
   18917           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18918           0 :                         if (PyErr_Occurred() != NULL) {
   18919           0 :                                 return -1;
   18920             :                         }
   18921           0 :                         if (test_var > uint_max) {
   18922           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18923             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18924           0 :                                 return -1;
   18925             :                         }
   18926           0 :                         object->maxkeepcomplsearch = test_var;
   18927             :                 } else {
   18928           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18929             :                           PyLong_Type.tp_name);
   18930           0 :                         return -1;
   18931             :                 }
   18932             :         }
   18933           0 :         return 0;
   18934             : }
   18935             : 
   18936           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_threadcountadd(PyObject *obj, void *closure)
   18937             : {
   18938           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18939           0 :         PyObject *py_threadcountadd;
   18940           0 :         py_threadcountadd = PyLong_FromUnsignedLongLong((uint32_t)(object->threadcountadd));
   18941           0 :         return py_threadcountadd;
   18942             : }
   18943             : 
   18944           0 : static int py_srvsvc_NetSrvInfo599_set_threadcountadd(PyObject *py_obj, PyObject *value, void *closure)
   18945             : {
   18946           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18947           0 :         if (value == NULL) {
   18948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->threadcountadd");
   18949           0 :                 return -1;
   18950             :         }
   18951             :         {
   18952           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadcountadd));
   18953           0 :                 if (PyLong_Check(value)) {
   18954           0 :                         unsigned long long test_var;
   18955           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18956           0 :                         if (PyErr_Occurred() != NULL) {
   18957           0 :                                 return -1;
   18958             :                         }
   18959           0 :                         if (test_var > uint_max) {
   18960           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18961             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18962           0 :                                 return -1;
   18963             :                         }
   18964           0 :                         object->threadcountadd = test_var;
   18965             :                 } else {
   18966           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18967             :                           PyLong_Type.tp_name);
   18968           0 :                         return -1;
   18969             :                 }
   18970             :         }
   18971           0 :         return 0;
   18972             : }
   18973             : 
   18974           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_numlockthreads(PyObject *obj, void *closure)
   18975             : {
   18976           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   18977           0 :         PyObject *py_numlockthreads;
   18978           0 :         py_numlockthreads = PyLong_FromUnsignedLongLong((uint32_t)(object->numlockthreads));
   18979           0 :         return py_numlockthreads;
   18980             : }
   18981             : 
   18982           0 : static int py_srvsvc_NetSrvInfo599_set_numlockthreads(PyObject *py_obj, PyObject *value, void *closure)
   18983             : {
   18984           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   18985           0 :         if (value == NULL) {
   18986           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->numlockthreads");
   18987           0 :                 return -1;
   18988             :         }
   18989             :         {
   18990           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numlockthreads));
   18991           0 :                 if (PyLong_Check(value)) {
   18992           0 :                         unsigned long long test_var;
   18993           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18994           0 :                         if (PyErr_Occurred() != NULL) {
   18995           0 :                                 return -1;
   18996             :                         }
   18997           0 :                         if (test_var > uint_max) {
   18998           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18999             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19000           0 :                                 return -1;
   19001             :                         }
   19002           0 :                         object->numlockthreads = test_var;
   19003             :                 } else {
   19004           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19005             :                           PyLong_Type.tp_name);
   19006           0 :                         return -1;
   19007             :                 }
   19008             :         }
   19009           0 :         return 0;
   19010             : }
   19011             : 
   19012           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_scavtimeout(PyObject *obj, void *closure)
   19013             : {
   19014           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19015           0 :         PyObject *py_scavtimeout;
   19016           0 :         py_scavtimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->scavtimeout));
   19017           0 :         return py_scavtimeout;
   19018             : }
   19019             : 
   19020           0 : static int py_srvsvc_NetSrvInfo599_set_scavtimeout(PyObject *py_obj, PyObject *value, void *closure)
   19021             : {
   19022           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19023           0 :         if (value == NULL) {
   19024           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->scavtimeout");
   19025           0 :                 return -1;
   19026             :         }
   19027             :         {
   19028           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavtimeout));
   19029           0 :                 if (PyLong_Check(value)) {
   19030           0 :                         unsigned long long test_var;
   19031           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19032           0 :                         if (PyErr_Occurred() != NULL) {
   19033           0 :                                 return -1;
   19034             :                         }
   19035           0 :                         if (test_var > uint_max) {
   19036           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19037             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19038           0 :                                 return -1;
   19039             :                         }
   19040           0 :                         object->scavtimeout = test_var;
   19041             :                 } else {
   19042           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19043             :                           PyLong_Type.tp_name);
   19044           0 :                         return -1;
   19045             :                 }
   19046             :         }
   19047           0 :         return 0;
   19048             : }
   19049             : 
   19050           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_minrcvqueue(PyObject *obj, void *closure)
   19051             : {
   19052           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19053           0 :         PyObject *py_minrcvqueue;
   19054           0 :         py_minrcvqueue = PyLong_FromUnsignedLongLong((uint32_t)(object->minrcvqueue));
   19055           0 :         return py_minrcvqueue;
   19056             : }
   19057             : 
   19058           0 : static int py_srvsvc_NetSrvInfo599_set_minrcvqueue(PyObject *py_obj, PyObject *value, void *closure)
   19059             : {
   19060           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19061           0 :         if (value == NULL) {
   19062           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minrcvqueue");
   19063           0 :                 return -1;
   19064             :         }
   19065             :         {
   19066           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minrcvqueue));
   19067           0 :                 if (PyLong_Check(value)) {
   19068           0 :                         unsigned long long test_var;
   19069           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19070           0 :                         if (PyErr_Occurred() != NULL) {
   19071           0 :                                 return -1;
   19072             :                         }
   19073           0 :                         if (test_var > uint_max) {
   19074           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19075             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19076           0 :                                 return -1;
   19077             :                         }
   19078           0 :                         object->minrcvqueue = test_var;
   19079             :                 } else {
   19080           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19081             :                           PyLong_Type.tp_name);
   19082           0 :                         return -1;
   19083             :                 }
   19084             :         }
   19085           0 :         return 0;
   19086             : }
   19087             : 
   19088           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_minfreeworkitems(PyObject *obj, void *closure)
   19089             : {
   19090           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19091           0 :         PyObject *py_minfreeworkitems;
   19092           0 :         py_minfreeworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->minfreeworkitems));
   19093           0 :         return py_minfreeworkitems;
   19094             : }
   19095             : 
   19096           0 : static int py_srvsvc_NetSrvInfo599_set_minfreeworkitems(PyObject *py_obj, PyObject *value, void *closure)
   19097             : {
   19098           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19099           0 :         if (value == NULL) {
   19100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minfreeworkitems");
   19101           0 :                 return -1;
   19102             :         }
   19103             :         {
   19104           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeworkitems));
   19105           0 :                 if (PyLong_Check(value)) {
   19106           0 :                         unsigned long long test_var;
   19107           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19108           0 :                         if (PyErr_Occurred() != NULL) {
   19109           0 :                                 return -1;
   19110             :                         }
   19111           0 :                         if (test_var > uint_max) {
   19112           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19113             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19114           0 :                                 return -1;
   19115             :                         }
   19116           0 :                         object->minfreeworkitems = test_var;
   19117             :                 } else {
   19118           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19119             :                           PyLong_Type.tp_name);
   19120           0 :                         return -1;
   19121             :                 }
   19122             :         }
   19123           0 :         return 0;
   19124             : }
   19125             : 
   19126           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_xactmemsize(PyObject *obj, void *closure)
   19127             : {
   19128           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19129           0 :         PyObject *py_xactmemsize;
   19130           0 :         py_xactmemsize = PyLong_FromUnsignedLongLong((uint32_t)(object->xactmemsize));
   19131           0 :         return py_xactmemsize;
   19132             : }
   19133             : 
   19134           0 : static int py_srvsvc_NetSrvInfo599_set_xactmemsize(PyObject *py_obj, PyObject *value, void *closure)
   19135             : {
   19136           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19137           0 :         if (value == NULL) {
   19138           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->xactmemsize");
   19139           0 :                 return -1;
   19140             :         }
   19141             :         {
   19142           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->xactmemsize));
   19143           0 :                 if (PyLong_Check(value)) {
   19144           0 :                         unsigned long long test_var;
   19145           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19146           0 :                         if (PyErr_Occurred() != NULL) {
   19147           0 :                                 return -1;
   19148             :                         }
   19149           0 :                         if (test_var > uint_max) {
   19150           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19151             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19152           0 :                                 return -1;
   19153             :                         }
   19154           0 :                         object->xactmemsize = test_var;
   19155             :                 } else {
   19156           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19157             :                           PyLong_Type.tp_name);
   19158           0 :                         return -1;
   19159             :                 }
   19160             :         }
   19161           0 :         return 0;
   19162             : }
   19163             : 
   19164           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_threadpriority(PyObject *obj, void *closure)
   19165             : {
   19166           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19167           0 :         PyObject *py_threadpriority;
   19168           0 :         py_threadpriority = PyLong_FromUnsignedLongLong((uint32_t)(object->threadpriority));
   19169           0 :         return py_threadpriority;
   19170             : }
   19171             : 
   19172           0 : static int py_srvsvc_NetSrvInfo599_set_threadpriority(PyObject *py_obj, PyObject *value, void *closure)
   19173             : {
   19174           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19175           0 :         if (value == NULL) {
   19176           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->threadpriority");
   19177           0 :                 return -1;
   19178             :         }
   19179             :         {
   19180           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadpriority));
   19181           0 :                 if (PyLong_Check(value)) {
   19182           0 :                         unsigned long long test_var;
   19183           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19184           0 :                         if (PyErr_Occurred() != NULL) {
   19185           0 :                                 return -1;
   19186             :                         }
   19187           0 :                         if (test_var > uint_max) {
   19188           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19189             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19190           0 :                                 return -1;
   19191             :                         }
   19192           0 :                         object->threadpriority = test_var;
   19193             :                 } else {
   19194           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19195             :                           PyLong_Type.tp_name);
   19196           0 :                         return -1;
   19197             :                 }
   19198             :         }
   19199           0 :         return 0;
   19200             : }
   19201             : 
   19202           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxmpxct(PyObject *obj, void *closure)
   19203             : {
   19204           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19205           0 :         PyObject *py_maxmpxct;
   19206           0 :         py_maxmpxct = PyLong_FromUnsignedLongLong((uint32_t)(object->maxmpxct));
   19207           0 :         return py_maxmpxct;
   19208             : }
   19209             : 
   19210           0 : static int py_srvsvc_NetSrvInfo599_set_maxmpxct(PyObject *py_obj, PyObject *value, void *closure)
   19211             : {
   19212           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19213           0 :         if (value == NULL) {
   19214           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxmpxct");
   19215           0 :                 return -1;
   19216             :         }
   19217             :         {
   19218           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxmpxct));
   19219           0 :                 if (PyLong_Check(value)) {
   19220           0 :                         unsigned long long test_var;
   19221           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19222           0 :                         if (PyErr_Occurred() != NULL) {
   19223           0 :                                 return -1;
   19224             :                         }
   19225           0 :                         if (test_var > uint_max) {
   19226           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19227             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19228           0 :                                 return -1;
   19229             :                         }
   19230           0 :                         object->maxmpxct = test_var;
   19231             :                 } else {
   19232           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19233             :                           PyLong_Type.tp_name);
   19234           0 :                         return -1;
   19235             :                 }
   19236             :         }
   19237           0 :         return 0;
   19238             : }
   19239             : 
   19240           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_oplockbreakwait(PyObject *obj, void *closure)
   19241             : {
   19242           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19243           0 :         PyObject *py_oplockbreakwait;
   19244           0 :         py_oplockbreakwait = PyLong_FromUnsignedLongLong((uint32_t)(object->oplockbreakwait));
   19245           0 :         return py_oplockbreakwait;
   19246             : }
   19247             : 
   19248           0 : static int py_srvsvc_NetSrvInfo599_set_oplockbreakwait(PyObject *py_obj, PyObject *value, void *closure)
   19249             : {
   19250           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19251           0 :         if (value == NULL) {
   19252           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->oplockbreakwait");
   19253           0 :                 return -1;
   19254             :         }
   19255             :         {
   19256           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakwait));
   19257           0 :                 if (PyLong_Check(value)) {
   19258           0 :                         unsigned long long test_var;
   19259           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19260           0 :                         if (PyErr_Occurred() != NULL) {
   19261           0 :                                 return -1;
   19262             :                         }
   19263           0 :                         if (test_var > uint_max) {
   19264           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19265             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19266           0 :                                 return -1;
   19267             :                         }
   19268           0 :                         object->oplockbreakwait = test_var;
   19269             :                 } else {
   19270           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19271             :                           PyLong_Type.tp_name);
   19272           0 :                         return -1;
   19273             :                 }
   19274             :         }
   19275           0 :         return 0;
   19276             : }
   19277             : 
   19278           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_oplockbreakresponsewait(PyObject *obj, void *closure)
   19279             : {
   19280           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19281           0 :         PyObject *py_oplockbreakresponsewait;
   19282           0 :         py_oplockbreakresponsewait = PyLong_FromUnsignedLongLong((uint32_t)(object->oplockbreakresponsewait));
   19283           0 :         return py_oplockbreakresponsewait;
   19284             : }
   19285             : 
   19286           0 : static int py_srvsvc_NetSrvInfo599_set_oplockbreakresponsewait(PyObject *py_obj, PyObject *value, void *closure)
   19287             : {
   19288           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19289           0 :         if (value == NULL) {
   19290           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->oplockbreakresponsewait");
   19291           0 :                 return -1;
   19292             :         }
   19293             :         {
   19294           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakresponsewait));
   19295           0 :                 if (PyLong_Check(value)) {
   19296           0 :                         unsigned long long test_var;
   19297           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19298           0 :                         if (PyErr_Occurred() != NULL) {
   19299           0 :                                 return -1;
   19300             :                         }
   19301           0 :                         if (test_var > uint_max) {
   19302           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19303             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19304           0 :                                 return -1;
   19305             :                         }
   19306           0 :                         object->oplockbreakresponsewait = test_var;
   19307             :                 } else {
   19308           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19309             :                           PyLong_Type.tp_name);
   19310           0 :                         return -1;
   19311             :                 }
   19312             :         }
   19313           0 :         return 0;
   19314             : }
   19315             : 
   19316           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enableoplocks(PyObject *obj, void *closure)
   19317             : {
   19318           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19319           0 :         PyObject *py_enableoplocks;
   19320           0 :         py_enableoplocks = PyLong_FromUnsignedLongLong((uint32_t)(object->enableoplocks));
   19321           0 :         return py_enableoplocks;
   19322             : }
   19323             : 
   19324           0 : static int py_srvsvc_NetSrvInfo599_set_enableoplocks(PyObject *py_obj, PyObject *value, void *closure)
   19325             : {
   19326           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19327           0 :         if (value == NULL) {
   19328           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableoplocks");
   19329           0 :                 return -1;
   19330             :         }
   19331             :         {
   19332           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplocks));
   19333           0 :                 if (PyLong_Check(value)) {
   19334           0 :                         unsigned long long test_var;
   19335           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19336           0 :                         if (PyErr_Occurred() != NULL) {
   19337           0 :                                 return -1;
   19338             :                         }
   19339           0 :                         if (test_var > uint_max) {
   19340           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19341             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19342           0 :                                 return -1;
   19343             :                         }
   19344           0 :                         object->enableoplocks = test_var;
   19345             :                 } else {
   19346           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19347             :                           PyLong_Type.tp_name);
   19348           0 :                         return -1;
   19349             :                 }
   19350             :         }
   19351           0 :         return 0;
   19352             : }
   19353             : 
   19354           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enableoplockforceclose(PyObject *obj, void *closure)
   19355             : {
   19356           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19357           0 :         PyObject *py_enableoplockforceclose;
   19358           0 :         py_enableoplockforceclose = PyLong_FromUnsignedLongLong((uint32_t)(object->enableoplockforceclose));
   19359           0 :         return py_enableoplockforceclose;
   19360             : }
   19361             : 
   19362           0 : static int py_srvsvc_NetSrvInfo599_set_enableoplockforceclose(PyObject *py_obj, PyObject *value, void *closure)
   19363             : {
   19364           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19365           0 :         if (value == NULL) {
   19366           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableoplockforceclose");
   19367           0 :                 return -1;
   19368             :         }
   19369             :         {
   19370           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplockforceclose));
   19371           0 :                 if (PyLong_Check(value)) {
   19372           0 :                         unsigned long long test_var;
   19373           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19374           0 :                         if (PyErr_Occurred() != NULL) {
   19375           0 :                                 return -1;
   19376             :                         }
   19377           0 :                         if (test_var > uint_max) {
   19378           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19379             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19380           0 :                                 return -1;
   19381             :                         }
   19382           0 :                         object->enableoplockforceclose = test_var;
   19383             :                 } else {
   19384           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19385             :                           PyLong_Type.tp_name);
   19386           0 :                         return -1;
   19387             :                 }
   19388             :         }
   19389           0 :         return 0;
   19390             : }
   19391             : 
   19392           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enablefcbopens(PyObject *obj, void *closure)
   19393             : {
   19394           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19395           0 :         PyObject *py_enablefcbopens;
   19396           0 :         py_enablefcbopens = PyLong_FromUnsignedLongLong((uint32_t)(object->enablefcbopens));
   19397           0 :         return py_enablefcbopens;
   19398             : }
   19399             : 
   19400           0 : static int py_srvsvc_NetSrvInfo599_set_enablefcbopens(PyObject *py_obj, PyObject *value, void *closure)
   19401             : {
   19402           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19403           0 :         if (value == NULL) {
   19404           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enablefcbopens");
   19405           0 :                 return -1;
   19406             :         }
   19407             :         {
   19408           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablefcbopens));
   19409           0 :                 if (PyLong_Check(value)) {
   19410           0 :                         unsigned long long test_var;
   19411           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19412           0 :                         if (PyErr_Occurred() != NULL) {
   19413           0 :                                 return -1;
   19414             :                         }
   19415           0 :                         if (test_var > uint_max) {
   19416           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19417             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19418           0 :                                 return -1;
   19419             :                         }
   19420           0 :                         object->enablefcbopens = test_var;
   19421             :                 } else {
   19422           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19423             :                           PyLong_Type.tp_name);
   19424           0 :                         return -1;
   19425             :                 }
   19426             :         }
   19427           0 :         return 0;
   19428             : }
   19429             : 
   19430           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enableraw(PyObject *obj, void *closure)
   19431             : {
   19432           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19433           0 :         PyObject *py_enableraw;
   19434           0 :         py_enableraw = PyLong_FromUnsignedLongLong((uint32_t)(object->enableraw));
   19435           0 :         return py_enableraw;
   19436             : }
   19437             : 
   19438           0 : static int py_srvsvc_NetSrvInfo599_set_enableraw(PyObject *py_obj, PyObject *value, void *closure)
   19439             : {
   19440           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19441           0 :         if (value == NULL) {
   19442           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableraw");
   19443           0 :                 return -1;
   19444             :         }
   19445             :         {
   19446           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableraw));
   19447           0 :                 if (PyLong_Check(value)) {
   19448           0 :                         unsigned long long test_var;
   19449           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19450           0 :                         if (PyErr_Occurred() != NULL) {
   19451           0 :                                 return -1;
   19452             :                         }
   19453           0 :                         if (test_var > uint_max) {
   19454           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19455             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19456           0 :                                 return -1;
   19457             :                         }
   19458           0 :                         object->enableraw = test_var;
   19459             :                 } else {
   19460           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19461             :                           PyLong_Type.tp_name);
   19462           0 :                         return -1;
   19463             :                 }
   19464             :         }
   19465           0 :         return 0;
   19466             : }
   19467             : 
   19468           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enablesharednetdrives(PyObject *obj, void *closure)
   19469             : {
   19470           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19471           0 :         PyObject *py_enablesharednetdrives;
   19472           0 :         py_enablesharednetdrives = PyLong_FromUnsignedLongLong((uint32_t)(object->enablesharednetdrives));
   19473           0 :         return py_enablesharednetdrives;
   19474             : }
   19475             : 
   19476           0 : static int py_srvsvc_NetSrvInfo599_set_enablesharednetdrives(PyObject *py_obj, PyObject *value, void *closure)
   19477             : {
   19478           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19479           0 :         if (value == NULL) {
   19480           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enablesharednetdrives");
   19481           0 :                 return -1;
   19482             :         }
   19483             :         {
   19484           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesharednetdrives));
   19485           0 :                 if (PyLong_Check(value)) {
   19486           0 :                         unsigned long long test_var;
   19487           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19488           0 :                         if (PyErr_Occurred() != NULL) {
   19489           0 :                                 return -1;
   19490             :                         }
   19491           0 :                         if (test_var > uint_max) {
   19492           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19493             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19494           0 :                                 return -1;
   19495             :                         }
   19496           0 :                         object->enablesharednetdrives = test_var;
   19497             :                 } else {
   19498           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19499             :                           PyLong_Type.tp_name);
   19500           0 :                         return -1;
   19501             :                 }
   19502             :         }
   19503           0 :         return 0;
   19504             : }
   19505             : 
   19506           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_minfreeconnections(PyObject *obj, void *closure)
   19507             : {
   19508           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19509           0 :         PyObject *py_minfreeconnections;
   19510           0 :         py_minfreeconnections = PyLong_FromUnsignedLongLong((uint32_t)(object->minfreeconnections));
   19511           0 :         return py_minfreeconnections;
   19512             : }
   19513             : 
   19514           0 : static int py_srvsvc_NetSrvInfo599_set_minfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
   19515             : {
   19516           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19517           0 :         if (value == NULL) {
   19518           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minfreeconnections");
   19519           0 :                 return -1;
   19520             :         }
   19521             :         {
   19522           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeconnections));
   19523           0 :                 if (PyLong_Check(value)) {
   19524           0 :                         unsigned long long test_var;
   19525           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19526           0 :                         if (PyErr_Occurred() != NULL) {
   19527           0 :                                 return -1;
   19528             :                         }
   19529           0 :                         if (test_var > uint_max) {
   19530           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19531             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19532           0 :                                 return -1;
   19533             :                         }
   19534           0 :                         object->minfreeconnections = test_var;
   19535             :                 } else {
   19536           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19537             :                           PyLong_Type.tp_name);
   19538           0 :                         return -1;
   19539             :                 }
   19540             :         }
   19541           0 :         return 0;
   19542             : }
   19543             : 
   19544           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxfreeconnections(PyObject *obj, void *closure)
   19545             : {
   19546           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19547           0 :         PyObject *py_maxfreeconnections;
   19548           0 :         py_maxfreeconnections = PyLong_FromUnsignedLongLong((uint32_t)(object->maxfreeconnections));
   19549           0 :         return py_maxfreeconnections;
   19550             : }
   19551             : 
   19552           0 : static int py_srvsvc_NetSrvInfo599_set_maxfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
   19553             : {
   19554           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19555           0 :         if (value == NULL) {
   19556           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxfreeconnections");
   19557           0 :                 return -1;
   19558             :         }
   19559             :         {
   19560           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxfreeconnections));
   19561           0 :                 if (PyLong_Check(value)) {
   19562           0 :                         unsigned long long test_var;
   19563           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19564           0 :                         if (PyErr_Occurred() != NULL) {
   19565           0 :                                 return -1;
   19566             :                         }
   19567           0 :                         if (test_var > uint_max) {
   19568           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19569             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19570           0 :                                 return -1;
   19571             :                         }
   19572           0 :                         object->maxfreeconnections = test_var;
   19573             :                 } else {
   19574           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19575             :                           PyLong_Type.tp_name);
   19576           0 :                         return -1;
   19577             :                 }
   19578             :         }
   19579           0 :         return 0;
   19580             : }
   19581             : 
   19582           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_initsesstable(PyObject *obj, void *closure)
   19583             : {
   19584           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19585           0 :         PyObject *py_initsesstable;
   19586           0 :         py_initsesstable = PyLong_FromUnsignedLongLong((uint32_t)(object->initsesstable));
   19587           0 :         return py_initsesstable;
   19588             : }
   19589             : 
   19590           0 : static int py_srvsvc_NetSrvInfo599_set_initsesstable(PyObject *py_obj, PyObject *value, void *closure)
   19591             : {
   19592           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19593           0 :         if (value == NULL) {
   19594           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->initsesstable");
   19595           0 :                 return -1;
   19596             :         }
   19597             :         {
   19598           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsesstable));
   19599           0 :                 if (PyLong_Check(value)) {
   19600           0 :                         unsigned long long test_var;
   19601           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19602           0 :                         if (PyErr_Occurred() != NULL) {
   19603           0 :                                 return -1;
   19604             :                         }
   19605           0 :                         if (test_var > uint_max) {
   19606           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19607             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19608           0 :                                 return -1;
   19609             :                         }
   19610           0 :                         object->initsesstable = test_var;
   19611             :                 } else {
   19612           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19613             :                           PyLong_Type.tp_name);
   19614           0 :                         return -1;
   19615             :                 }
   19616             :         }
   19617           0 :         return 0;
   19618             : }
   19619             : 
   19620           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_initconntable(PyObject *obj, void *closure)
   19621             : {
   19622           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19623           0 :         PyObject *py_initconntable;
   19624           0 :         py_initconntable = PyLong_FromUnsignedLongLong((uint32_t)(object->initconntable));
   19625           0 :         return py_initconntable;
   19626             : }
   19627             : 
   19628           0 : static int py_srvsvc_NetSrvInfo599_set_initconntable(PyObject *py_obj, PyObject *value, void *closure)
   19629             : {
   19630           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19631           0 :         if (value == NULL) {
   19632           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->initconntable");
   19633           0 :                 return -1;
   19634             :         }
   19635             :         {
   19636           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initconntable));
   19637           0 :                 if (PyLong_Check(value)) {
   19638           0 :                         unsigned long long test_var;
   19639           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19640           0 :                         if (PyErr_Occurred() != NULL) {
   19641           0 :                                 return -1;
   19642             :                         }
   19643           0 :                         if (test_var > uint_max) {
   19644           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19645             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19646           0 :                                 return -1;
   19647             :                         }
   19648           0 :                         object->initconntable = test_var;
   19649             :                 } else {
   19650           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19651             :                           PyLong_Type.tp_name);
   19652           0 :                         return -1;
   19653             :                 }
   19654             :         }
   19655           0 :         return 0;
   19656             : }
   19657             : 
   19658           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_initfiletable(PyObject *obj, void *closure)
   19659             : {
   19660           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19661           0 :         PyObject *py_initfiletable;
   19662           0 :         py_initfiletable = PyLong_FromUnsignedLongLong((uint32_t)(object->initfiletable));
   19663           0 :         return py_initfiletable;
   19664             : }
   19665             : 
   19666           0 : static int py_srvsvc_NetSrvInfo599_set_initfiletable(PyObject *py_obj, PyObject *value, void *closure)
   19667             : {
   19668           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19669           0 :         if (value == NULL) {
   19670           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->initfiletable");
   19671           0 :                 return -1;
   19672             :         }
   19673             :         {
   19674           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initfiletable));
   19675           0 :                 if (PyLong_Check(value)) {
   19676           0 :                         unsigned long long test_var;
   19677           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19678           0 :                         if (PyErr_Occurred() != NULL) {
   19679           0 :                                 return -1;
   19680             :                         }
   19681           0 :                         if (test_var > uint_max) {
   19682           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19683             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19684           0 :                                 return -1;
   19685             :                         }
   19686           0 :                         object->initfiletable = test_var;
   19687             :                 } else {
   19688           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19689             :                           PyLong_Type.tp_name);
   19690           0 :                         return -1;
   19691             :                 }
   19692             :         }
   19693           0 :         return 0;
   19694             : }
   19695             : 
   19696           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_initsearchtable(PyObject *obj, void *closure)
   19697             : {
   19698           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19699           0 :         PyObject *py_initsearchtable;
   19700           0 :         py_initsearchtable = PyLong_FromUnsignedLongLong((uint32_t)(object->initsearchtable));
   19701           0 :         return py_initsearchtable;
   19702             : }
   19703             : 
   19704           0 : static int py_srvsvc_NetSrvInfo599_set_initsearchtable(PyObject *py_obj, PyObject *value, void *closure)
   19705             : {
   19706           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19707           0 :         if (value == NULL) {
   19708           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->initsearchtable");
   19709           0 :                 return -1;
   19710             :         }
   19711             :         {
   19712           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsearchtable));
   19713           0 :                 if (PyLong_Check(value)) {
   19714           0 :                         unsigned long long test_var;
   19715           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19716           0 :                         if (PyErr_Occurred() != NULL) {
   19717           0 :                                 return -1;
   19718             :                         }
   19719           0 :                         if (test_var > uint_max) {
   19720           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19721             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19722           0 :                                 return -1;
   19723             :                         }
   19724           0 :                         object->initsearchtable = test_var;
   19725             :                 } else {
   19726           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19727             :                           PyLong_Type.tp_name);
   19728           0 :                         return -1;
   19729             :                 }
   19730             :         }
   19731           0 :         return 0;
   19732             : }
   19733             : 
   19734           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_alertsched(PyObject *obj, void *closure)
   19735             : {
   19736           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19737           0 :         PyObject *py_alertsched;
   19738           0 :         py_alertsched = PyLong_FromUnsignedLongLong((uint32_t)(object->alertsched));
   19739           0 :         return py_alertsched;
   19740             : }
   19741             : 
   19742           0 : static int py_srvsvc_NetSrvInfo599_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
   19743             : {
   19744           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19745           0 :         if (value == NULL) {
   19746           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->alertsched");
   19747           0 :                 return -1;
   19748             :         }
   19749             :         {
   19750           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
   19751           0 :                 if (PyLong_Check(value)) {
   19752           0 :                         unsigned long long test_var;
   19753           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19754           0 :                         if (PyErr_Occurred() != NULL) {
   19755           0 :                                 return -1;
   19756             :                         }
   19757           0 :                         if (test_var > uint_max) {
   19758           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19759             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19760           0 :                                 return -1;
   19761             :                         }
   19762           0 :                         object->alertsched = test_var;
   19763             :                 } else {
   19764           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19765             :                           PyLong_Type.tp_name);
   19766           0 :                         return -1;
   19767             :                 }
   19768             :         }
   19769           0 :         return 0;
   19770             : }
   19771             : 
   19772           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_errortreshold(PyObject *obj, void *closure)
   19773             : {
   19774           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19775           0 :         PyObject *py_errortreshold;
   19776           0 :         py_errortreshold = PyLong_FromUnsignedLongLong((uint32_t)(object->errortreshold));
   19777           0 :         return py_errortreshold;
   19778             : }
   19779             : 
   19780           0 : static int py_srvsvc_NetSrvInfo599_set_errortreshold(PyObject *py_obj, PyObject *value, void *closure)
   19781             : {
   19782           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19783           0 :         if (value == NULL) {
   19784           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->errortreshold");
   19785           0 :                 return -1;
   19786             :         }
   19787             :         {
   19788           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->errortreshold));
   19789           0 :                 if (PyLong_Check(value)) {
   19790           0 :                         unsigned long long test_var;
   19791           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19792           0 :                         if (PyErr_Occurred() != NULL) {
   19793           0 :                                 return -1;
   19794             :                         }
   19795           0 :                         if (test_var > uint_max) {
   19796           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19797             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19798           0 :                                 return -1;
   19799             :                         }
   19800           0 :                         object->errortreshold = test_var;
   19801             :                 } else {
   19802           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19803             :                           PyLong_Type.tp_name);
   19804           0 :                         return -1;
   19805             :                 }
   19806             :         }
   19807           0 :         return 0;
   19808             : }
   19809             : 
   19810           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_networkerrortreshold(PyObject *obj, void *closure)
   19811             : {
   19812           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19813           0 :         PyObject *py_networkerrortreshold;
   19814           0 :         py_networkerrortreshold = PyLong_FromUnsignedLongLong((uint32_t)(object->networkerrortreshold));
   19815           0 :         return py_networkerrortreshold;
   19816             : }
   19817             : 
   19818           0 : static int py_srvsvc_NetSrvInfo599_set_networkerrortreshold(PyObject *py_obj, PyObject *value, void *closure)
   19819             : {
   19820           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19821           0 :         if (value == NULL) {
   19822           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->networkerrortreshold");
   19823           0 :                 return -1;
   19824             :         }
   19825             :         {
   19826           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->networkerrortreshold));
   19827           0 :                 if (PyLong_Check(value)) {
   19828           0 :                         unsigned long long test_var;
   19829           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19830           0 :                         if (PyErr_Occurred() != NULL) {
   19831           0 :                                 return -1;
   19832             :                         }
   19833           0 :                         if (test_var > uint_max) {
   19834           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19835             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19836           0 :                                 return -1;
   19837             :                         }
   19838           0 :                         object->networkerrortreshold = test_var;
   19839             :                 } else {
   19840           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19841             :                           PyLong_Type.tp_name);
   19842           0 :                         return -1;
   19843             :                 }
   19844             :         }
   19845           0 :         return 0;
   19846             : }
   19847             : 
   19848           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_diskspacetreshold(PyObject *obj, void *closure)
   19849             : {
   19850           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19851           0 :         PyObject *py_diskspacetreshold;
   19852           0 :         py_diskspacetreshold = PyLong_FromUnsignedLongLong((uint32_t)(object->diskspacetreshold));
   19853           0 :         return py_diskspacetreshold;
   19854             : }
   19855             : 
   19856           0 : static int py_srvsvc_NetSrvInfo599_set_diskspacetreshold(PyObject *py_obj, PyObject *value, void *closure)
   19857             : {
   19858           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19859           0 :         if (value == NULL) {
   19860           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->diskspacetreshold");
   19861           0 :                 return -1;
   19862             :         }
   19863             :         {
   19864           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskspacetreshold));
   19865           0 :                 if (PyLong_Check(value)) {
   19866           0 :                         unsigned long long test_var;
   19867           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19868           0 :                         if (PyErr_Occurred() != NULL) {
   19869           0 :                                 return -1;
   19870             :                         }
   19871           0 :                         if (test_var > uint_max) {
   19872           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19873             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19874           0 :                                 return -1;
   19875             :                         }
   19876           0 :                         object->diskspacetreshold = test_var;
   19877             :                 } else {
   19878           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19879             :                           PyLong_Type.tp_name);
   19880           0 :                         return -1;
   19881             :                 }
   19882             :         }
   19883           0 :         return 0;
   19884             : }
   19885             : 
   19886           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_reserved(PyObject *obj, void *closure)
   19887             : {
   19888           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19889           0 :         PyObject *py_reserved;
   19890           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
   19891           0 :         return py_reserved;
   19892             : }
   19893             : 
   19894           0 : static int py_srvsvc_NetSrvInfo599_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   19895             : {
   19896           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19897           0 :         if (value == NULL) {
   19898           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reserved");
   19899           0 :                 return -1;
   19900             :         }
   19901             :         {
   19902           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
   19903           0 :                 if (PyLong_Check(value)) {
   19904           0 :                         unsigned long long test_var;
   19905           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19906           0 :                         if (PyErr_Occurred() != NULL) {
   19907           0 :                                 return -1;
   19908             :                         }
   19909           0 :                         if (test_var > uint_max) {
   19910           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19911             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19912           0 :                                 return -1;
   19913             :                         }
   19914           0 :                         object->reserved = test_var;
   19915             :                 } else {
   19916           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19917             :                           PyLong_Type.tp_name);
   19918           0 :                         return -1;
   19919             :                 }
   19920             :         }
   19921           0 :         return 0;
   19922             : }
   19923             : 
   19924           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxlinkdelay(PyObject *obj, void *closure)
   19925             : {
   19926           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19927           0 :         PyObject *py_maxlinkdelay;
   19928           0 :         py_maxlinkdelay = PyLong_FromUnsignedLongLong((uint32_t)(object->maxlinkdelay));
   19929           0 :         return py_maxlinkdelay;
   19930             : }
   19931             : 
   19932           0 : static int py_srvsvc_NetSrvInfo599_set_maxlinkdelay(PyObject *py_obj, PyObject *value, void *closure)
   19933             : {
   19934           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19935           0 :         if (value == NULL) {
   19936           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxlinkdelay");
   19937           0 :                 return -1;
   19938             :         }
   19939             :         {
   19940           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlinkdelay));
   19941           0 :                 if (PyLong_Check(value)) {
   19942           0 :                         unsigned long long test_var;
   19943           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19944           0 :                         if (PyErr_Occurred() != NULL) {
   19945           0 :                                 return -1;
   19946             :                         }
   19947           0 :                         if (test_var > uint_max) {
   19948           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19949             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19950           0 :                                 return -1;
   19951             :                         }
   19952           0 :                         object->maxlinkdelay = test_var;
   19953             :                 } else {
   19954           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19955             :                           PyLong_Type.tp_name);
   19956           0 :                         return -1;
   19957             :                 }
   19958             :         }
   19959           0 :         return 0;
   19960             : }
   19961             : 
   19962           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_minlinkthroughput(PyObject *obj, void *closure)
   19963             : {
   19964           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   19965           0 :         PyObject *py_minlinkthroughput;
   19966           0 :         py_minlinkthroughput = PyLong_FromUnsignedLongLong((uint32_t)(object->minlinkthroughput));
   19967           0 :         return py_minlinkthroughput;
   19968             : }
   19969             : 
   19970           0 : static int py_srvsvc_NetSrvInfo599_set_minlinkthroughput(PyObject *py_obj, PyObject *value, void *closure)
   19971             : {
   19972           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   19973           0 :         if (value == NULL) {
   19974           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minlinkthroughput");
   19975           0 :                 return -1;
   19976             :         }
   19977             :         {
   19978           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minlinkthroughput));
   19979           0 :                 if (PyLong_Check(value)) {
   19980           0 :                         unsigned long long test_var;
   19981           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19982           0 :                         if (PyErr_Occurred() != NULL) {
   19983           0 :                                 return -1;
   19984             :                         }
   19985           0 :                         if (test_var > uint_max) {
   19986           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19987             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19988           0 :                                 return -1;
   19989             :                         }
   19990           0 :                         object->minlinkthroughput = test_var;
   19991             :                 } else {
   19992           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19993             :                           PyLong_Type.tp_name);
   19994           0 :                         return -1;
   19995             :                 }
   19996             :         }
   19997           0 :         return 0;
   19998             : }
   19999             : 
   20000           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_linkinfovalidtime(PyObject *obj, void *closure)
   20001             : {
   20002           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   20003           0 :         PyObject *py_linkinfovalidtime;
   20004           0 :         py_linkinfovalidtime = PyLong_FromUnsignedLongLong((uint32_t)(object->linkinfovalidtime));
   20005           0 :         return py_linkinfovalidtime;
   20006             : }
   20007             : 
   20008           0 : static int py_srvsvc_NetSrvInfo599_set_linkinfovalidtime(PyObject *py_obj, PyObject *value, void *closure)
   20009             : {
   20010           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   20011           0 :         if (value == NULL) {
   20012           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->linkinfovalidtime");
   20013           0 :                 return -1;
   20014             :         }
   20015             :         {
   20016           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->linkinfovalidtime));
   20017           0 :                 if (PyLong_Check(value)) {
   20018           0 :                         unsigned long long test_var;
   20019           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20020           0 :                         if (PyErr_Occurred() != NULL) {
   20021           0 :                                 return -1;
   20022             :                         }
   20023           0 :                         if (test_var > uint_max) {
   20024           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20025             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20026           0 :                                 return -1;
   20027             :                         }
   20028           0 :                         object->linkinfovalidtime = test_var;
   20029             :                 } else {
   20030           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20031             :                           PyLong_Type.tp_name);
   20032           0 :                         return -1;
   20033             :                 }
   20034             :         }
   20035           0 :         return 0;
   20036             : }
   20037             : 
   20038           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_scavqosinfoupdatetime(PyObject *obj, void *closure)
   20039             : {
   20040           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   20041           0 :         PyObject *py_scavqosinfoupdatetime;
   20042           0 :         py_scavqosinfoupdatetime = PyLong_FromUnsignedLongLong((uint32_t)(object->scavqosinfoupdatetime));
   20043           0 :         return py_scavqosinfoupdatetime;
   20044             : }
   20045             : 
   20046           0 : static int py_srvsvc_NetSrvInfo599_set_scavqosinfoupdatetime(PyObject *py_obj, PyObject *value, void *closure)
   20047             : {
   20048           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   20049           0 :         if (value == NULL) {
   20050           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->scavqosinfoupdatetime");
   20051           0 :                 return -1;
   20052             :         }
   20053             :         {
   20054           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavqosinfoupdatetime));
   20055           0 :                 if (PyLong_Check(value)) {
   20056           0 :                         unsigned long long test_var;
   20057           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20058           0 :                         if (PyErr_Occurred() != NULL) {
   20059           0 :                                 return -1;
   20060             :                         }
   20061           0 :                         if (test_var > uint_max) {
   20062           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20063             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20064           0 :                                 return -1;
   20065             :                         }
   20066           0 :                         object->scavqosinfoupdatetime = test_var;
   20067             :                 } else {
   20068           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20069             :                           PyLong_Type.tp_name);
   20070           0 :                         return -1;
   20071             :                 }
   20072             :         }
   20073           0 :         return 0;
   20074             : }
   20075             : 
   20076           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxworkitemidletime(PyObject *obj, void *closure)
   20077             : {
   20078           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(obj);
   20079           0 :         PyObject *py_maxworkitemidletime;
   20080           0 :         py_maxworkitemidletime = PyLong_FromUnsignedLongLong((uint32_t)(object->maxworkitemidletime));
   20081           0 :         return py_maxworkitemidletime;
   20082             : }
   20083             : 
   20084           0 : static int py_srvsvc_NetSrvInfo599_set_maxworkitemidletime(PyObject *py_obj, PyObject *value, void *closure)
   20085             : {
   20086           0 :         struct srvsvc_NetSrvInfo599 *object = pytalloc_get_ptr(py_obj);
   20087           0 :         if (value == NULL) {
   20088           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxworkitemidletime");
   20089           0 :                 return -1;
   20090             :         }
   20091             :         {
   20092           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitemidletime));
   20093           0 :                 if (PyLong_Check(value)) {
   20094           0 :                         unsigned long long test_var;
   20095           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20096           0 :                         if (PyErr_Occurred() != NULL) {
   20097           0 :                                 return -1;
   20098             :                         }
   20099           0 :                         if (test_var > uint_max) {
   20100           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20101             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20102           0 :                                 return -1;
   20103             :                         }
   20104           0 :                         object->maxworkitemidletime = test_var;
   20105             :                 } else {
   20106           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20107             :                           PyLong_Type.tp_name);
   20108           0 :                         return -1;
   20109             :                 }
   20110             :         }
   20111           0 :         return 0;
   20112             : }
   20113             : 
   20114             : static PyGetSetDef py_srvsvc_NetSrvInfo599_getsetters[] = {
   20115             :         {
   20116             :                 .name = discard_const_p(char, "sessopen"),
   20117             :                 .get = py_srvsvc_NetSrvInfo599_get_sessopen,
   20118             :                 .set = py_srvsvc_NetSrvInfo599_set_sessopen,
   20119             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20120             :         },
   20121             :         {
   20122             :                 .name = discard_const_p(char, "sesssvc"),
   20123             :                 .get = py_srvsvc_NetSrvInfo599_get_sesssvc,
   20124             :                 .set = py_srvsvc_NetSrvInfo599_set_sesssvc,
   20125             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20126             :         },
   20127             :         {
   20128             :                 .name = discard_const_p(char, "opensearch"),
   20129             :                 .get = py_srvsvc_NetSrvInfo599_get_opensearch,
   20130             :                 .set = py_srvsvc_NetSrvInfo599_set_opensearch,
   20131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20132             :         },
   20133             :         {
   20134             :                 .name = discard_const_p(char, "sizereqbufs"),
   20135             :                 .get = py_srvsvc_NetSrvInfo599_get_sizereqbufs,
   20136             :                 .set = py_srvsvc_NetSrvInfo599_set_sizereqbufs,
   20137             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20138             :         },
   20139             :         {
   20140             :                 .name = discard_const_p(char, "initworkitems"),
   20141             :                 .get = py_srvsvc_NetSrvInfo599_get_initworkitems,
   20142             :                 .set = py_srvsvc_NetSrvInfo599_set_initworkitems,
   20143             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20144             :         },
   20145             :         {
   20146             :                 .name = discard_const_p(char, "maxworkitems"),
   20147             :                 .get = py_srvsvc_NetSrvInfo599_get_maxworkitems,
   20148             :                 .set = py_srvsvc_NetSrvInfo599_set_maxworkitems,
   20149             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20150             :         },
   20151             :         {
   20152             :                 .name = discard_const_p(char, "rawworkitems"),
   20153             :                 .get = py_srvsvc_NetSrvInfo599_get_rawworkitems,
   20154             :                 .set = py_srvsvc_NetSrvInfo599_set_rawworkitems,
   20155             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20156             :         },
   20157             :         {
   20158             :                 .name = discard_const_p(char, "irpstacksize"),
   20159             :                 .get = py_srvsvc_NetSrvInfo599_get_irpstacksize,
   20160             :                 .set = py_srvsvc_NetSrvInfo599_set_irpstacksize,
   20161             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20162             :         },
   20163             :         {
   20164             :                 .name = discard_const_p(char, "maxrawbuflen"),
   20165             :                 .get = py_srvsvc_NetSrvInfo599_get_maxrawbuflen,
   20166             :                 .set = py_srvsvc_NetSrvInfo599_set_maxrawbuflen,
   20167             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20168             :         },
   20169             :         {
   20170             :                 .name = discard_const_p(char, "sessusers"),
   20171             :                 .get = py_srvsvc_NetSrvInfo599_get_sessusers,
   20172             :                 .set = py_srvsvc_NetSrvInfo599_set_sessusers,
   20173             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20174             :         },
   20175             :         {
   20176             :                 .name = discard_const_p(char, "sessconns"),
   20177             :                 .get = py_srvsvc_NetSrvInfo599_get_sessconns,
   20178             :                 .set = py_srvsvc_NetSrvInfo599_set_sessconns,
   20179             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20180             :         },
   20181             :         {
   20182             :                 .name = discard_const_p(char, "maxpagedmemoryusage"),
   20183             :                 .get = py_srvsvc_NetSrvInfo599_get_maxpagedmemoryusage,
   20184             :                 .set = py_srvsvc_NetSrvInfo599_set_maxpagedmemoryusage,
   20185             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20186             :         },
   20187             :         {
   20188             :                 .name = discard_const_p(char, "maxnonpagedmemoryusage"),
   20189             :                 .get = py_srvsvc_NetSrvInfo599_get_maxnonpagedmemoryusage,
   20190             :                 .set = py_srvsvc_NetSrvInfo599_set_maxnonpagedmemoryusage,
   20191             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20192             :         },
   20193             :         {
   20194             :                 .name = discard_const_p(char, "enablesoftcompat"),
   20195             :                 .get = py_srvsvc_NetSrvInfo599_get_enablesoftcompat,
   20196             :                 .set = py_srvsvc_NetSrvInfo599_set_enablesoftcompat,
   20197             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20198             :         },
   20199             :         {
   20200             :                 .name = discard_const_p(char, "enableforcedlogoff"),
   20201             :                 .get = py_srvsvc_NetSrvInfo599_get_enableforcedlogoff,
   20202             :                 .set = py_srvsvc_NetSrvInfo599_set_enableforcedlogoff,
   20203             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20204             :         },
   20205             :         {
   20206             :                 .name = discard_const_p(char, "timesource"),
   20207             :                 .get = py_srvsvc_NetSrvInfo599_get_timesource,
   20208             :                 .set = py_srvsvc_NetSrvInfo599_set_timesource,
   20209             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20210             :         },
   20211             :         {
   20212             :                 .name = discard_const_p(char, "acceptdownlevelapis"),
   20213             :                 .get = py_srvsvc_NetSrvInfo599_get_acceptdownlevelapis,
   20214             :                 .set = py_srvsvc_NetSrvInfo599_set_acceptdownlevelapis,
   20215             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20216             :         },
   20217             :         {
   20218             :                 .name = discard_const_p(char, "lmannounce"),
   20219             :                 .get = py_srvsvc_NetSrvInfo599_get_lmannounce,
   20220             :                 .set = py_srvsvc_NetSrvInfo599_set_lmannounce,
   20221             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20222             :         },
   20223             :         {
   20224             :                 .name = discard_const_p(char, "domain"),
   20225             :                 .get = py_srvsvc_NetSrvInfo599_get_domain,
   20226             :                 .set = py_srvsvc_NetSrvInfo599_set_domain,
   20227             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20228             :         },
   20229             :         {
   20230             :                 .name = discard_const_p(char, "maxcopyreadlen"),
   20231             :                 .get = py_srvsvc_NetSrvInfo599_get_maxcopyreadlen,
   20232             :                 .set = py_srvsvc_NetSrvInfo599_set_maxcopyreadlen,
   20233             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20234             :         },
   20235             :         {
   20236             :                 .name = discard_const_p(char, "maxcopywritelen"),
   20237             :                 .get = py_srvsvc_NetSrvInfo599_get_maxcopywritelen,
   20238             :                 .set = py_srvsvc_NetSrvInfo599_set_maxcopywritelen,
   20239             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20240             :         },
   20241             :         {
   20242             :                 .name = discard_const_p(char, "minkeepsearch"),
   20243             :                 .get = py_srvsvc_NetSrvInfo599_get_minkeepsearch,
   20244             :                 .set = py_srvsvc_NetSrvInfo599_set_minkeepsearch,
   20245             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20246             :         },
   20247             :         {
   20248             :                 .name = discard_const_p(char, "minkeepcomplsearch"),
   20249             :                 .get = py_srvsvc_NetSrvInfo599_get_minkeepcomplsearch,
   20250             :                 .set = py_srvsvc_NetSrvInfo599_set_minkeepcomplsearch,
   20251             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20252             :         },
   20253             :         {
   20254             :                 .name = discard_const_p(char, "maxkeepcomplsearch"),
   20255             :                 .get = py_srvsvc_NetSrvInfo599_get_maxkeepcomplsearch,
   20256             :                 .set = py_srvsvc_NetSrvInfo599_set_maxkeepcomplsearch,
   20257             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20258             :         },
   20259             :         {
   20260             :                 .name = discard_const_p(char, "threadcountadd"),
   20261             :                 .get = py_srvsvc_NetSrvInfo599_get_threadcountadd,
   20262             :                 .set = py_srvsvc_NetSrvInfo599_set_threadcountadd,
   20263             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20264             :         },
   20265             :         {
   20266             :                 .name = discard_const_p(char, "numlockthreads"),
   20267             :                 .get = py_srvsvc_NetSrvInfo599_get_numlockthreads,
   20268             :                 .set = py_srvsvc_NetSrvInfo599_set_numlockthreads,
   20269             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20270             :         },
   20271             :         {
   20272             :                 .name = discard_const_p(char, "scavtimeout"),
   20273             :                 .get = py_srvsvc_NetSrvInfo599_get_scavtimeout,
   20274             :                 .set = py_srvsvc_NetSrvInfo599_set_scavtimeout,
   20275             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20276             :         },
   20277             :         {
   20278             :                 .name = discard_const_p(char, "minrcvqueue"),
   20279             :                 .get = py_srvsvc_NetSrvInfo599_get_minrcvqueue,
   20280             :                 .set = py_srvsvc_NetSrvInfo599_set_minrcvqueue,
   20281             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20282             :         },
   20283             :         {
   20284             :                 .name = discard_const_p(char, "minfreeworkitems"),
   20285             :                 .get = py_srvsvc_NetSrvInfo599_get_minfreeworkitems,
   20286             :                 .set = py_srvsvc_NetSrvInfo599_set_minfreeworkitems,
   20287             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20288             :         },
   20289             :         {
   20290             :                 .name = discard_const_p(char, "xactmemsize"),
   20291             :                 .get = py_srvsvc_NetSrvInfo599_get_xactmemsize,
   20292             :                 .set = py_srvsvc_NetSrvInfo599_set_xactmemsize,
   20293             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20294             :         },
   20295             :         {
   20296             :                 .name = discard_const_p(char, "threadpriority"),
   20297             :                 .get = py_srvsvc_NetSrvInfo599_get_threadpriority,
   20298             :                 .set = py_srvsvc_NetSrvInfo599_set_threadpriority,
   20299             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20300             :         },
   20301             :         {
   20302             :                 .name = discard_const_p(char, "maxmpxct"),
   20303             :                 .get = py_srvsvc_NetSrvInfo599_get_maxmpxct,
   20304             :                 .set = py_srvsvc_NetSrvInfo599_set_maxmpxct,
   20305             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20306             :         },
   20307             :         {
   20308             :                 .name = discard_const_p(char, "oplockbreakwait"),
   20309             :                 .get = py_srvsvc_NetSrvInfo599_get_oplockbreakwait,
   20310             :                 .set = py_srvsvc_NetSrvInfo599_set_oplockbreakwait,
   20311             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20312             :         },
   20313             :         {
   20314             :                 .name = discard_const_p(char, "oplockbreakresponsewait"),
   20315             :                 .get = py_srvsvc_NetSrvInfo599_get_oplockbreakresponsewait,
   20316             :                 .set = py_srvsvc_NetSrvInfo599_set_oplockbreakresponsewait,
   20317             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20318             :         },
   20319             :         {
   20320             :                 .name = discard_const_p(char, "enableoplocks"),
   20321             :                 .get = py_srvsvc_NetSrvInfo599_get_enableoplocks,
   20322             :                 .set = py_srvsvc_NetSrvInfo599_set_enableoplocks,
   20323             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20324             :         },
   20325             :         {
   20326             :                 .name = discard_const_p(char, "enableoplockforceclose"),
   20327             :                 .get = py_srvsvc_NetSrvInfo599_get_enableoplockforceclose,
   20328             :                 .set = py_srvsvc_NetSrvInfo599_set_enableoplockforceclose,
   20329             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20330             :         },
   20331             :         {
   20332             :                 .name = discard_const_p(char, "enablefcbopens"),
   20333             :                 .get = py_srvsvc_NetSrvInfo599_get_enablefcbopens,
   20334             :                 .set = py_srvsvc_NetSrvInfo599_set_enablefcbopens,
   20335             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20336             :         },
   20337             :         {
   20338             :                 .name = discard_const_p(char, "enableraw"),
   20339             :                 .get = py_srvsvc_NetSrvInfo599_get_enableraw,
   20340             :                 .set = py_srvsvc_NetSrvInfo599_set_enableraw,
   20341             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20342             :         },
   20343             :         {
   20344             :                 .name = discard_const_p(char, "enablesharednetdrives"),
   20345             :                 .get = py_srvsvc_NetSrvInfo599_get_enablesharednetdrives,
   20346             :                 .set = py_srvsvc_NetSrvInfo599_set_enablesharednetdrives,
   20347             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20348             :         },
   20349             :         {
   20350             :                 .name = discard_const_p(char, "minfreeconnections"),
   20351             :                 .get = py_srvsvc_NetSrvInfo599_get_minfreeconnections,
   20352             :                 .set = py_srvsvc_NetSrvInfo599_set_minfreeconnections,
   20353             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20354             :         },
   20355             :         {
   20356             :                 .name = discard_const_p(char, "maxfreeconnections"),
   20357             :                 .get = py_srvsvc_NetSrvInfo599_get_maxfreeconnections,
   20358             :                 .set = py_srvsvc_NetSrvInfo599_set_maxfreeconnections,
   20359             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20360             :         },
   20361             :         {
   20362             :                 .name = discard_const_p(char, "initsesstable"),
   20363             :                 .get = py_srvsvc_NetSrvInfo599_get_initsesstable,
   20364             :                 .set = py_srvsvc_NetSrvInfo599_set_initsesstable,
   20365             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20366             :         },
   20367             :         {
   20368             :                 .name = discard_const_p(char, "initconntable"),
   20369             :                 .get = py_srvsvc_NetSrvInfo599_get_initconntable,
   20370             :                 .set = py_srvsvc_NetSrvInfo599_set_initconntable,
   20371             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20372             :         },
   20373             :         {
   20374             :                 .name = discard_const_p(char, "initfiletable"),
   20375             :                 .get = py_srvsvc_NetSrvInfo599_get_initfiletable,
   20376             :                 .set = py_srvsvc_NetSrvInfo599_set_initfiletable,
   20377             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20378             :         },
   20379             :         {
   20380             :                 .name = discard_const_p(char, "initsearchtable"),
   20381             :                 .get = py_srvsvc_NetSrvInfo599_get_initsearchtable,
   20382             :                 .set = py_srvsvc_NetSrvInfo599_set_initsearchtable,
   20383             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20384             :         },
   20385             :         {
   20386             :                 .name = discard_const_p(char, "alertsched"),
   20387             :                 .get = py_srvsvc_NetSrvInfo599_get_alertsched,
   20388             :                 .set = py_srvsvc_NetSrvInfo599_set_alertsched,
   20389             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20390             :         },
   20391             :         {
   20392             :                 .name = discard_const_p(char, "errortreshold"),
   20393             :                 .get = py_srvsvc_NetSrvInfo599_get_errortreshold,
   20394             :                 .set = py_srvsvc_NetSrvInfo599_set_errortreshold,
   20395             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20396             :         },
   20397             :         {
   20398             :                 .name = discard_const_p(char, "networkerrortreshold"),
   20399             :                 .get = py_srvsvc_NetSrvInfo599_get_networkerrortreshold,
   20400             :                 .set = py_srvsvc_NetSrvInfo599_set_networkerrortreshold,
   20401             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20402             :         },
   20403             :         {
   20404             :                 .name = discard_const_p(char, "diskspacetreshold"),
   20405             :                 .get = py_srvsvc_NetSrvInfo599_get_diskspacetreshold,
   20406             :                 .set = py_srvsvc_NetSrvInfo599_set_diskspacetreshold,
   20407             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20408             :         },
   20409             :         {
   20410             :                 .name = discard_const_p(char, "reserved"),
   20411             :                 .get = py_srvsvc_NetSrvInfo599_get_reserved,
   20412             :                 .set = py_srvsvc_NetSrvInfo599_set_reserved,
   20413             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20414             :         },
   20415             :         {
   20416             :                 .name = discard_const_p(char, "maxlinkdelay"),
   20417             :                 .get = py_srvsvc_NetSrvInfo599_get_maxlinkdelay,
   20418             :                 .set = py_srvsvc_NetSrvInfo599_set_maxlinkdelay,
   20419             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20420             :         },
   20421             :         {
   20422             :                 .name = discard_const_p(char, "minlinkthroughput"),
   20423             :                 .get = py_srvsvc_NetSrvInfo599_get_minlinkthroughput,
   20424             :                 .set = py_srvsvc_NetSrvInfo599_set_minlinkthroughput,
   20425             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20426             :         },
   20427             :         {
   20428             :                 .name = discard_const_p(char, "linkinfovalidtime"),
   20429             :                 .get = py_srvsvc_NetSrvInfo599_get_linkinfovalidtime,
   20430             :                 .set = py_srvsvc_NetSrvInfo599_set_linkinfovalidtime,
   20431             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20432             :         },
   20433             :         {
   20434             :                 .name = discard_const_p(char, "scavqosinfoupdatetime"),
   20435             :                 .get = py_srvsvc_NetSrvInfo599_get_scavqosinfoupdatetime,
   20436             :                 .set = py_srvsvc_NetSrvInfo599_set_scavqosinfoupdatetime,
   20437             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20438             :         },
   20439             :         {
   20440             :                 .name = discard_const_p(char, "maxworkitemidletime"),
   20441             :                 .get = py_srvsvc_NetSrvInfo599_get_maxworkitemidletime,
   20442             :                 .set = py_srvsvc_NetSrvInfo599_set_maxworkitemidletime,
   20443             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20444             :         },
   20445             :         { .name = NULL }
   20446             : };
   20447             : 
   20448           0 : static PyObject *py_srvsvc_NetSrvInfo599_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20449             : {
   20450           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo599, type);
   20451             : }
   20452             : 
   20453             : 
   20454             : static PyTypeObject srvsvc_NetSrvInfo599_Type = {
   20455             :         PyVarObject_HEAD_INIT(NULL, 0)
   20456             :         .tp_name = "srvsvc.NetSrvInfo599",
   20457             :         .tp_getset = py_srvsvc_NetSrvInfo599_getsetters,
   20458             :         .tp_methods = NULL,
   20459             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20460             :         .tp_new = py_srvsvc_NetSrvInfo599_new,
   20461             : };
   20462             : 
   20463             : 
   20464           0 : static PyObject *py_srvsvc_NetSrvInfo1005_get_comment(PyObject *obj, void *closure)
   20465             : {
   20466           0 :         struct srvsvc_NetSrvInfo1005 *object = pytalloc_get_ptr(obj);
   20467           0 :         PyObject *py_comment;
   20468           0 :         if (object->comment == NULL) {
   20469           0 :                 Py_RETURN_NONE;
   20470             :         }
   20471           0 :         if (object->comment == NULL) {
   20472           0 :                 py_comment = Py_None;
   20473           0 :                 Py_INCREF(py_comment);
   20474             :         } else {
   20475           0 :                 if (object->comment == NULL) {
   20476           0 :                         py_comment = Py_None;
   20477           0 :                         Py_INCREF(py_comment);
   20478             :                 } else {
   20479           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
   20480             :                 }
   20481             :         }
   20482           0 :         return py_comment;
   20483             : }
   20484             : 
   20485           0 : static int py_srvsvc_NetSrvInfo1005_set_comment(PyObject *py_obj, PyObject *value, void *closure)
   20486             : {
   20487           0 :         struct srvsvc_NetSrvInfo1005 *object = pytalloc_get_ptr(py_obj);
   20488           0 :         if (value == NULL) {
   20489           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
   20490           0 :                 return -1;
   20491             :         }
   20492           0 :         if (value == Py_None) {
   20493           0 :                 object->comment = NULL;
   20494             :         } else {
   20495           0 :                 object->comment = NULL;
   20496             :                 {
   20497           0 :                         const char *test_str;
   20498           0 :                         const char *talloc_str;
   20499           0 :                         PyObject *unicode = NULL;
   20500           0 :                         if (PyUnicode_Check(value)) {
   20501           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20502           0 :                                 if (unicode == NULL) {
   20503           0 :                                         return -1;
   20504             :                                 }
   20505           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   20506           0 :                         } else if (PyBytes_Check(value)) {
   20507           0 :                                 test_str = PyBytes_AS_STRING(value);
   20508             :                         } else {
   20509           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20510           0 :                                 return -1;
   20511             :                         }
   20512           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20513           0 :                         if (unicode != NULL) {
   20514           0 :                                 Py_DECREF(unicode);
   20515             :                         }
   20516           0 :                         if (talloc_str == NULL) {
   20517           0 :                                 PyErr_NoMemory();
   20518           0 :                                 return -1;
   20519             :                         }
   20520           0 :                         object->comment = talloc_str;
   20521             :                 }
   20522             :         }
   20523           0 :         return 0;
   20524             : }
   20525             : 
   20526             : static PyGetSetDef py_srvsvc_NetSrvInfo1005_getsetters[] = {
   20527             :         {
   20528             :                 .name = discard_const_p(char, "comment"),
   20529             :                 .get = py_srvsvc_NetSrvInfo1005_get_comment,
   20530             :                 .set = py_srvsvc_NetSrvInfo1005_set_comment,
   20531             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20532             :         },
   20533             :         { .name = NULL }
   20534             : };
   20535             : 
   20536           0 : static PyObject *py_srvsvc_NetSrvInfo1005_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20537             : {
   20538           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1005, type);
   20539             : }
   20540             : 
   20541             : 
   20542             : static PyTypeObject srvsvc_NetSrvInfo1005_Type = {
   20543             :         PyVarObject_HEAD_INIT(NULL, 0)
   20544             :         .tp_name = "srvsvc.NetSrvInfo1005",
   20545             :         .tp_getset = py_srvsvc_NetSrvInfo1005_getsetters,
   20546             :         .tp_methods = NULL,
   20547             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20548             :         .tp_new = py_srvsvc_NetSrvInfo1005_new,
   20549             : };
   20550             : 
   20551             : 
   20552           0 : static PyObject *py_srvsvc_NetSrvInfo1010_get_disc(PyObject *obj, void *closure)
   20553             : {
   20554           0 :         struct srvsvc_NetSrvInfo1010 *object = pytalloc_get_ptr(obj);
   20555           0 :         PyObject *py_disc;
   20556           0 :         py_disc = PyLong_FromUnsignedLongLong((uint32_t)(object->disc));
   20557           0 :         return py_disc;
   20558             : }
   20559             : 
   20560           0 : static int py_srvsvc_NetSrvInfo1010_set_disc(PyObject *py_obj, PyObject *value, void *closure)
   20561             : {
   20562           0 :         struct srvsvc_NetSrvInfo1010 *object = pytalloc_get_ptr(py_obj);
   20563           0 :         if (value == NULL) {
   20564           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->disc");
   20565           0 :                 return -1;
   20566             :         }
   20567             :         {
   20568           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->disc));
   20569           0 :                 if (PyLong_Check(value)) {
   20570           0 :                         unsigned long long test_var;
   20571           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20572           0 :                         if (PyErr_Occurred() != NULL) {
   20573           0 :                                 return -1;
   20574             :                         }
   20575           0 :                         if (test_var > uint_max) {
   20576           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20577             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20578           0 :                                 return -1;
   20579             :                         }
   20580           0 :                         object->disc = test_var;
   20581             :                 } else {
   20582           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20583             :                           PyLong_Type.tp_name);
   20584           0 :                         return -1;
   20585             :                 }
   20586             :         }
   20587           0 :         return 0;
   20588             : }
   20589             : 
   20590             : static PyGetSetDef py_srvsvc_NetSrvInfo1010_getsetters[] = {
   20591             :         {
   20592             :                 .name = discard_const_p(char, "disc"),
   20593             :                 .get = py_srvsvc_NetSrvInfo1010_get_disc,
   20594             :                 .set = py_srvsvc_NetSrvInfo1010_set_disc,
   20595             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20596             :         },
   20597             :         { .name = NULL }
   20598             : };
   20599             : 
   20600           0 : static PyObject *py_srvsvc_NetSrvInfo1010_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20601             : {
   20602           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1010, type);
   20603             : }
   20604             : 
   20605             : 
   20606             : static PyTypeObject srvsvc_NetSrvInfo1010_Type = {
   20607             :         PyVarObject_HEAD_INIT(NULL, 0)
   20608             :         .tp_name = "srvsvc.NetSrvInfo1010",
   20609             :         .tp_getset = py_srvsvc_NetSrvInfo1010_getsetters,
   20610             :         .tp_methods = NULL,
   20611             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20612             :         .tp_new = py_srvsvc_NetSrvInfo1010_new,
   20613             : };
   20614             : 
   20615             : 
   20616           0 : static PyObject *py_srvsvc_NetSrvInfo1016_get_hidden(PyObject *obj, void *closure)
   20617             : {
   20618           0 :         struct srvsvc_NetSrvInfo1016 *object = pytalloc_get_ptr(obj);
   20619           0 :         PyObject *py_hidden;
   20620           0 :         py_hidden = PyLong_FromUnsignedLongLong((uint32_t)(object->hidden));
   20621           0 :         return py_hidden;
   20622             : }
   20623             : 
   20624           0 : static int py_srvsvc_NetSrvInfo1016_set_hidden(PyObject *py_obj, PyObject *value, void *closure)
   20625             : {
   20626           0 :         struct srvsvc_NetSrvInfo1016 *object = pytalloc_get_ptr(py_obj);
   20627           0 :         if (value == NULL) {
   20628           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->hidden");
   20629           0 :                 return -1;
   20630             :         }
   20631             :         {
   20632           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hidden));
   20633           0 :                 if (PyLong_Check(value)) {
   20634           0 :                         unsigned long long test_var;
   20635           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20636           0 :                         if (PyErr_Occurred() != NULL) {
   20637           0 :                                 return -1;
   20638             :                         }
   20639           0 :                         if (test_var > uint_max) {
   20640           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20641             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20642           0 :                                 return -1;
   20643             :                         }
   20644           0 :                         object->hidden = test_var;
   20645             :                 } else {
   20646           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20647             :                           PyLong_Type.tp_name);
   20648           0 :                         return -1;
   20649             :                 }
   20650             :         }
   20651           0 :         return 0;
   20652             : }
   20653             : 
   20654             : static PyGetSetDef py_srvsvc_NetSrvInfo1016_getsetters[] = {
   20655             :         {
   20656             :                 .name = discard_const_p(char, "hidden"),
   20657             :                 .get = py_srvsvc_NetSrvInfo1016_get_hidden,
   20658             :                 .set = py_srvsvc_NetSrvInfo1016_set_hidden,
   20659             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20660             :         },
   20661             :         { .name = NULL }
   20662             : };
   20663             : 
   20664           0 : static PyObject *py_srvsvc_NetSrvInfo1016_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20665             : {
   20666           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1016, type);
   20667             : }
   20668             : 
   20669             : 
   20670             : static PyTypeObject srvsvc_NetSrvInfo1016_Type = {
   20671             :         PyVarObject_HEAD_INIT(NULL, 0)
   20672             :         .tp_name = "srvsvc.NetSrvInfo1016",
   20673             :         .tp_getset = py_srvsvc_NetSrvInfo1016_getsetters,
   20674             :         .tp_methods = NULL,
   20675             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20676             :         .tp_new = py_srvsvc_NetSrvInfo1016_new,
   20677             : };
   20678             : 
   20679             : 
   20680           0 : static PyObject *py_srvsvc_NetSrvInfo1017_get_announce(PyObject *obj, void *closure)
   20681             : {
   20682           0 :         struct srvsvc_NetSrvInfo1017 *object = pytalloc_get_ptr(obj);
   20683           0 :         PyObject *py_announce;
   20684           0 :         py_announce = PyLong_FromUnsignedLongLong((uint32_t)(object->announce));
   20685           0 :         return py_announce;
   20686             : }
   20687             : 
   20688           0 : static int py_srvsvc_NetSrvInfo1017_set_announce(PyObject *py_obj, PyObject *value, void *closure)
   20689             : {
   20690           0 :         struct srvsvc_NetSrvInfo1017 *object = pytalloc_get_ptr(py_obj);
   20691           0 :         if (value == NULL) {
   20692           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->announce");
   20693           0 :                 return -1;
   20694             :         }
   20695             :         {
   20696           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->announce));
   20697           0 :                 if (PyLong_Check(value)) {
   20698           0 :                         unsigned long long test_var;
   20699           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20700           0 :                         if (PyErr_Occurred() != NULL) {
   20701           0 :                                 return -1;
   20702             :                         }
   20703           0 :                         if (test_var > uint_max) {
   20704           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20705             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20706           0 :                                 return -1;
   20707             :                         }
   20708           0 :                         object->announce = test_var;
   20709             :                 } else {
   20710           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20711             :                           PyLong_Type.tp_name);
   20712           0 :                         return -1;
   20713             :                 }
   20714             :         }
   20715           0 :         return 0;
   20716             : }
   20717             : 
   20718             : static PyGetSetDef py_srvsvc_NetSrvInfo1017_getsetters[] = {
   20719             :         {
   20720             :                 .name = discard_const_p(char, "announce"),
   20721             :                 .get = py_srvsvc_NetSrvInfo1017_get_announce,
   20722             :                 .set = py_srvsvc_NetSrvInfo1017_set_announce,
   20723             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20724             :         },
   20725             :         { .name = NULL }
   20726             : };
   20727             : 
   20728           0 : static PyObject *py_srvsvc_NetSrvInfo1017_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20729             : {
   20730           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1017, type);
   20731             : }
   20732             : 
   20733             : 
   20734             : static PyTypeObject srvsvc_NetSrvInfo1017_Type = {
   20735             :         PyVarObject_HEAD_INIT(NULL, 0)
   20736             :         .tp_name = "srvsvc.NetSrvInfo1017",
   20737             :         .tp_getset = py_srvsvc_NetSrvInfo1017_getsetters,
   20738             :         .tp_methods = NULL,
   20739             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20740             :         .tp_new = py_srvsvc_NetSrvInfo1017_new,
   20741             : };
   20742             : 
   20743             : 
   20744           0 : static PyObject *py_srvsvc_NetSrvInfo1018_get_anndelta(PyObject *obj, void *closure)
   20745             : {
   20746           0 :         struct srvsvc_NetSrvInfo1018 *object = pytalloc_get_ptr(obj);
   20747           0 :         PyObject *py_anndelta;
   20748           0 :         py_anndelta = PyLong_FromUnsignedLongLong((uint32_t)(object->anndelta));
   20749           0 :         return py_anndelta;
   20750             : }
   20751             : 
   20752           0 : static int py_srvsvc_NetSrvInfo1018_set_anndelta(PyObject *py_obj, PyObject *value, void *closure)
   20753             : {
   20754           0 :         struct srvsvc_NetSrvInfo1018 *object = pytalloc_get_ptr(py_obj);
   20755           0 :         if (value == NULL) {
   20756           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->anndelta");
   20757           0 :                 return -1;
   20758             :         }
   20759             :         {
   20760           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->anndelta));
   20761           0 :                 if (PyLong_Check(value)) {
   20762           0 :                         unsigned long long test_var;
   20763           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20764           0 :                         if (PyErr_Occurred() != NULL) {
   20765           0 :                                 return -1;
   20766             :                         }
   20767           0 :                         if (test_var > uint_max) {
   20768           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20769             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20770           0 :                                 return -1;
   20771             :                         }
   20772           0 :                         object->anndelta = test_var;
   20773             :                 } else {
   20774           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20775             :                           PyLong_Type.tp_name);
   20776           0 :                         return -1;
   20777             :                 }
   20778             :         }
   20779           0 :         return 0;
   20780             : }
   20781             : 
   20782             : static PyGetSetDef py_srvsvc_NetSrvInfo1018_getsetters[] = {
   20783             :         {
   20784             :                 .name = discard_const_p(char, "anndelta"),
   20785             :                 .get = py_srvsvc_NetSrvInfo1018_get_anndelta,
   20786             :                 .set = py_srvsvc_NetSrvInfo1018_set_anndelta,
   20787             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20788             :         },
   20789             :         { .name = NULL }
   20790             : };
   20791             : 
   20792           0 : static PyObject *py_srvsvc_NetSrvInfo1018_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20793             : {
   20794           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1018, type);
   20795             : }
   20796             : 
   20797             : 
   20798             : static PyTypeObject srvsvc_NetSrvInfo1018_Type = {
   20799             :         PyVarObject_HEAD_INIT(NULL, 0)
   20800             :         .tp_name = "srvsvc.NetSrvInfo1018",
   20801             :         .tp_getset = py_srvsvc_NetSrvInfo1018_getsetters,
   20802             :         .tp_methods = NULL,
   20803             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20804             :         .tp_new = py_srvsvc_NetSrvInfo1018_new,
   20805             : };
   20806             : 
   20807             : 
   20808           0 : static PyObject *py_srvsvc_NetSrvInfo1107_get_users(PyObject *obj, void *closure)
   20809             : {
   20810           0 :         struct srvsvc_NetSrvInfo1107 *object = pytalloc_get_ptr(obj);
   20811           0 :         PyObject *py_users;
   20812           0 :         py_users = PyLong_FromUnsignedLongLong((uint32_t)(object->users));
   20813           0 :         return py_users;
   20814             : }
   20815             : 
   20816           0 : static int py_srvsvc_NetSrvInfo1107_set_users(PyObject *py_obj, PyObject *value, void *closure)
   20817             : {
   20818           0 :         struct srvsvc_NetSrvInfo1107 *object = pytalloc_get_ptr(py_obj);
   20819           0 :         if (value == NULL) {
   20820           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->users");
   20821           0 :                 return -1;
   20822             :         }
   20823             :         {
   20824           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->users));
   20825           0 :                 if (PyLong_Check(value)) {
   20826           0 :                         unsigned long long test_var;
   20827           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20828           0 :                         if (PyErr_Occurred() != NULL) {
   20829           0 :                                 return -1;
   20830             :                         }
   20831           0 :                         if (test_var > uint_max) {
   20832           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20833             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20834           0 :                                 return -1;
   20835             :                         }
   20836           0 :                         object->users = test_var;
   20837             :                 } else {
   20838           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20839             :                           PyLong_Type.tp_name);
   20840           0 :                         return -1;
   20841             :                 }
   20842             :         }
   20843           0 :         return 0;
   20844             : }
   20845             : 
   20846             : static PyGetSetDef py_srvsvc_NetSrvInfo1107_getsetters[] = {
   20847             :         {
   20848             :                 .name = discard_const_p(char, "users"),
   20849             :                 .get = py_srvsvc_NetSrvInfo1107_get_users,
   20850             :                 .set = py_srvsvc_NetSrvInfo1107_set_users,
   20851             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20852             :         },
   20853             :         { .name = NULL }
   20854             : };
   20855             : 
   20856           0 : static PyObject *py_srvsvc_NetSrvInfo1107_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20857             : {
   20858           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1107, type);
   20859             : }
   20860             : 
   20861             : 
   20862             : static PyTypeObject srvsvc_NetSrvInfo1107_Type = {
   20863             :         PyVarObject_HEAD_INIT(NULL, 0)
   20864             :         .tp_name = "srvsvc.NetSrvInfo1107",
   20865             :         .tp_getset = py_srvsvc_NetSrvInfo1107_getsetters,
   20866             :         .tp_methods = NULL,
   20867             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20868             :         .tp_new = py_srvsvc_NetSrvInfo1107_new,
   20869             : };
   20870             : 
   20871             : 
   20872           0 : static PyObject *py_srvsvc_NetSrvInfo1501_get_sessopens(PyObject *obj, void *closure)
   20873             : {
   20874           0 :         struct srvsvc_NetSrvInfo1501 *object = pytalloc_get_ptr(obj);
   20875           0 :         PyObject *py_sessopens;
   20876           0 :         py_sessopens = PyLong_FromUnsignedLongLong((uint32_t)(object->sessopens));
   20877           0 :         return py_sessopens;
   20878             : }
   20879             : 
   20880           0 : static int py_srvsvc_NetSrvInfo1501_set_sessopens(PyObject *py_obj, PyObject *value, void *closure)
   20881             : {
   20882           0 :         struct srvsvc_NetSrvInfo1501 *object = pytalloc_get_ptr(py_obj);
   20883           0 :         if (value == NULL) {
   20884           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessopens");
   20885           0 :                 return -1;
   20886             :         }
   20887             :         {
   20888           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopens));
   20889           0 :                 if (PyLong_Check(value)) {
   20890           0 :                         unsigned long long test_var;
   20891           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20892           0 :                         if (PyErr_Occurred() != NULL) {
   20893           0 :                                 return -1;
   20894             :                         }
   20895           0 :                         if (test_var > uint_max) {
   20896           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20897             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20898           0 :                                 return -1;
   20899             :                         }
   20900           0 :                         object->sessopens = test_var;
   20901             :                 } else {
   20902           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20903             :                           PyLong_Type.tp_name);
   20904           0 :                         return -1;
   20905             :                 }
   20906             :         }
   20907           0 :         return 0;
   20908             : }
   20909             : 
   20910             : static PyGetSetDef py_srvsvc_NetSrvInfo1501_getsetters[] = {
   20911             :         {
   20912             :                 .name = discard_const_p(char, "sessopens"),
   20913             :                 .get = py_srvsvc_NetSrvInfo1501_get_sessopens,
   20914             :                 .set = py_srvsvc_NetSrvInfo1501_set_sessopens,
   20915             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20916             :         },
   20917             :         { .name = NULL }
   20918             : };
   20919             : 
   20920           0 : static PyObject *py_srvsvc_NetSrvInfo1501_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20921             : {
   20922           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1501, type);
   20923             : }
   20924             : 
   20925             : 
   20926             : static PyTypeObject srvsvc_NetSrvInfo1501_Type = {
   20927             :         PyVarObject_HEAD_INIT(NULL, 0)
   20928             :         .tp_name = "srvsvc.NetSrvInfo1501",
   20929             :         .tp_getset = py_srvsvc_NetSrvInfo1501_getsetters,
   20930             :         .tp_methods = NULL,
   20931             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20932             :         .tp_new = py_srvsvc_NetSrvInfo1501_new,
   20933             : };
   20934             : 
   20935             : 
   20936           0 : static PyObject *py_srvsvc_NetSrvInfo1502_get_sessvcs(PyObject *obj, void *closure)
   20937             : {
   20938           0 :         struct srvsvc_NetSrvInfo1502 *object = pytalloc_get_ptr(obj);
   20939           0 :         PyObject *py_sessvcs;
   20940           0 :         py_sessvcs = PyLong_FromUnsignedLongLong((uint32_t)(object->sessvcs));
   20941           0 :         return py_sessvcs;
   20942             : }
   20943             : 
   20944           0 : static int py_srvsvc_NetSrvInfo1502_set_sessvcs(PyObject *py_obj, PyObject *value, void *closure)
   20945             : {
   20946           0 :         struct srvsvc_NetSrvInfo1502 *object = pytalloc_get_ptr(py_obj);
   20947           0 :         if (value == NULL) {
   20948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessvcs");
   20949           0 :                 return -1;
   20950             :         }
   20951             :         {
   20952           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessvcs));
   20953           0 :                 if (PyLong_Check(value)) {
   20954           0 :                         unsigned long long test_var;
   20955           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20956           0 :                         if (PyErr_Occurred() != NULL) {
   20957           0 :                                 return -1;
   20958             :                         }
   20959           0 :                         if (test_var > uint_max) {
   20960           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20961             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20962           0 :                                 return -1;
   20963             :                         }
   20964           0 :                         object->sessvcs = test_var;
   20965             :                 } else {
   20966           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20967             :                           PyLong_Type.tp_name);
   20968           0 :                         return -1;
   20969             :                 }
   20970             :         }
   20971           0 :         return 0;
   20972             : }
   20973             : 
   20974             : static PyGetSetDef py_srvsvc_NetSrvInfo1502_getsetters[] = {
   20975             :         {
   20976             :                 .name = discard_const_p(char, "sessvcs"),
   20977             :                 .get = py_srvsvc_NetSrvInfo1502_get_sessvcs,
   20978             :                 .set = py_srvsvc_NetSrvInfo1502_set_sessvcs,
   20979             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20980             :         },
   20981             :         { .name = NULL }
   20982             : };
   20983             : 
   20984           0 : static PyObject *py_srvsvc_NetSrvInfo1502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20985             : {
   20986           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1502, type);
   20987             : }
   20988             : 
   20989             : 
   20990             : static PyTypeObject srvsvc_NetSrvInfo1502_Type = {
   20991             :         PyVarObject_HEAD_INIT(NULL, 0)
   20992             :         .tp_name = "srvsvc.NetSrvInfo1502",
   20993             :         .tp_getset = py_srvsvc_NetSrvInfo1502_getsetters,
   20994             :         .tp_methods = NULL,
   20995             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20996             :         .tp_new = py_srvsvc_NetSrvInfo1502_new,
   20997             : };
   20998             : 
   20999             : 
   21000           0 : static PyObject *py_srvsvc_NetSrvInfo1503_get_opensearch(PyObject *obj, void *closure)
   21001             : {
   21002           0 :         struct srvsvc_NetSrvInfo1503 *object = pytalloc_get_ptr(obj);
   21003           0 :         PyObject *py_opensearch;
   21004           0 :         py_opensearch = PyLong_FromUnsignedLongLong((uint32_t)(object->opensearch));
   21005           0 :         return py_opensearch;
   21006             : }
   21007             : 
   21008           0 : static int py_srvsvc_NetSrvInfo1503_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
   21009             : {
   21010           0 :         struct srvsvc_NetSrvInfo1503 *object = pytalloc_get_ptr(py_obj);
   21011           0 :         if (value == NULL) {
   21012           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->opensearch");
   21013           0 :                 return -1;
   21014             :         }
   21015             :         {
   21016           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
   21017           0 :                 if (PyLong_Check(value)) {
   21018           0 :                         unsigned long long test_var;
   21019           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21020           0 :                         if (PyErr_Occurred() != NULL) {
   21021           0 :                                 return -1;
   21022             :                         }
   21023           0 :                         if (test_var > uint_max) {
   21024           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21025             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21026           0 :                                 return -1;
   21027             :                         }
   21028           0 :                         object->opensearch = test_var;
   21029             :                 } else {
   21030           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21031             :                           PyLong_Type.tp_name);
   21032           0 :                         return -1;
   21033             :                 }
   21034             :         }
   21035           0 :         return 0;
   21036             : }
   21037             : 
   21038             : static PyGetSetDef py_srvsvc_NetSrvInfo1503_getsetters[] = {
   21039             :         {
   21040             :                 .name = discard_const_p(char, "opensearch"),
   21041             :                 .get = py_srvsvc_NetSrvInfo1503_get_opensearch,
   21042             :                 .set = py_srvsvc_NetSrvInfo1503_set_opensearch,
   21043             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21044             :         },
   21045             :         { .name = NULL }
   21046             : };
   21047             : 
   21048           0 : static PyObject *py_srvsvc_NetSrvInfo1503_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21049             : {
   21050           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1503, type);
   21051             : }
   21052             : 
   21053             : 
   21054             : static PyTypeObject srvsvc_NetSrvInfo1503_Type = {
   21055             :         PyVarObject_HEAD_INIT(NULL, 0)
   21056             :         .tp_name = "srvsvc.NetSrvInfo1503",
   21057             :         .tp_getset = py_srvsvc_NetSrvInfo1503_getsetters,
   21058             :         .tp_methods = NULL,
   21059             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21060             :         .tp_new = py_srvsvc_NetSrvInfo1503_new,
   21061             : };
   21062             : 
   21063             : 
   21064           0 : static PyObject *py_srvsvc_NetSrvInfo1506_get_maxworkitems(PyObject *obj, void *closure)
   21065             : {
   21066           0 :         struct srvsvc_NetSrvInfo1506 *object = pytalloc_get_ptr(obj);
   21067           0 :         PyObject *py_maxworkitems;
   21068           0 :         py_maxworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->maxworkitems));
   21069           0 :         return py_maxworkitems;
   21070             : }
   21071             : 
   21072           0 : static int py_srvsvc_NetSrvInfo1506_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
   21073             : {
   21074           0 :         struct srvsvc_NetSrvInfo1506 *object = pytalloc_get_ptr(py_obj);
   21075           0 :         if (value == NULL) {
   21076           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxworkitems");
   21077           0 :                 return -1;
   21078             :         }
   21079             :         {
   21080           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
   21081           0 :                 if (PyLong_Check(value)) {
   21082           0 :                         unsigned long long test_var;
   21083           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21084           0 :                         if (PyErr_Occurred() != NULL) {
   21085           0 :                                 return -1;
   21086             :                         }
   21087           0 :                         if (test_var > uint_max) {
   21088           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21089             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21090           0 :                                 return -1;
   21091             :                         }
   21092           0 :                         object->maxworkitems = test_var;
   21093             :                 } else {
   21094           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21095             :                           PyLong_Type.tp_name);
   21096           0 :                         return -1;
   21097             :                 }
   21098             :         }
   21099           0 :         return 0;
   21100             : }
   21101             : 
   21102             : static PyGetSetDef py_srvsvc_NetSrvInfo1506_getsetters[] = {
   21103             :         {
   21104             :                 .name = discard_const_p(char, "maxworkitems"),
   21105             :                 .get = py_srvsvc_NetSrvInfo1506_get_maxworkitems,
   21106             :                 .set = py_srvsvc_NetSrvInfo1506_set_maxworkitems,
   21107             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21108             :         },
   21109             :         { .name = NULL }
   21110             : };
   21111             : 
   21112           0 : static PyObject *py_srvsvc_NetSrvInfo1506_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21113             : {
   21114           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1506, type);
   21115             : }
   21116             : 
   21117             : 
   21118             : static PyTypeObject srvsvc_NetSrvInfo1506_Type = {
   21119             :         PyVarObject_HEAD_INIT(NULL, 0)
   21120             :         .tp_name = "srvsvc.NetSrvInfo1506",
   21121             :         .tp_getset = py_srvsvc_NetSrvInfo1506_getsetters,
   21122             :         .tp_methods = NULL,
   21123             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21124             :         .tp_new = py_srvsvc_NetSrvInfo1506_new,
   21125             : };
   21126             : 
   21127             : 
   21128           0 : static PyObject *py_srvsvc_NetSrvInfo1509_get_maxrawbuflen(PyObject *obj, void *closure)
   21129             : {
   21130           0 :         struct srvsvc_NetSrvInfo1509 *object = pytalloc_get_ptr(obj);
   21131           0 :         PyObject *py_maxrawbuflen;
   21132           0 :         py_maxrawbuflen = PyLong_FromUnsignedLongLong((uint32_t)(object->maxrawbuflen));
   21133           0 :         return py_maxrawbuflen;
   21134             : }
   21135             : 
   21136           0 : static int py_srvsvc_NetSrvInfo1509_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
   21137             : {
   21138           0 :         struct srvsvc_NetSrvInfo1509 *object = pytalloc_get_ptr(py_obj);
   21139           0 :         if (value == NULL) {
   21140           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxrawbuflen");
   21141           0 :                 return -1;
   21142             :         }
   21143             :         {
   21144           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
   21145           0 :                 if (PyLong_Check(value)) {
   21146           0 :                         unsigned long long test_var;
   21147           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21148           0 :                         if (PyErr_Occurred() != NULL) {
   21149           0 :                                 return -1;
   21150             :                         }
   21151           0 :                         if (test_var > uint_max) {
   21152           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21153             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21154           0 :                                 return -1;
   21155             :                         }
   21156           0 :                         object->maxrawbuflen = test_var;
   21157             :                 } else {
   21158           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21159             :                           PyLong_Type.tp_name);
   21160           0 :                         return -1;
   21161             :                 }
   21162             :         }
   21163           0 :         return 0;
   21164             : }
   21165             : 
   21166             : static PyGetSetDef py_srvsvc_NetSrvInfo1509_getsetters[] = {
   21167             :         {
   21168             :                 .name = discard_const_p(char, "maxrawbuflen"),
   21169             :                 .get = py_srvsvc_NetSrvInfo1509_get_maxrawbuflen,
   21170             :                 .set = py_srvsvc_NetSrvInfo1509_set_maxrawbuflen,
   21171             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21172             :         },
   21173             :         { .name = NULL }
   21174             : };
   21175             : 
   21176           0 : static PyObject *py_srvsvc_NetSrvInfo1509_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21177             : {
   21178           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1509, type);
   21179             : }
   21180             : 
   21181             : 
   21182             : static PyTypeObject srvsvc_NetSrvInfo1509_Type = {
   21183             :         PyVarObject_HEAD_INIT(NULL, 0)
   21184             :         .tp_name = "srvsvc.NetSrvInfo1509",
   21185             :         .tp_getset = py_srvsvc_NetSrvInfo1509_getsetters,
   21186             :         .tp_methods = NULL,
   21187             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21188             :         .tp_new = py_srvsvc_NetSrvInfo1509_new,
   21189             : };
   21190             : 
   21191             : 
   21192           0 : static PyObject *py_srvsvc_NetSrvInfo1510_get_sessusers(PyObject *obj, void *closure)
   21193             : {
   21194           0 :         struct srvsvc_NetSrvInfo1510 *object = pytalloc_get_ptr(obj);
   21195           0 :         PyObject *py_sessusers;
   21196           0 :         py_sessusers = PyLong_FromUnsignedLongLong((uint32_t)(object->sessusers));
   21197           0 :         return py_sessusers;
   21198             : }
   21199             : 
   21200           0 : static int py_srvsvc_NetSrvInfo1510_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
   21201             : {
   21202           0 :         struct srvsvc_NetSrvInfo1510 *object = pytalloc_get_ptr(py_obj);
   21203           0 :         if (value == NULL) {
   21204           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sessusers");
   21205           0 :                 return -1;
   21206             :         }
   21207             :         {
   21208           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
   21209           0 :                 if (PyLong_Check(value)) {
   21210           0 :                         unsigned long long test_var;
   21211           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21212           0 :                         if (PyErr_Occurred() != NULL) {
   21213           0 :                                 return -1;
   21214             :                         }
   21215           0 :                         if (test_var > uint_max) {
   21216           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21217             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21218           0 :                                 return -1;
   21219             :                         }
   21220           0 :                         object->sessusers = test_var;
   21221             :                 } else {
   21222           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21223             :                           PyLong_Type.tp_name);
   21224           0 :                         return -1;
   21225             :                 }
   21226             :         }
   21227           0 :         return 0;
   21228             : }
   21229             : 
   21230             : static PyGetSetDef py_srvsvc_NetSrvInfo1510_getsetters[] = {
   21231             :         {
   21232             :                 .name = discard_const_p(char, "sessusers"),
   21233             :                 .get = py_srvsvc_NetSrvInfo1510_get_sessusers,
   21234             :                 .set = py_srvsvc_NetSrvInfo1510_set_sessusers,
   21235             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21236             :         },
   21237             :         { .name = NULL }
   21238             : };
   21239             : 
   21240           0 : static PyObject *py_srvsvc_NetSrvInfo1510_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21241             : {
   21242           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1510, type);
   21243             : }
   21244             : 
   21245             : 
   21246             : static PyTypeObject srvsvc_NetSrvInfo1510_Type = {
   21247             :         PyVarObject_HEAD_INIT(NULL, 0)
   21248             :         .tp_name = "srvsvc.NetSrvInfo1510",
   21249             :         .tp_getset = py_srvsvc_NetSrvInfo1510_getsetters,
   21250             :         .tp_methods = NULL,
   21251             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21252             :         .tp_new = py_srvsvc_NetSrvInfo1510_new,
   21253             : };
   21254             : 
   21255             : 
   21256           0 : static PyObject *py_srvsvc_NetSrvInfo1511_get_sesscons(PyObject *obj, void *closure)
   21257             : {
   21258           0 :         struct srvsvc_NetSrvInfo1511 *object = pytalloc_get_ptr(obj);
   21259           0 :         PyObject *py_sesscons;
   21260           0 :         py_sesscons = PyLong_FromUnsignedLongLong((uint32_t)(object->sesscons));
   21261           0 :         return py_sesscons;
   21262             : }
   21263             : 
   21264           0 : static int py_srvsvc_NetSrvInfo1511_set_sesscons(PyObject *py_obj, PyObject *value, void *closure)
   21265             : {
   21266           0 :         struct srvsvc_NetSrvInfo1511 *object = pytalloc_get_ptr(py_obj);
   21267           0 :         if (value == NULL) {
   21268           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sesscons");
   21269           0 :                 return -1;
   21270             :         }
   21271             :         {
   21272           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesscons));
   21273           0 :                 if (PyLong_Check(value)) {
   21274           0 :                         unsigned long long test_var;
   21275           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21276           0 :                         if (PyErr_Occurred() != NULL) {
   21277           0 :                                 return -1;
   21278             :                         }
   21279           0 :                         if (test_var > uint_max) {
   21280           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21281             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21282           0 :                                 return -1;
   21283             :                         }
   21284           0 :                         object->sesscons = test_var;
   21285             :                 } else {
   21286           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21287             :                           PyLong_Type.tp_name);
   21288           0 :                         return -1;
   21289             :                 }
   21290             :         }
   21291           0 :         return 0;
   21292             : }
   21293             : 
   21294             : static PyGetSetDef py_srvsvc_NetSrvInfo1511_getsetters[] = {
   21295             :         {
   21296             :                 .name = discard_const_p(char, "sesscons"),
   21297             :                 .get = py_srvsvc_NetSrvInfo1511_get_sesscons,
   21298             :                 .set = py_srvsvc_NetSrvInfo1511_set_sesscons,
   21299             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21300             :         },
   21301             :         { .name = NULL }
   21302             : };
   21303             : 
   21304           0 : static PyObject *py_srvsvc_NetSrvInfo1511_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21305             : {
   21306           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1511, type);
   21307             : }
   21308             : 
   21309             : 
   21310             : static PyTypeObject srvsvc_NetSrvInfo1511_Type = {
   21311             :         PyVarObject_HEAD_INIT(NULL, 0)
   21312             :         .tp_name = "srvsvc.NetSrvInfo1511",
   21313             :         .tp_getset = py_srvsvc_NetSrvInfo1511_getsetters,
   21314             :         .tp_methods = NULL,
   21315             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21316             :         .tp_new = py_srvsvc_NetSrvInfo1511_new,
   21317             : };
   21318             : 
   21319             : 
   21320           0 : static PyObject *py_srvsvc_NetSrvInfo1512_get_maxnonpagedmemoryusage(PyObject *obj, void *closure)
   21321             : {
   21322           0 :         struct srvsvc_NetSrvInfo1512 *object = pytalloc_get_ptr(obj);
   21323           0 :         PyObject *py_maxnonpagedmemoryusage;
   21324           0 :         py_maxnonpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)(object->maxnonpagedmemoryusage));
   21325           0 :         return py_maxnonpagedmemoryusage;
   21326             : }
   21327             : 
   21328           0 : static int py_srvsvc_NetSrvInfo1512_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   21329             : {
   21330           0 :         struct srvsvc_NetSrvInfo1512 *object = pytalloc_get_ptr(py_obj);
   21331           0 :         if (value == NULL) {
   21332           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxnonpagedmemoryusage");
   21333           0 :                 return -1;
   21334             :         }
   21335             :         {
   21336           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
   21337           0 :                 if (PyLong_Check(value)) {
   21338           0 :                         unsigned long long test_var;
   21339           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21340           0 :                         if (PyErr_Occurred() != NULL) {
   21341           0 :                                 return -1;
   21342             :                         }
   21343           0 :                         if (test_var > uint_max) {
   21344           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21345             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21346           0 :                                 return -1;
   21347             :                         }
   21348           0 :                         object->maxnonpagedmemoryusage = test_var;
   21349             :                 } else {
   21350           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21351             :                           PyLong_Type.tp_name);
   21352           0 :                         return -1;
   21353             :                 }
   21354             :         }
   21355           0 :         return 0;
   21356             : }
   21357             : 
   21358             : static PyGetSetDef py_srvsvc_NetSrvInfo1512_getsetters[] = {
   21359             :         {
   21360             :                 .name = discard_const_p(char, "maxnonpagedmemoryusage"),
   21361             :                 .get = py_srvsvc_NetSrvInfo1512_get_maxnonpagedmemoryusage,
   21362             :                 .set = py_srvsvc_NetSrvInfo1512_set_maxnonpagedmemoryusage,
   21363             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21364             :         },
   21365             :         { .name = NULL }
   21366             : };
   21367             : 
   21368           0 : static PyObject *py_srvsvc_NetSrvInfo1512_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21369             : {
   21370           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1512, type);
   21371             : }
   21372             : 
   21373             : 
   21374             : static PyTypeObject srvsvc_NetSrvInfo1512_Type = {
   21375             :         PyVarObject_HEAD_INIT(NULL, 0)
   21376             :         .tp_name = "srvsvc.NetSrvInfo1512",
   21377             :         .tp_getset = py_srvsvc_NetSrvInfo1512_getsetters,
   21378             :         .tp_methods = NULL,
   21379             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21380             :         .tp_new = py_srvsvc_NetSrvInfo1512_new,
   21381             : };
   21382             : 
   21383             : 
   21384           0 : static PyObject *py_srvsvc_NetSrvInfo1513_get_maxpagedmemoryusage(PyObject *obj, void *closure)
   21385             : {
   21386           0 :         struct srvsvc_NetSrvInfo1513 *object = pytalloc_get_ptr(obj);
   21387           0 :         PyObject *py_maxpagedmemoryusage;
   21388           0 :         py_maxpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)(object->maxpagedmemoryusage));
   21389           0 :         return py_maxpagedmemoryusage;
   21390             : }
   21391             : 
   21392           0 : static int py_srvsvc_NetSrvInfo1513_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   21393             : {
   21394           0 :         struct srvsvc_NetSrvInfo1513 *object = pytalloc_get_ptr(py_obj);
   21395           0 :         if (value == NULL) {
   21396           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxpagedmemoryusage");
   21397           0 :                 return -1;
   21398             :         }
   21399             :         {
   21400           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
   21401           0 :                 if (PyLong_Check(value)) {
   21402           0 :                         unsigned long long test_var;
   21403           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21404           0 :                         if (PyErr_Occurred() != NULL) {
   21405           0 :                                 return -1;
   21406             :                         }
   21407           0 :                         if (test_var > uint_max) {
   21408           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21409             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21410           0 :                                 return -1;
   21411             :                         }
   21412           0 :                         object->maxpagedmemoryusage = test_var;
   21413             :                 } else {
   21414           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21415             :                           PyLong_Type.tp_name);
   21416           0 :                         return -1;
   21417             :                 }
   21418             :         }
   21419           0 :         return 0;
   21420             : }
   21421             : 
   21422             : static PyGetSetDef py_srvsvc_NetSrvInfo1513_getsetters[] = {
   21423             :         {
   21424             :                 .name = discard_const_p(char, "maxpagedmemoryusage"),
   21425             :                 .get = py_srvsvc_NetSrvInfo1513_get_maxpagedmemoryusage,
   21426             :                 .set = py_srvsvc_NetSrvInfo1513_set_maxpagedmemoryusage,
   21427             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21428             :         },
   21429             :         { .name = NULL }
   21430             : };
   21431             : 
   21432           0 : static PyObject *py_srvsvc_NetSrvInfo1513_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21433             : {
   21434           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1513, type);
   21435             : }
   21436             : 
   21437             : 
   21438             : static PyTypeObject srvsvc_NetSrvInfo1513_Type = {
   21439             :         PyVarObject_HEAD_INIT(NULL, 0)
   21440             :         .tp_name = "srvsvc.NetSrvInfo1513",
   21441             :         .tp_getset = py_srvsvc_NetSrvInfo1513_getsetters,
   21442             :         .tp_methods = NULL,
   21443             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21444             :         .tp_new = py_srvsvc_NetSrvInfo1513_new,
   21445             : };
   21446             : 
   21447             : 
   21448           0 : static PyObject *py_srvsvc_NetSrvInfo1514_get_enablesoftcompat(PyObject *obj, void *closure)
   21449             : {
   21450           0 :         struct srvsvc_NetSrvInfo1514 *object = pytalloc_get_ptr(obj);
   21451           0 :         PyObject *py_enablesoftcompat;
   21452           0 :         py_enablesoftcompat = PyLong_FromUnsignedLongLong((uint32_t)(object->enablesoftcompat));
   21453           0 :         return py_enablesoftcompat;
   21454             : }
   21455             : 
   21456           0 : static int py_srvsvc_NetSrvInfo1514_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
   21457             : {
   21458           0 :         struct srvsvc_NetSrvInfo1514 *object = pytalloc_get_ptr(py_obj);
   21459           0 :         if (value == NULL) {
   21460           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enablesoftcompat");
   21461           0 :                 return -1;
   21462             :         }
   21463             :         {
   21464           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
   21465           0 :                 if (PyLong_Check(value)) {
   21466           0 :                         unsigned long long test_var;
   21467           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21468           0 :                         if (PyErr_Occurred() != NULL) {
   21469           0 :                                 return -1;
   21470             :                         }
   21471           0 :                         if (test_var > uint_max) {
   21472           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21473             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21474           0 :                                 return -1;
   21475             :                         }
   21476           0 :                         object->enablesoftcompat = test_var;
   21477             :                 } else {
   21478           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21479             :                           PyLong_Type.tp_name);
   21480           0 :                         return -1;
   21481             :                 }
   21482             :         }
   21483           0 :         return 0;
   21484             : }
   21485             : 
   21486             : static PyGetSetDef py_srvsvc_NetSrvInfo1514_getsetters[] = {
   21487             :         {
   21488             :                 .name = discard_const_p(char, "enablesoftcompat"),
   21489             :                 .get = py_srvsvc_NetSrvInfo1514_get_enablesoftcompat,
   21490             :                 .set = py_srvsvc_NetSrvInfo1514_set_enablesoftcompat,
   21491             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21492             :         },
   21493             :         { .name = NULL }
   21494             : };
   21495             : 
   21496           0 : static PyObject *py_srvsvc_NetSrvInfo1514_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21497             : {
   21498           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1514, type);
   21499             : }
   21500             : 
   21501             : 
   21502             : static PyTypeObject srvsvc_NetSrvInfo1514_Type = {
   21503             :         PyVarObject_HEAD_INIT(NULL, 0)
   21504             :         .tp_name = "srvsvc.NetSrvInfo1514",
   21505             :         .tp_getset = py_srvsvc_NetSrvInfo1514_getsetters,
   21506             :         .tp_methods = NULL,
   21507             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21508             :         .tp_new = py_srvsvc_NetSrvInfo1514_new,
   21509             : };
   21510             : 
   21511             : 
   21512           0 : static PyObject *py_srvsvc_NetSrvInfo1515_get_enableforcedlogoff(PyObject *obj, void *closure)
   21513             : {
   21514           0 :         struct srvsvc_NetSrvInfo1515 *object = pytalloc_get_ptr(obj);
   21515           0 :         PyObject *py_enableforcedlogoff;
   21516           0 :         py_enableforcedlogoff = PyLong_FromUnsignedLongLong((uint32_t)(object->enableforcedlogoff));
   21517           0 :         return py_enableforcedlogoff;
   21518             : }
   21519             : 
   21520           0 : static int py_srvsvc_NetSrvInfo1515_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
   21521             : {
   21522           0 :         struct srvsvc_NetSrvInfo1515 *object = pytalloc_get_ptr(py_obj);
   21523           0 :         if (value == NULL) {
   21524           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableforcedlogoff");
   21525           0 :                 return -1;
   21526             :         }
   21527             :         {
   21528           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
   21529           0 :                 if (PyLong_Check(value)) {
   21530           0 :                         unsigned long long test_var;
   21531           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21532           0 :                         if (PyErr_Occurred() != NULL) {
   21533           0 :                                 return -1;
   21534             :                         }
   21535           0 :                         if (test_var > uint_max) {
   21536           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21537             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21538           0 :                                 return -1;
   21539             :                         }
   21540           0 :                         object->enableforcedlogoff = test_var;
   21541             :                 } else {
   21542           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21543             :                           PyLong_Type.tp_name);
   21544           0 :                         return -1;
   21545             :                 }
   21546             :         }
   21547           0 :         return 0;
   21548             : }
   21549             : 
   21550             : static PyGetSetDef py_srvsvc_NetSrvInfo1515_getsetters[] = {
   21551             :         {
   21552             :                 .name = discard_const_p(char, "enableforcedlogoff"),
   21553             :                 .get = py_srvsvc_NetSrvInfo1515_get_enableforcedlogoff,
   21554             :                 .set = py_srvsvc_NetSrvInfo1515_set_enableforcedlogoff,
   21555             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21556             :         },
   21557             :         { .name = NULL }
   21558             : };
   21559             : 
   21560           0 : static PyObject *py_srvsvc_NetSrvInfo1515_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21561             : {
   21562           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1515, type);
   21563             : }
   21564             : 
   21565             : 
   21566             : static PyTypeObject srvsvc_NetSrvInfo1515_Type = {
   21567             :         PyVarObject_HEAD_INIT(NULL, 0)
   21568             :         .tp_name = "srvsvc.NetSrvInfo1515",
   21569             :         .tp_getset = py_srvsvc_NetSrvInfo1515_getsetters,
   21570             :         .tp_methods = NULL,
   21571             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21572             :         .tp_new = py_srvsvc_NetSrvInfo1515_new,
   21573             : };
   21574             : 
   21575             : 
   21576           0 : static PyObject *py_srvsvc_NetSrvInfo1516_get_timesource(PyObject *obj, void *closure)
   21577             : {
   21578           0 :         struct srvsvc_NetSrvInfo1516 *object = pytalloc_get_ptr(obj);
   21579           0 :         PyObject *py_timesource;
   21580           0 :         py_timesource = PyLong_FromUnsignedLongLong((uint32_t)(object->timesource));
   21581           0 :         return py_timesource;
   21582             : }
   21583             : 
   21584           0 : static int py_srvsvc_NetSrvInfo1516_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
   21585             : {
   21586           0 :         struct srvsvc_NetSrvInfo1516 *object = pytalloc_get_ptr(py_obj);
   21587           0 :         if (value == NULL) {
   21588           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timesource");
   21589           0 :                 return -1;
   21590             :         }
   21591             :         {
   21592           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
   21593           0 :                 if (PyLong_Check(value)) {
   21594           0 :                         unsigned long long test_var;
   21595           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21596           0 :                         if (PyErr_Occurred() != NULL) {
   21597           0 :                                 return -1;
   21598             :                         }
   21599           0 :                         if (test_var > uint_max) {
   21600           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21601             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21602           0 :                                 return -1;
   21603             :                         }
   21604           0 :                         object->timesource = test_var;
   21605             :                 } else {
   21606           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21607             :                           PyLong_Type.tp_name);
   21608           0 :                         return -1;
   21609             :                 }
   21610             :         }
   21611           0 :         return 0;
   21612             : }
   21613             : 
   21614             : static PyGetSetDef py_srvsvc_NetSrvInfo1516_getsetters[] = {
   21615             :         {
   21616             :                 .name = discard_const_p(char, "timesource"),
   21617             :                 .get = py_srvsvc_NetSrvInfo1516_get_timesource,
   21618             :                 .set = py_srvsvc_NetSrvInfo1516_set_timesource,
   21619             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21620             :         },
   21621             :         { .name = NULL }
   21622             : };
   21623             : 
   21624           0 : static PyObject *py_srvsvc_NetSrvInfo1516_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21625             : {
   21626           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1516, type);
   21627             : }
   21628             : 
   21629             : 
   21630             : static PyTypeObject srvsvc_NetSrvInfo1516_Type = {
   21631             :         PyVarObject_HEAD_INIT(NULL, 0)
   21632             :         .tp_name = "srvsvc.NetSrvInfo1516",
   21633             :         .tp_getset = py_srvsvc_NetSrvInfo1516_getsetters,
   21634             :         .tp_methods = NULL,
   21635             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21636             :         .tp_new = py_srvsvc_NetSrvInfo1516_new,
   21637             : };
   21638             : 
   21639             : 
   21640           0 : static PyObject *py_srvsvc_NetSrvInfo1518_get_lmannounce(PyObject *obj, void *closure)
   21641             : {
   21642           0 :         struct srvsvc_NetSrvInfo1518 *object = pytalloc_get_ptr(obj);
   21643           0 :         PyObject *py_lmannounce;
   21644           0 :         py_lmannounce = PyLong_FromUnsignedLongLong((uint32_t)(object->lmannounce));
   21645           0 :         return py_lmannounce;
   21646             : }
   21647             : 
   21648           0 : static int py_srvsvc_NetSrvInfo1518_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
   21649             : {
   21650           0 :         struct srvsvc_NetSrvInfo1518 *object = pytalloc_get_ptr(py_obj);
   21651           0 :         if (value == NULL) {
   21652           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lmannounce");
   21653           0 :                 return -1;
   21654             :         }
   21655             :         {
   21656           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
   21657           0 :                 if (PyLong_Check(value)) {
   21658           0 :                         unsigned long long test_var;
   21659           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21660           0 :                         if (PyErr_Occurred() != NULL) {
   21661           0 :                                 return -1;
   21662             :                         }
   21663           0 :                         if (test_var > uint_max) {
   21664           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21665             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21666           0 :                                 return -1;
   21667             :                         }
   21668           0 :                         object->lmannounce = test_var;
   21669             :                 } else {
   21670           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21671             :                           PyLong_Type.tp_name);
   21672           0 :                         return -1;
   21673             :                 }
   21674             :         }
   21675           0 :         return 0;
   21676             : }
   21677             : 
   21678             : static PyGetSetDef py_srvsvc_NetSrvInfo1518_getsetters[] = {
   21679             :         {
   21680             :                 .name = discard_const_p(char, "lmannounce"),
   21681             :                 .get = py_srvsvc_NetSrvInfo1518_get_lmannounce,
   21682             :                 .set = py_srvsvc_NetSrvInfo1518_set_lmannounce,
   21683             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21684             :         },
   21685             :         { .name = NULL }
   21686             : };
   21687             : 
   21688           0 : static PyObject *py_srvsvc_NetSrvInfo1518_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21689             : {
   21690           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1518, type);
   21691             : }
   21692             : 
   21693             : 
   21694             : static PyTypeObject srvsvc_NetSrvInfo1518_Type = {
   21695             :         PyVarObject_HEAD_INIT(NULL, 0)
   21696             :         .tp_name = "srvsvc.NetSrvInfo1518",
   21697             :         .tp_getset = py_srvsvc_NetSrvInfo1518_getsetters,
   21698             :         .tp_methods = NULL,
   21699             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21700             :         .tp_new = py_srvsvc_NetSrvInfo1518_new,
   21701             : };
   21702             : 
   21703             : 
   21704           0 : static PyObject *py_srvsvc_NetSrvInfo1520_get_maxcopyreadlen(PyObject *obj, void *closure)
   21705             : {
   21706           0 :         struct srvsvc_NetSrvInfo1520 *object = pytalloc_get_ptr(obj);
   21707           0 :         PyObject *py_maxcopyreadlen;
   21708           0 :         py_maxcopyreadlen = PyLong_FromUnsignedLongLong((uint32_t)(object->maxcopyreadlen));
   21709           0 :         return py_maxcopyreadlen;
   21710             : }
   21711             : 
   21712           0 : static int py_srvsvc_NetSrvInfo1520_set_maxcopyreadlen(PyObject *py_obj, PyObject *value, void *closure)
   21713             : {
   21714           0 :         struct srvsvc_NetSrvInfo1520 *object = pytalloc_get_ptr(py_obj);
   21715           0 :         if (value == NULL) {
   21716           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxcopyreadlen");
   21717           0 :                 return -1;
   21718             :         }
   21719             :         {
   21720           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopyreadlen));
   21721           0 :                 if (PyLong_Check(value)) {
   21722           0 :                         unsigned long long test_var;
   21723           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21724           0 :                         if (PyErr_Occurred() != NULL) {
   21725           0 :                                 return -1;
   21726             :                         }
   21727           0 :                         if (test_var > uint_max) {
   21728           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21729             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21730           0 :                                 return -1;
   21731             :                         }
   21732           0 :                         object->maxcopyreadlen = test_var;
   21733             :                 } else {
   21734           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21735             :                           PyLong_Type.tp_name);
   21736           0 :                         return -1;
   21737             :                 }
   21738             :         }
   21739           0 :         return 0;
   21740             : }
   21741             : 
   21742             : static PyGetSetDef py_srvsvc_NetSrvInfo1520_getsetters[] = {
   21743             :         {
   21744             :                 .name = discard_const_p(char, "maxcopyreadlen"),
   21745             :                 .get = py_srvsvc_NetSrvInfo1520_get_maxcopyreadlen,
   21746             :                 .set = py_srvsvc_NetSrvInfo1520_set_maxcopyreadlen,
   21747             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21748             :         },
   21749             :         { .name = NULL }
   21750             : };
   21751             : 
   21752           0 : static PyObject *py_srvsvc_NetSrvInfo1520_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21753             : {
   21754           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1520, type);
   21755             : }
   21756             : 
   21757             : 
   21758             : static PyTypeObject srvsvc_NetSrvInfo1520_Type = {
   21759             :         PyVarObject_HEAD_INIT(NULL, 0)
   21760             :         .tp_name = "srvsvc.NetSrvInfo1520",
   21761             :         .tp_getset = py_srvsvc_NetSrvInfo1520_getsetters,
   21762             :         .tp_methods = NULL,
   21763             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21764             :         .tp_new = py_srvsvc_NetSrvInfo1520_new,
   21765             : };
   21766             : 
   21767             : 
   21768           0 : static PyObject *py_srvsvc_NetSrvInfo1521_get_maxcopywritelen(PyObject *obj, void *closure)
   21769             : {
   21770           0 :         struct srvsvc_NetSrvInfo1521 *object = pytalloc_get_ptr(obj);
   21771           0 :         PyObject *py_maxcopywritelen;
   21772           0 :         py_maxcopywritelen = PyLong_FromUnsignedLongLong((uint32_t)(object->maxcopywritelen));
   21773           0 :         return py_maxcopywritelen;
   21774             : }
   21775             : 
   21776           0 : static int py_srvsvc_NetSrvInfo1521_set_maxcopywritelen(PyObject *py_obj, PyObject *value, void *closure)
   21777             : {
   21778           0 :         struct srvsvc_NetSrvInfo1521 *object = pytalloc_get_ptr(py_obj);
   21779           0 :         if (value == NULL) {
   21780           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxcopywritelen");
   21781           0 :                 return -1;
   21782             :         }
   21783             :         {
   21784           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopywritelen));
   21785           0 :                 if (PyLong_Check(value)) {
   21786           0 :                         unsigned long long test_var;
   21787           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21788           0 :                         if (PyErr_Occurred() != NULL) {
   21789           0 :                                 return -1;
   21790             :                         }
   21791           0 :                         if (test_var > uint_max) {
   21792           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21793             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21794           0 :                                 return -1;
   21795             :                         }
   21796           0 :                         object->maxcopywritelen = test_var;
   21797             :                 } else {
   21798           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21799             :                           PyLong_Type.tp_name);
   21800           0 :                         return -1;
   21801             :                 }
   21802             :         }
   21803           0 :         return 0;
   21804             : }
   21805             : 
   21806             : static PyGetSetDef py_srvsvc_NetSrvInfo1521_getsetters[] = {
   21807             :         {
   21808             :                 .name = discard_const_p(char, "maxcopywritelen"),
   21809             :                 .get = py_srvsvc_NetSrvInfo1521_get_maxcopywritelen,
   21810             :                 .set = py_srvsvc_NetSrvInfo1521_set_maxcopywritelen,
   21811             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21812             :         },
   21813             :         { .name = NULL }
   21814             : };
   21815             : 
   21816           0 : static PyObject *py_srvsvc_NetSrvInfo1521_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21817             : {
   21818           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1521, type);
   21819             : }
   21820             : 
   21821             : 
   21822             : static PyTypeObject srvsvc_NetSrvInfo1521_Type = {
   21823             :         PyVarObject_HEAD_INIT(NULL, 0)
   21824             :         .tp_name = "srvsvc.NetSrvInfo1521",
   21825             :         .tp_getset = py_srvsvc_NetSrvInfo1521_getsetters,
   21826             :         .tp_methods = NULL,
   21827             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21828             :         .tp_new = py_srvsvc_NetSrvInfo1521_new,
   21829             : };
   21830             : 
   21831             : 
   21832           0 : static PyObject *py_srvsvc_NetSrvInfo1522_get_minkeepsearch(PyObject *obj, void *closure)
   21833             : {
   21834           0 :         struct srvsvc_NetSrvInfo1522 *object = pytalloc_get_ptr(obj);
   21835           0 :         PyObject *py_minkeepsearch;
   21836           0 :         py_minkeepsearch = PyLong_FromUnsignedLongLong((uint32_t)(object->minkeepsearch));
   21837           0 :         return py_minkeepsearch;
   21838             : }
   21839             : 
   21840           0 : static int py_srvsvc_NetSrvInfo1522_set_minkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
   21841             : {
   21842           0 :         struct srvsvc_NetSrvInfo1522 *object = pytalloc_get_ptr(py_obj);
   21843           0 :         if (value == NULL) {
   21844           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minkeepsearch");
   21845           0 :                 return -1;
   21846             :         }
   21847             :         {
   21848           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepsearch));
   21849           0 :                 if (PyLong_Check(value)) {
   21850           0 :                         unsigned long long test_var;
   21851           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21852           0 :                         if (PyErr_Occurred() != NULL) {
   21853           0 :                                 return -1;
   21854             :                         }
   21855           0 :                         if (test_var > uint_max) {
   21856           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21857             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21858           0 :                                 return -1;
   21859             :                         }
   21860           0 :                         object->minkeepsearch = test_var;
   21861             :                 } else {
   21862           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21863             :                           PyLong_Type.tp_name);
   21864           0 :                         return -1;
   21865             :                 }
   21866             :         }
   21867           0 :         return 0;
   21868             : }
   21869             : 
   21870             : static PyGetSetDef py_srvsvc_NetSrvInfo1522_getsetters[] = {
   21871             :         {
   21872             :                 .name = discard_const_p(char, "minkeepsearch"),
   21873             :                 .get = py_srvsvc_NetSrvInfo1522_get_minkeepsearch,
   21874             :                 .set = py_srvsvc_NetSrvInfo1522_set_minkeepsearch,
   21875             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21876             :         },
   21877             :         { .name = NULL }
   21878             : };
   21879             : 
   21880           0 : static PyObject *py_srvsvc_NetSrvInfo1522_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21881             : {
   21882           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1522, type);
   21883             : }
   21884             : 
   21885             : 
   21886             : static PyTypeObject srvsvc_NetSrvInfo1522_Type = {
   21887             :         PyVarObject_HEAD_INIT(NULL, 0)
   21888             :         .tp_name = "srvsvc.NetSrvInfo1522",
   21889             :         .tp_getset = py_srvsvc_NetSrvInfo1522_getsetters,
   21890             :         .tp_methods = NULL,
   21891             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21892             :         .tp_new = py_srvsvc_NetSrvInfo1522_new,
   21893             : };
   21894             : 
   21895             : 
   21896           0 : static PyObject *py_srvsvc_NetSrvInfo1523_get_maxkeepsearch(PyObject *obj, void *closure)
   21897             : {
   21898           0 :         struct srvsvc_NetSrvInfo1523 *object = pytalloc_get_ptr(obj);
   21899           0 :         PyObject *py_maxkeepsearch;
   21900           0 :         py_maxkeepsearch = PyLong_FromUnsignedLongLong((uint32_t)(object->maxkeepsearch));
   21901           0 :         return py_maxkeepsearch;
   21902             : }
   21903             : 
   21904           0 : static int py_srvsvc_NetSrvInfo1523_set_maxkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
   21905             : {
   21906           0 :         struct srvsvc_NetSrvInfo1523 *object = pytalloc_get_ptr(py_obj);
   21907           0 :         if (value == NULL) {
   21908           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxkeepsearch");
   21909           0 :                 return -1;
   21910             :         }
   21911             :         {
   21912           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepsearch));
   21913           0 :                 if (PyLong_Check(value)) {
   21914           0 :                         unsigned long long test_var;
   21915           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21916           0 :                         if (PyErr_Occurred() != NULL) {
   21917           0 :                                 return -1;
   21918             :                         }
   21919           0 :                         if (test_var > uint_max) {
   21920           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21921             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21922           0 :                                 return -1;
   21923             :                         }
   21924           0 :                         object->maxkeepsearch = test_var;
   21925             :                 } else {
   21926           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21927             :                           PyLong_Type.tp_name);
   21928           0 :                         return -1;
   21929             :                 }
   21930             :         }
   21931           0 :         return 0;
   21932             : }
   21933             : 
   21934             : static PyGetSetDef py_srvsvc_NetSrvInfo1523_getsetters[] = {
   21935             :         {
   21936             :                 .name = discard_const_p(char, "maxkeepsearch"),
   21937             :                 .get = py_srvsvc_NetSrvInfo1523_get_maxkeepsearch,
   21938             :                 .set = py_srvsvc_NetSrvInfo1523_set_maxkeepsearch,
   21939             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21940             :         },
   21941             :         { .name = NULL }
   21942             : };
   21943             : 
   21944           0 : static PyObject *py_srvsvc_NetSrvInfo1523_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21945             : {
   21946           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1523, type);
   21947             : }
   21948             : 
   21949             : 
   21950             : static PyTypeObject srvsvc_NetSrvInfo1523_Type = {
   21951             :         PyVarObject_HEAD_INIT(NULL, 0)
   21952             :         .tp_name = "srvsvc.NetSrvInfo1523",
   21953             :         .tp_getset = py_srvsvc_NetSrvInfo1523_getsetters,
   21954             :         .tp_methods = NULL,
   21955             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21956             :         .tp_new = py_srvsvc_NetSrvInfo1523_new,
   21957             : };
   21958             : 
   21959             : 
   21960           0 : static PyObject *py_srvsvc_NetSrvInfo1524_get_minkeepcomplsearch(PyObject *obj, void *closure)
   21961             : {
   21962           0 :         struct srvsvc_NetSrvInfo1524 *object = pytalloc_get_ptr(obj);
   21963           0 :         PyObject *py_minkeepcomplsearch;
   21964           0 :         py_minkeepcomplsearch = PyLong_FromUnsignedLongLong((uint32_t)(object->minkeepcomplsearch));
   21965           0 :         return py_minkeepcomplsearch;
   21966             : }
   21967             : 
   21968           0 : static int py_srvsvc_NetSrvInfo1524_set_minkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
   21969             : {
   21970           0 :         struct srvsvc_NetSrvInfo1524 *object = pytalloc_get_ptr(py_obj);
   21971           0 :         if (value == NULL) {
   21972           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minkeepcomplsearch");
   21973           0 :                 return -1;
   21974             :         }
   21975             :         {
   21976           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepcomplsearch));
   21977           0 :                 if (PyLong_Check(value)) {
   21978           0 :                         unsigned long long test_var;
   21979           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21980           0 :                         if (PyErr_Occurred() != NULL) {
   21981           0 :                                 return -1;
   21982             :                         }
   21983           0 :                         if (test_var > uint_max) {
   21984           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21985             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21986           0 :                                 return -1;
   21987             :                         }
   21988           0 :                         object->minkeepcomplsearch = test_var;
   21989             :                 } else {
   21990           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21991             :                           PyLong_Type.tp_name);
   21992           0 :                         return -1;
   21993             :                 }
   21994             :         }
   21995           0 :         return 0;
   21996             : }
   21997             : 
   21998             : static PyGetSetDef py_srvsvc_NetSrvInfo1524_getsetters[] = {
   21999             :         {
   22000             :                 .name = discard_const_p(char, "minkeepcomplsearch"),
   22001             :                 .get = py_srvsvc_NetSrvInfo1524_get_minkeepcomplsearch,
   22002             :                 .set = py_srvsvc_NetSrvInfo1524_set_minkeepcomplsearch,
   22003             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22004             :         },
   22005             :         { .name = NULL }
   22006             : };
   22007             : 
   22008           0 : static PyObject *py_srvsvc_NetSrvInfo1524_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22009             : {
   22010           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1524, type);
   22011             : }
   22012             : 
   22013             : 
   22014             : static PyTypeObject srvsvc_NetSrvInfo1524_Type = {
   22015             :         PyVarObject_HEAD_INIT(NULL, 0)
   22016             :         .tp_name = "srvsvc.NetSrvInfo1524",
   22017             :         .tp_getset = py_srvsvc_NetSrvInfo1524_getsetters,
   22018             :         .tp_methods = NULL,
   22019             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22020             :         .tp_new = py_srvsvc_NetSrvInfo1524_new,
   22021             : };
   22022             : 
   22023             : 
   22024           0 : static PyObject *py_srvsvc_NetSrvInfo1525_get_maxkeepcomplsearch(PyObject *obj, void *closure)
   22025             : {
   22026           0 :         struct srvsvc_NetSrvInfo1525 *object = pytalloc_get_ptr(obj);
   22027           0 :         PyObject *py_maxkeepcomplsearch;
   22028           0 :         py_maxkeepcomplsearch = PyLong_FromUnsignedLongLong((uint32_t)(object->maxkeepcomplsearch));
   22029           0 :         return py_maxkeepcomplsearch;
   22030             : }
   22031             : 
   22032           0 : static int py_srvsvc_NetSrvInfo1525_set_maxkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
   22033             : {
   22034           0 :         struct srvsvc_NetSrvInfo1525 *object = pytalloc_get_ptr(py_obj);
   22035           0 :         if (value == NULL) {
   22036           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxkeepcomplsearch");
   22037           0 :                 return -1;
   22038             :         }
   22039             :         {
   22040           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepcomplsearch));
   22041           0 :                 if (PyLong_Check(value)) {
   22042           0 :                         unsigned long long test_var;
   22043           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22044           0 :                         if (PyErr_Occurred() != NULL) {
   22045           0 :                                 return -1;
   22046             :                         }
   22047           0 :                         if (test_var > uint_max) {
   22048           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22049             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22050           0 :                                 return -1;
   22051             :                         }
   22052           0 :                         object->maxkeepcomplsearch = test_var;
   22053             :                 } else {
   22054           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22055             :                           PyLong_Type.tp_name);
   22056           0 :                         return -1;
   22057             :                 }
   22058             :         }
   22059           0 :         return 0;
   22060             : }
   22061             : 
   22062             : static PyGetSetDef py_srvsvc_NetSrvInfo1525_getsetters[] = {
   22063             :         {
   22064             :                 .name = discard_const_p(char, "maxkeepcomplsearch"),
   22065             :                 .get = py_srvsvc_NetSrvInfo1525_get_maxkeepcomplsearch,
   22066             :                 .set = py_srvsvc_NetSrvInfo1525_set_maxkeepcomplsearch,
   22067             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22068             :         },
   22069             :         { .name = NULL }
   22070             : };
   22071             : 
   22072           0 : static PyObject *py_srvsvc_NetSrvInfo1525_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22073             : {
   22074           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1525, type);
   22075             : }
   22076             : 
   22077             : 
   22078             : static PyTypeObject srvsvc_NetSrvInfo1525_Type = {
   22079             :         PyVarObject_HEAD_INIT(NULL, 0)
   22080             :         .tp_name = "srvsvc.NetSrvInfo1525",
   22081             :         .tp_getset = py_srvsvc_NetSrvInfo1525_getsetters,
   22082             :         .tp_methods = NULL,
   22083             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22084             :         .tp_new = py_srvsvc_NetSrvInfo1525_new,
   22085             : };
   22086             : 
   22087             : 
   22088           0 : static PyObject *py_srvsvc_NetSrvInfo1528_get_scavtimeout(PyObject *obj, void *closure)
   22089             : {
   22090           0 :         struct srvsvc_NetSrvInfo1528 *object = pytalloc_get_ptr(obj);
   22091           0 :         PyObject *py_scavtimeout;
   22092           0 :         py_scavtimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->scavtimeout));
   22093           0 :         return py_scavtimeout;
   22094             : }
   22095             : 
   22096           0 : static int py_srvsvc_NetSrvInfo1528_set_scavtimeout(PyObject *py_obj, PyObject *value, void *closure)
   22097             : {
   22098           0 :         struct srvsvc_NetSrvInfo1528 *object = pytalloc_get_ptr(py_obj);
   22099           0 :         if (value == NULL) {
   22100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->scavtimeout");
   22101           0 :                 return -1;
   22102             :         }
   22103             :         {
   22104           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavtimeout));
   22105           0 :                 if (PyLong_Check(value)) {
   22106           0 :                         unsigned long long test_var;
   22107           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22108           0 :                         if (PyErr_Occurred() != NULL) {
   22109           0 :                                 return -1;
   22110             :                         }
   22111           0 :                         if (test_var > uint_max) {
   22112           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22113             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22114           0 :                                 return -1;
   22115             :                         }
   22116           0 :                         object->scavtimeout = test_var;
   22117             :                 } else {
   22118           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22119             :                           PyLong_Type.tp_name);
   22120           0 :                         return -1;
   22121             :                 }
   22122             :         }
   22123           0 :         return 0;
   22124             : }
   22125             : 
   22126             : static PyGetSetDef py_srvsvc_NetSrvInfo1528_getsetters[] = {
   22127             :         {
   22128             :                 .name = discard_const_p(char, "scavtimeout"),
   22129             :                 .get = py_srvsvc_NetSrvInfo1528_get_scavtimeout,
   22130             :                 .set = py_srvsvc_NetSrvInfo1528_set_scavtimeout,
   22131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22132             :         },
   22133             :         { .name = NULL }
   22134             : };
   22135             : 
   22136           0 : static PyObject *py_srvsvc_NetSrvInfo1528_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22137             : {
   22138           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1528, type);
   22139             : }
   22140             : 
   22141             : 
   22142             : static PyTypeObject srvsvc_NetSrvInfo1528_Type = {
   22143             :         PyVarObject_HEAD_INIT(NULL, 0)
   22144             :         .tp_name = "srvsvc.NetSrvInfo1528",
   22145             :         .tp_getset = py_srvsvc_NetSrvInfo1528_getsetters,
   22146             :         .tp_methods = NULL,
   22147             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22148             :         .tp_new = py_srvsvc_NetSrvInfo1528_new,
   22149             : };
   22150             : 
   22151             : 
   22152           0 : static PyObject *py_srvsvc_NetSrvInfo1529_get_minrcvqueue(PyObject *obj, void *closure)
   22153             : {
   22154           0 :         struct srvsvc_NetSrvInfo1529 *object = pytalloc_get_ptr(obj);
   22155           0 :         PyObject *py_minrcvqueue;
   22156           0 :         py_minrcvqueue = PyLong_FromUnsignedLongLong((uint32_t)(object->minrcvqueue));
   22157           0 :         return py_minrcvqueue;
   22158             : }
   22159             : 
   22160           0 : static int py_srvsvc_NetSrvInfo1529_set_minrcvqueue(PyObject *py_obj, PyObject *value, void *closure)
   22161             : {
   22162           0 :         struct srvsvc_NetSrvInfo1529 *object = pytalloc_get_ptr(py_obj);
   22163           0 :         if (value == NULL) {
   22164           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minrcvqueue");
   22165           0 :                 return -1;
   22166             :         }
   22167             :         {
   22168           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minrcvqueue));
   22169           0 :                 if (PyLong_Check(value)) {
   22170           0 :                         unsigned long long test_var;
   22171           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22172           0 :                         if (PyErr_Occurred() != NULL) {
   22173           0 :                                 return -1;
   22174             :                         }
   22175           0 :                         if (test_var > uint_max) {
   22176           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22177             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22178           0 :                                 return -1;
   22179             :                         }
   22180           0 :                         object->minrcvqueue = test_var;
   22181             :                 } else {
   22182           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22183             :                           PyLong_Type.tp_name);
   22184           0 :                         return -1;
   22185             :                 }
   22186             :         }
   22187           0 :         return 0;
   22188             : }
   22189             : 
   22190             : static PyGetSetDef py_srvsvc_NetSrvInfo1529_getsetters[] = {
   22191             :         {
   22192             :                 .name = discard_const_p(char, "minrcvqueue"),
   22193             :                 .get = py_srvsvc_NetSrvInfo1529_get_minrcvqueue,
   22194             :                 .set = py_srvsvc_NetSrvInfo1529_set_minrcvqueue,
   22195             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22196             :         },
   22197             :         { .name = NULL }
   22198             : };
   22199             : 
   22200           0 : static PyObject *py_srvsvc_NetSrvInfo1529_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22201             : {
   22202           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1529, type);
   22203             : }
   22204             : 
   22205             : 
   22206             : static PyTypeObject srvsvc_NetSrvInfo1529_Type = {
   22207             :         PyVarObject_HEAD_INIT(NULL, 0)
   22208             :         .tp_name = "srvsvc.NetSrvInfo1529",
   22209             :         .tp_getset = py_srvsvc_NetSrvInfo1529_getsetters,
   22210             :         .tp_methods = NULL,
   22211             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22212             :         .tp_new = py_srvsvc_NetSrvInfo1529_new,
   22213             : };
   22214             : 
   22215             : 
   22216           0 : static PyObject *py_srvsvc_NetSrvInfo1530_get_minfreeworkitems(PyObject *obj, void *closure)
   22217             : {
   22218           0 :         struct srvsvc_NetSrvInfo1530 *object = pytalloc_get_ptr(obj);
   22219           0 :         PyObject *py_minfreeworkitems;
   22220           0 :         py_minfreeworkitems = PyLong_FromUnsignedLongLong((uint32_t)(object->minfreeworkitems));
   22221           0 :         return py_minfreeworkitems;
   22222             : }
   22223             : 
   22224           0 : static int py_srvsvc_NetSrvInfo1530_set_minfreeworkitems(PyObject *py_obj, PyObject *value, void *closure)
   22225             : {
   22226           0 :         struct srvsvc_NetSrvInfo1530 *object = pytalloc_get_ptr(py_obj);
   22227           0 :         if (value == NULL) {
   22228           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minfreeworkitems");
   22229           0 :                 return -1;
   22230             :         }
   22231             :         {
   22232           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeworkitems));
   22233           0 :                 if (PyLong_Check(value)) {
   22234           0 :                         unsigned long long test_var;
   22235           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22236           0 :                         if (PyErr_Occurred() != NULL) {
   22237           0 :                                 return -1;
   22238             :                         }
   22239           0 :                         if (test_var > uint_max) {
   22240           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22241             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22242           0 :                                 return -1;
   22243             :                         }
   22244           0 :                         object->minfreeworkitems = test_var;
   22245             :                 } else {
   22246           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22247             :                           PyLong_Type.tp_name);
   22248           0 :                         return -1;
   22249             :                 }
   22250             :         }
   22251           0 :         return 0;
   22252             : }
   22253             : 
   22254             : static PyGetSetDef py_srvsvc_NetSrvInfo1530_getsetters[] = {
   22255             :         {
   22256             :                 .name = discard_const_p(char, "minfreeworkitems"),
   22257             :                 .get = py_srvsvc_NetSrvInfo1530_get_minfreeworkitems,
   22258             :                 .set = py_srvsvc_NetSrvInfo1530_set_minfreeworkitems,
   22259             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22260             :         },
   22261             :         { .name = NULL }
   22262             : };
   22263             : 
   22264           0 : static PyObject *py_srvsvc_NetSrvInfo1530_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22265             : {
   22266           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1530, type);
   22267             : }
   22268             : 
   22269             : 
   22270             : static PyTypeObject srvsvc_NetSrvInfo1530_Type = {
   22271             :         PyVarObject_HEAD_INIT(NULL, 0)
   22272             :         .tp_name = "srvsvc.NetSrvInfo1530",
   22273             :         .tp_getset = py_srvsvc_NetSrvInfo1530_getsetters,
   22274             :         .tp_methods = NULL,
   22275             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22276             :         .tp_new = py_srvsvc_NetSrvInfo1530_new,
   22277             : };
   22278             : 
   22279             : 
   22280           0 : static PyObject *py_srvsvc_NetSrvInfo1533_get_maxmpxct(PyObject *obj, void *closure)
   22281             : {
   22282           0 :         struct srvsvc_NetSrvInfo1533 *object = pytalloc_get_ptr(obj);
   22283           0 :         PyObject *py_maxmpxct;
   22284           0 :         py_maxmpxct = PyLong_FromUnsignedLongLong((uint32_t)(object->maxmpxct));
   22285           0 :         return py_maxmpxct;
   22286             : }
   22287             : 
   22288           0 : static int py_srvsvc_NetSrvInfo1533_set_maxmpxct(PyObject *py_obj, PyObject *value, void *closure)
   22289             : {
   22290           0 :         struct srvsvc_NetSrvInfo1533 *object = pytalloc_get_ptr(py_obj);
   22291           0 :         if (value == NULL) {
   22292           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxmpxct");
   22293           0 :                 return -1;
   22294             :         }
   22295             :         {
   22296           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxmpxct));
   22297           0 :                 if (PyLong_Check(value)) {
   22298           0 :                         unsigned long long test_var;
   22299           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22300           0 :                         if (PyErr_Occurred() != NULL) {
   22301           0 :                                 return -1;
   22302             :                         }
   22303           0 :                         if (test_var > uint_max) {
   22304           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22305             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22306           0 :                                 return -1;
   22307             :                         }
   22308           0 :                         object->maxmpxct = test_var;
   22309             :                 } else {
   22310           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22311             :                           PyLong_Type.tp_name);
   22312           0 :                         return -1;
   22313             :                 }
   22314             :         }
   22315           0 :         return 0;
   22316             : }
   22317             : 
   22318             : static PyGetSetDef py_srvsvc_NetSrvInfo1533_getsetters[] = {
   22319             :         {
   22320             :                 .name = discard_const_p(char, "maxmpxct"),
   22321             :                 .get = py_srvsvc_NetSrvInfo1533_get_maxmpxct,
   22322             :                 .set = py_srvsvc_NetSrvInfo1533_set_maxmpxct,
   22323             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22324             :         },
   22325             :         { .name = NULL }
   22326             : };
   22327             : 
   22328           0 : static PyObject *py_srvsvc_NetSrvInfo1533_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22329             : {
   22330           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1533, type);
   22331             : }
   22332             : 
   22333             : 
   22334             : static PyTypeObject srvsvc_NetSrvInfo1533_Type = {
   22335             :         PyVarObject_HEAD_INIT(NULL, 0)
   22336             :         .tp_name = "srvsvc.NetSrvInfo1533",
   22337             :         .tp_getset = py_srvsvc_NetSrvInfo1533_getsetters,
   22338             :         .tp_methods = NULL,
   22339             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22340             :         .tp_new = py_srvsvc_NetSrvInfo1533_new,
   22341             : };
   22342             : 
   22343             : 
   22344           0 : static PyObject *py_srvsvc_NetSrvInfo1534_get_oplockbreakwait(PyObject *obj, void *closure)
   22345             : {
   22346           0 :         struct srvsvc_NetSrvInfo1534 *object = pytalloc_get_ptr(obj);
   22347           0 :         PyObject *py_oplockbreakwait;
   22348           0 :         py_oplockbreakwait = PyLong_FromUnsignedLongLong((uint32_t)(object->oplockbreakwait));
   22349           0 :         return py_oplockbreakwait;
   22350             : }
   22351             : 
   22352           0 : static int py_srvsvc_NetSrvInfo1534_set_oplockbreakwait(PyObject *py_obj, PyObject *value, void *closure)
   22353             : {
   22354           0 :         struct srvsvc_NetSrvInfo1534 *object = pytalloc_get_ptr(py_obj);
   22355           0 :         if (value == NULL) {
   22356           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->oplockbreakwait");
   22357           0 :                 return -1;
   22358             :         }
   22359             :         {
   22360           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakwait));
   22361           0 :                 if (PyLong_Check(value)) {
   22362           0 :                         unsigned long long test_var;
   22363           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22364           0 :                         if (PyErr_Occurred() != NULL) {
   22365           0 :                                 return -1;
   22366             :                         }
   22367           0 :                         if (test_var > uint_max) {
   22368           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22369             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22370           0 :                                 return -1;
   22371             :                         }
   22372           0 :                         object->oplockbreakwait = test_var;
   22373             :                 } else {
   22374           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22375             :                           PyLong_Type.tp_name);
   22376           0 :                         return -1;
   22377             :                 }
   22378             :         }
   22379           0 :         return 0;
   22380             : }
   22381             : 
   22382             : static PyGetSetDef py_srvsvc_NetSrvInfo1534_getsetters[] = {
   22383             :         {
   22384             :                 .name = discard_const_p(char, "oplockbreakwait"),
   22385             :                 .get = py_srvsvc_NetSrvInfo1534_get_oplockbreakwait,
   22386             :                 .set = py_srvsvc_NetSrvInfo1534_set_oplockbreakwait,
   22387             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22388             :         },
   22389             :         { .name = NULL }
   22390             : };
   22391             : 
   22392           0 : static PyObject *py_srvsvc_NetSrvInfo1534_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22393             : {
   22394           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1534, type);
   22395             : }
   22396             : 
   22397             : 
   22398             : static PyTypeObject srvsvc_NetSrvInfo1534_Type = {
   22399             :         PyVarObject_HEAD_INIT(NULL, 0)
   22400             :         .tp_name = "srvsvc.NetSrvInfo1534",
   22401             :         .tp_getset = py_srvsvc_NetSrvInfo1534_getsetters,
   22402             :         .tp_methods = NULL,
   22403             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22404             :         .tp_new = py_srvsvc_NetSrvInfo1534_new,
   22405             : };
   22406             : 
   22407             : 
   22408           0 : static PyObject *py_srvsvc_NetSrvInfo1535_get_oplockbreakresponsewait(PyObject *obj, void *closure)
   22409             : {
   22410           0 :         struct srvsvc_NetSrvInfo1535 *object = pytalloc_get_ptr(obj);
   22411           0 :         PyObject *py_oplockbreakresponsewait;
   22412           0 :         py_oplockbreakresponsewait = PyLong_FromUnsignedLongLong((uint32_t)(object->oplockbreakresponsewait));
   22413           0 :         return py_oplockbreakresponsewait;
   22414             : }
   22415             : 
   22416           0 : static int py_srvsvc_NetSrvInfo1535_set_oplockbreakresponsewait(PyObject *py_obj, PyObject *value, void *closure)
   22417             : {
   22418           0 :         struct srvsvc_NetSrvInfo1535 *object = pytalloc_get_ptr(py_obj);
   22419           0 :         if (value == NULL) {
   22420           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->oplockbreakresponsewait");
   22421           0 :                 return -1;
   22422             :         }
   22423             :         {
   22424           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakresponsewait));
   22425           0 :                 if (PyLong_Check(value)) {
   22426           0 :                         unsigned long long test_var;
   22427           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22428           0 :                         if (PyErr_Occurred() != NULL) {
   22429           0 :                                 return -1;
   22430             :                         }
   22431           0 :                         if (test_var > uint_max) {
   22432           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22433             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22434           0 :                                 return -1;
   22435             :                         }
   22436           0 :                         object->oplockbreakresponsewait = test_var;
   22437             :                 } else {
   22438           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22439             :                           PyLong_Type.tp_name);
   22440           0 :                         return -1;
   22441             :                 }
   22442             :         }
   22443           0 :         return 0;
   22444             : }
   22445             : 
   22446             : static PyGetSetDef py_srvsvc_NetSrvInfo1535_getsetters[] = {
   22447             :         {
   22448             :                 .name = discard_const_p(char, "oplockbreakresponsewait"),
   22449             :                 .get = py_srvsvc_NetSrvInfo1535_get_oplockbreakresponsewait,
   22450             :                 .set = py_srvsvc_NetSrvInfo1535_set_oplockbreakresponsewait,
   22451             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22452             :         },
   22453             :         { .name = NULL }
   22454             : };
   22455             : 
   22456           0 : static PyObject *py_srvsvc_NetSrvInfo1535_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22457             : {
   22458           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1535, type);
   22459             : }
   22460             : 
   22461             : 
   22462             : static PyTypeObject srvsvc_NetSrvInfo1535_Type = {
   22463             :         PyVarObject_HEAD_INIT(NULL, 0)
   22464             :         .tp_name = "srvsvc.NetSrvInfo1535",
   22465             :         .tp_getset = py_srvsvc_NetSrvInfo1535_getsetters,
   22466             :         .tp_methods = NULL,
   22467             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22468             :         .tp_new = py_srvsvc_NetSrvInfo1535_new,
   22469             : };
   22470             : 
   22471             : 
   22472           0 : static PyObject *py_srvsvc_NetSrvInfo1536_get_enableoplocks(PyObject *obj, void *closure)
   22473             : {
   22474           0 :         struct srvsvc_NetSrvInfo1536 *object = pytalloc_get_ptr(obj);
   22475           0 :         PyObject *py_enableoplocks;
   22476           0 :         py_enableoplocks = PyLong_FromUnsignedLongLong((uint32_t)(object->enableoplocks));
   22477           0 :         return py_enableoplocks;
   22478             : }
   22479             : 
   22480           0 : static int py_srvsvc_NetSrvInfo1536_set_enableoplocks(PyObject *py_obj, PyObject *value, void *closure)
   22481             : {
   22482           0 :         struct srvsvc_NetSrvInfo1536 *object = pytalloc_get_ptr(py_obj);
   22483           0 :         if (value == NULL) {
   22484           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableoplocks");
   22485           0 :                 return -1;
   22486             :         }
   22487             :         {
   22488           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplocks));
   22489           0 :                 if (PyLong_Check(value)) {
   22490           0 :                         unsigned long long test_var;
   22491           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22492           0 :                         if (PyErr_Occurred() != NULL) {
   22493           0 :                                 return -1;
   22494             :                         }
   22495           0 :                         if (test_var > uint_max) {
   22496           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22497             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22498           0 :                                 return -1;
   22499             :                         }
   22500           0 :                         object->enableoplocks = test_var;
   22501             :                 } else {
   22502           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22503             :                           PyLong_Type.tp_name);
   22504           0 :                         return -1;
   22505             :                 }
   22506             :         }
   22507           0 :         return 0;
   22508             : }
   22509             : 
   22510             : static PyGetSetDef py_srvsvc_NetSrvInfo1536_getsetters[] = {
   22511             :         {
   22512             :                 .name = discard_const_p(char, "enableoplocks"),
   22513             :                 .get = py_srvsvc_NetSrvInfo1536_get_enableoplocks,
   22514             :                 .set = py_srvsvc_NetSrvInfo1536_set_enableoplocks,
   22515             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22516             :         },
   22517             :         { .name = NULL }
   22518             : };
   22519             : 
   22520           0 : static PyObject *py_srvsvc_NetSrvInfo1536_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22521             : {
   22522           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1536, type);
   22523             : }
   22524             : 
   22525             : 
   22526             : static PyTypeObject srvsvc_NetSrvInfo1536_Type = {
   22527             :         PyVarObject_HEAD_INIT(NULL, 0)
   22528             :         .tp_name = "srvsvc.NetSrvInfo1536",
   22529             :         .tp_getset = py_srvsvc_NetSrvInfo1536_getsetters,
   22530             :         .tp_methods = NULL,
   22531             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22532             :         .tp_new = py_srvsvc_NetSrvInfo1536_new,
   22533             : };
   22534             : 
   22535             : 
   22536           0 : static PyObject *py_srvsvc_NetSrvInfo1537_get_enableoplockforceclose(PyObject *obj, void *closure)
   22537             : {
   22538           0 :         struct srvsvc_NetSrvInfo1537 *object = pytalloc_get_ptr(obj);
   22539           0 :         PyObject *py_enableoplockforceclose;
   22540           0 :         py_enableoplockforceclose = PyLong_FromUnsignedLongLong((uint32_t)(object->enableoplockforceclose));
   22541           0 :         return py_enableoplockforceclose;
   22542             : }
   22543             : 
   22544           0 : static int py_srvsvc_NetSrvInfo1537_set_enableoplockforceclose(PyObject *py_obj, PyObject *value, void *closure)
   22545             : {
   22546           0 :         struct srvsvc_NetSrvInfo1537 *object = pytalloc_get_ptr(py_obj);
   22547           0 :         if (value == NULL) {
   22548           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableoplockforceclose");
   22549           0 :                 return -1;
   22550             :         }
   22551             :         {
   22552           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplockforceclose));
   22553           0 :                 if (PyLong_Check(value)) {
   22554           0 :                         unsigned long long test_var;
   22555           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22556           0 :                         if (PyErr_Occurred() != NULL) {
   22557           0 :                                 return -1;
   22558             :                         }
   22559           0 :                         if (test_var > uint_max) {
   22560           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22561             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22562           0 :                                 return -1;
   22563             :                         }
   22564           0 :                         object->enableoplockforceclose = test_var;
   22565             :                 } else {
   22566           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22567             :                           PyLong_Type.tp_name);
   22568           0 :                         return -1;
   22569             :                 }
   22570             :         }
   22571           0 :         return 0;
   22572             : }
   22573             : 
   22574             : static PyGetSetDef py_srvsvc_NetSrvInfo1537_getsetters[] = {
   22575             :         {
   22576             :                 .name = discard_const_p(char, "enableoplockforceclose"),
   22577             :                 .get = py_srvsvc_NetSrvInfo1537_get_enableoplockforceclose,
   22578             :                 .set = py_srvsvc_NetSrvInfo1537_set_enableoplockforceclose,
   22579             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22580             :         },
   22581             :         { .name = NULL }
   22582             : };
   22583             : 
   22584           0 : static PyObject *py_srvsvc_NetSrvInfo1537_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22585             : {
   22586           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1537, type);
   22587             : }
   22588             : 
   22589             : 
   22590             : static PyTypeObject srvsvc_NetSrvInfo1537_Type = {
   22591             :         PyVarObject_HEAD_INIT(NULL, 0)
   22592             :         .tp_name = "srvsvc.NetSrvInfo1537",
   22593             :         .tp_getset = py_srvsvc_NetSrvInfo1537_getsetters,
   22594             :         .tp_methods = NULL,
   22595             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22596             :         .tp_new = py_srvsvc_NetSrvInfo1537_new,
   22597             : };
   22598             : 
   22599             : 
   22600           0 : static PyObject *py_srvsvc_NetSrvInfo1538_get_enablefcbopens(PyObject *obj, void *closure)
   22601             : {
   22602           0 :         struct srvsvc_NetSrvInfo1538 *object = pytalloc_get_ptr(obj);
   22603           0 :         PyObject *py_enablefcbopens;
   22604           0 :         py_enablefcbopens = PyLong_FromUnsignedLongLong((uint32_t)(object->enablefcbopens));
   22605           0 :         return py_enablefcbopens;
   22606             : }
   22607             : 
   22608           0 : static int py_srvsvc_NetSrvInfo1538_set_enablefcbopens(PyObject *py_obj, PyObject *value, void *closure)
   22609             : {
   22610           0 :         struct srvsvc_NetSrvInfo1538 *object = pytalloc_get_ptr(py_obj);
   22611           0 :         if (value == NULL) {
   22612           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enablefcbopens");
   22613           0 :                 return -1;
   22614             :         }
   22615             :         {
   22616           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablefcbopens));
   22617           0 :                 if (PyLong_Check(value)) {
   22618           0 :                         unsigned long long test_var;
   22619           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22620           0 :                         if (PyErr_Occurred() != NULL) {
   22621           0 :                                 return -1;
   22622             :                         }
   22623           0 :                         if (test_var > uint_max) {
   22624           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22625             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22626           0 :                                 return -1;
   22627             :                         }
   22628           0 :                         object->enablefcbopens = test_var;
   22629             :                 } else {
   22630           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22631             :                           PyLong_Type.tp_name);
   22632           0 :                         return -1;
   22633             :                 }
   22634             :         }
   22635           0 :         return 0;
   22636             : }
   22637             : 
   22638             : static PyGetSetDef py_srvsvc_NetSrvInfo1538_getsetters[] = {
   22639             :         {
   22640             :                 .name = discard_const_p(char, "enablefcbopens"),
   22641             :                 .get = py_srvsvc_NetSrvInfo1538_get_enablefcbopens,
   22642             :                 .set = py_srvsvc_NetSrvInfo1538_set_enablefcbopens,
   22643             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22644             :         },
   22645             :         { .name = NULL }
   22646             : };
   22647             : 
   22648           0 : static PyObject *py_srvsvc_NetSrvInfo1538_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22649             : {
   22650           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1538, type);
   22651             : }
   22652             : 
   22653             : 
   22654             : static PyTypeObject srvsvc_NetSrvInfo1538_Type = {
   22655             :         PyVarObject_HEAD_INIT(NULL, 0)
   22656             :         .tp_name = "srvsvc.NetSrvInfo1538",
   22657             :         .tp_getset = py_srvsvc_NetSrvInfo1538_getsetters,
   22658             :         .tp_methods = NULL,
   22659             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22660             :         .tp_new = py_srvsvc_NetSrvInfo1538_new,
   22661             : };
   22662             : 
   22663             : 
   22664           0 : static PyObject *py_srvsvc_NetSrvInfo1539_get_enableraw(PyObject *obj, void *closure)
   22665             : {
   22666           0 :         struct srvsvc_NetSrvInfo1539 *object = pytalloc_get_ptr(obj);
   22667           0 :         PyObject *py_enableraw;
   22668           0 :         py_enableraw = PyLong_FromUnsignedLongLong((uint32_t)(object->enableraw));
   22669           0 :         return py_enableraw;
   22670             : }
   22671             : 
   22672           0 : static int py_srvsvc_NetSrvInfo1539_set_enableraw(PyObject *py_obj, PyObject *value, void *closure)
   22673             : {
   22674           0 :         struct srvsvc_NetSrvInfo1539 *object = pytalloc_get_ptr(py_obj);
   22675           0 :         if (value == NULL) {
   22676           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enableraw");
   22677           0 :                 return -1;
   22678             :         }
   22679             :         {
   22680           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableraw));
   22681           0 :                 if (PyLong_Check(value)) {
   22682           0 :                         unsigned long long test_var;
   22683           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22684           0 :                         if (PyErr_Occurred() != NULL) {
   22685           0 :                                 return -1;
   22686             :                         }
   22687           0 :                         if (test_var > uint_max) {
   22688           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22689             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22690           0 :                                 return -1;
   22691             :                         }
   22692           0 :                         object->enableraw = test_var;
   22693             :                 } else {
   22694           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22695             :                           PyLong_Type.tp_name);
   22696           0 :                         return -1;
   22697             :                 }
   22698             :         }
   22699           0 :         return 0;
   22700             : }
   22701             : 
   22702             : static PyGetSetDef py_srvsvc_NetSrvInfo1539_getsetters[] = {
   22703             :         {
   22704             :                 .name = discard_const_p(char, "enableraw"),
   22705             :                 .get = py_srvsvc_NetSrvInfo1539_get_enableraw,
   22706             :                 .set = py_srvsvc_NetSrvInfo1539_set_enableraw,
   22707             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22708             :         },
   22709             :         { .name = NULL }
   22710             : };
   22711             : 
   22712           0 : static PyObject *py_srvsvc_NetSrvInfo1539_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22713             : {
   22714           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1539, type);
   22715             : }
   22716             : 
   22717             : 
   22718             : static PyTypeObject srvsvc_NetSrvInfo1539_Type = {
   22719             :         PyVarObject_HEAD_INIT(NULL, 0)
   22720             :         .tp_name = "srvsvc.NetSrvInfo1539",
   22721             :         .tp_getset = py_srvsvc_NetSrvInfo1539_getsetters,
   22722             :         .tp_methods = NULL,
   22723             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22724             :         .tp_new = py_srvsvc_NetSrvInfo1539_new,
   22725             : };
   22726             : 
   22727             : 
   22728           0 : static PyObject *py_srvsvc_NetSrvInfo1540_get_enablesharednetdrives(PyObject *obj, void *closure)
   22729             : {
   22730           0 :         struct srvsvc_NetSrvInfo1540 *object = pytalloc_get_ptr(obj);
   22731           0 :         PyObject *py_enablesharednetdrives;
   22732           0 :         py_enablesharednetdrives = PyLong_FromUnsignedLongLong((uint32_t)(object->enablesharednetdrives));
   22733           0 :         return py_enablesharednetdrives;
   22734             : }
   22735             : 
   22736           0 : static int py_srvsvc_NetSrvInfo1540_set_enablesharednetdrives(PyObject *py_obj, PyObject *value, void *closure)
   22737             : {
   22738           0 :         struct srvsvc_NetSrvInfo1540 *object = pytalloc_get_ptr(py_obj);
   22739           0 :         if (value == NULL) {
   22740           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->enablesharednetdrives");
   22741           0 :                 return -1;
   22742             :         }
   22743             :         {
   22744           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesharednetdrives));
   22745           0 :                 if (PyLong_Check(value)) {
   22746           0 :                         unsigned long long test_var;
   22747           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22748           0 :                         if (PyErr_Occurred() != NULL) {
   22749           0 :                                 return -1;
   22750             :                         }
   22751           0 :                         if (test_var > uint_max) {
   22752           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22753             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22754           0 :                                 return -1;
   22755             :                         }
   22756           0 :                         object->enablesharednetdrives = test_var;
   22757             :                 } else {
   22758           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22759             :                           PyLong_Type.tp_name);
   22760           0 :                         return -1;
   22761             :                 }
   22762             :         }
   22763           0 :         return 0;
   22764             : }
   22765             : 
   22766             : static PyGetSetDef py_srvsvc_NetSrvInfo1540_getsetters[] = {
   22767             :         {
   22768             :                 .name = discard_const_p(char, "enablesharednetdrives"),
   22769             :                 .get = py_srvsvc_NetSrvInfo1540_get_enablesharednetdrives,
   22770             :                 .set = py_srvsvc_NetSrvInfo1540_set_enablesharednetdrives,
   22771             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22772             :         },
   22773             :         { .name = NULL }
   22774             : };
   22775             : 
   22776           0 : static PyObject *py_srvsvc_NetSrvInfo1540_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22777             : {
   22778           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1540, type);
   22779             : }
   22780             : 
   22781             : 
   22782             : static PyTypeObject srvsvc_NetSrvInfo1540_Type = {
   22783             :         PyVarObject_HEAD_INIT(NULL, 0)
   22784             :         .tp_name = "srvsvc.NetSrvInfo1540",
   22785             :         .tp_getset = py_srvsvc_NetSrvInfo1540_getsetters,
   22786             :         .tp_methods = NULL,
   22787             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22788             :         .tp_new = py_srvsvc_NetSrvInfo1540_new,
   22789             : };
   22790             : 
   22791             : 
   22792           0 : static PyObject *py_srvsvc_NetSrvInfo1541_get_minfreeconnections(PyObject *obj, void *closure)
   22793             : {
   22794           0 :         struct srvsvc_NetSrvInfo1541 *object = pytalloc_get_ptr(obj);
   22795           0 :         PyObject *py_minfreeconnections;
   22796           0 :         py_minfreeconnections = PyLong_FromUnsignedLongLong((uint32_t)(object->minfreeconnections));
   22797           0 :         return py_minfreeconnections;
   22798             : }
   22799             : 
   22800           0 : static int py_srvsvc_NetSrvInfo1541_set_minfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
   22801             : {
   22802           0 :         struct srvsvc_NetSrvInfo1541 *object = pytalloc_get_ptr(py_obj);
   22803           0 :         if (value == NULL) {
   22804           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minfreeconnections");
   22805           0 :                 return -1;
   22806             :         }
   22807             :         {
   22808           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeconnections));
   22809           0 :                 if (PyLong_Check(value)) {
   22810           0 :                         unsigned long long test_var;
   22811           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22812           0 :                         if (PyErr_Occurred() != NULL) {
   22813           0 :                                 return -1;
   22814             :                         }
   22815           0 :                         if (test_var > uint_max) {
   22816           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22817             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22818           0 :                                 return -1;
   22819             :                         }
   22820           0 :                         object->minfreeconnections = test_var;
   22821             :                 } else {
   22822           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22823             :                           PyLong_Type.tp_name);
   22824           0 :                         return -1;
   22825             :                 }
   22826             :         }
   22827           0 :         return 0;
   22828             : }
   22829             : 
   22830             : static PyGetSetDef py_srvsvc_NetSrvInfo1541_getsetters[] = {
   22831             :         {
   22832             :                 .name = discard_const_p(char, "minfreeconnections"),
   22833             :                 .get = py_srvsvc_NetSrvInfo1541_get_minfreeconnections,
   22834             :                 .set = py_srvsvc_NetSrvInfo1541_set_minfreeconnections,
   22835             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22836             :         },
   22837             :         { .name = NULL }
   22838             : };
   22839             : 
   22840           0 : static PyObject *py_srvsvc_NetSrvInfo1541_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22841             : {
   22842           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1541, type);
   22843             : }
   22844             : 
   22845             : 
   22846             : static PyTypeObject srvsvc_NetSrvInfo1541_Type = {
   22847             :         PyVarObject_HEAD_INIT(NULL, 0)
   22848             :         .tp_name = "srvsvc.NetSrvInfo1541",
   22849             :         .tp_getset = py_srvsvc_NetSrvInfo1541_getsetters,
   22850             :         .tp_methods = NULL,
   22851             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22852             :         .tp_new = py_srvsvc_NetSrvInfo1541_new,
   22853             : };
   22854             : 
   22855             : 
   22856           0 : static PyObject *py_srvsvc_NetSrvInfo1542_get_maxfreeconnections(PyObject *obj, void *closure)
   22857             : {
   22858           0 :         struct srvsvc_NetSrvInfo1542 *object = pytalloc_get_ptr(obj);
   22859           0 :         PyObject *py_maxfreeconnections;
   22860           0 :         py_maxfreeconnections = PyLong_FromUnsignedLongLong((uint32_t)(object->maxfreeconnections));
   22861           0 :         return py_maxfreeconnections;
   22862             : }
   22863             : 
   22864           0 : static int py_srvsvc_NetSrvInfo1542_set_maxfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
   22865             : {
   22866           0 :         struct srvsvc_NetSrvInfo1542 *object = pytalloc_get_ptr(py_obj);
   22867           0 :         if (value == NULL) {
   22868           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxfreeconnections");
   22869           0 :                 return -1;
   22870             :         }
   22871             :         {
   22872           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxfreeconnections));
   22873           0 :                 if (PyLong_Check(value)) {
   22874           0 :                         unsigned long long test_var;
   22875           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22876           0 :                         if (PyErr_Occurred() != NULL) {
   22877           0 :                                 return -1;
   22878             :                         }
   22879           0 :                         if (test_var > uint_max) {
   22880           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22881             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22882           0 :                                 return -1;
   22883             :                         }
   22884           0 :                         object->maxfreeconnections = test_var;
   22885             :                 } else {
   22886           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22887             :                           PyLong_Type.tp_name);
   22888           0 :                         return -1;
   22889             :                 }
   22890             :         }
   22891           0 :         return 0;
   22892             : }
   22893             : 
   22894             : static PyGetSetDef py_srvsvc_NetSrvInfo1542_getsetters[] = {
   22895             :         {
   22896             :                 .name = discard_const_p(char, "maxfreeconnections"),
   22897             :                 .get = py_srvsvc_NetSrvInfo1542_get_maxfreeconnections,
   22898             :                 .set = py_srvsvc_NetSrvInfo1542_set_maxfreeconnections,
   22899             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22900             :         },
   22901             :         { .name = NULL }
   22902             : };
   22903             : 
   22904           0 : static PyObject *py_srvsvc_NetSrvInfo1542_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22905             : {
   22906           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1542, type);
   22907             : }
   22908             : 
   22909             : 
   22910             : static PyTypeObject srvsvc_NetSrvInfo1542_Type = {
   22911             :         PyVarObject_HEAD_INIT(NULL, 0)
   22912             :         .tp_name = "srvsvc.NetSrvInfo1542",
   22913             :         .tp_getset = py_srvsvc_NetSrvInfo1542_getsetters,
   22914             :         .tp_methods = NULL,
   22915             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22916             :         .tp_new = py_srvsvc_NetSrvInfo1542_new,
   22917             : };
   22918             : 
   22919             : 
   22920           0 : static PyObject *py_srvsvc_NetSrvInfo1543_get_initsesstable(PyObject *obj, void *closure)
   22921             : {
   22922           0 :         struct srvsvc_NetSrvInfo1543 *object = pytalloc_get_ptr(obj);
   22923           0 :         PyObject *py_initsesstable;
   22924           0 :         py_initsesstable = PyLong_FromUnsignedLongLong((uint32_t)(object->initsesstable));
   22925           0 :         return py_initsesstable;
   22926             : }
   22927             : 
   22928           0 : static int py_srvsvc_NetSrvInfo1543_set_initsesstable(PyObject *py_obj, PyObject *value, void *closure)
   22929             : {
   22930           0 :         struct srvsvc_NetSrvInfo1543 *object = pytalloc_get_ptr(py_obj);
   22931           0 :         if (value == NULL) {
   22932           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->initsesstable");
   22933           0 :                 return -1;
   22934             :         }
   22935             :         {
   22936           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsesstable));
   22937           0 :                 if (PyLong_Check(value)) {
   22938           0 :                         unsigned long long test_var;
   22939           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22940           0 :                         if (PyErr_Occurred() != NULL) {
   22941           0 :                                 return -1;
   22942             :                         }
   22943           0 :                         if (test_var > uint_max) {
   22944           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22945             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22946           0 :                                 return -1;
   22947             :                         }
   22948           0 :                         object->initsesstable = test_var;
   22949             :                 } else {
   22950           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22951             :                           PyLong_Type.tp_name);
   22952           0 :                         return -1;
   22953             :                 }
   22954             :         }
   22955           0 :         return 0;
   22956             : }
   22957             : 
   22958             : static PyGetSetDef py_srvsvc_NetSrvInfo1543_getsetters[] = {
   22959             :         {
   22960             :                 .name = discard_const_p(char, "initsesstable"),
   22961             :                 .get = py_srvsvc_NetSrvInfo1543_get_initsesstable,
   22962             :                 .set = py_srvsvc_NetSrvInfo1543_set_initsesstable,
   22963             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22964             :         },
   22965             :         { .name = NULL }
   22966             : };
   22967             : 
   22968           0 : static PyObject *py_srvsvc_NetSrvInfo1543_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22969             : {
   22970           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1543, type);
   22971             : }
   22972             : 
   22973             : 
   22974             : static PyTypeObject srvsvc_NetSrvInfo1543_Type = {
   22975             :         PyVarObject_HEAD_INIT(NULL, 0)
   22976             :         .tp_name = "srvsvc.NetSrvInfo1543",
   22977             :         .tp_getset = py_srvsvc_NetSrvInfo1543_getsetters,
   22978             :         .tp_methods = NULL,
   22979             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22980             :         .tp_new = py_srvsvc_NetSrvInfo1543_new,
   22981             : };
   22982             : 
   22983             : 
   22984           0 : static PyObject *py_srvsvc_NetSrvInfo1544_get_initconntable(PyObject *obj, void *closure)
   22985             : {
   22986           0 :         struct srvsvc_NetSrvInfo1544 *object = pytalloc_get_ptr(obj);
   22987           0 :         PyObject *py_initconntable;
   22988           0 :         py_initconntable = PyLong_FromUnsignedLongLong((uint32_t)(object->initconntable));
   22989           0 :         return py_initconntable;
   22990             : }
   22991             : 
   22992           0 : static int py_srvsvc_NetSrvInfo1544_set_initconntable(PyObject *py_obj, PyObject *value, void *closure)
   22993             : {
   22994           0 :         struct srvsvc_NetSrvInfo1544 *object = pytalloc_get_ptr(py_obj);
   22995           0 :         if (value == NULL) {
   22996           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->initconntable");
   22997           0 :                 return -1;
   22998             :         }
   22999             :         {
   23000           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initconntable));
   23001           0 :                 if (PyLong_Check(value)) {
   23002           0 :                         unsigned long long test_var;
   23003           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23004           0 :                         if (PyErr_Occurred() != NULL) {
   23005           0 :                                 return -1;
   23006             :                         }
   23007           0 :                         if (test_var > uint_max) {
   23008           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23009             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23010           0 :                                 return -1;
   23011             :                         }
   23012           0 :                         object->initconntable = test_var;
   23013             :                 } else {
   23014           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23015             :                           PyLong_Type.tp_name);
   23016           0 :                         return -1;
   23017             :                 }
   23018             :         }
   23019           0 :         return 0;
   23020             : }
   23021             : 
   23022             : static PyGetSetDef py_srvsvc_NetSrvInfo1544_getsetters[] = {
   23023             :         {
   23024             :                 .name = discard_const_p(char, "initconntable"),
   23025             :                 .get = py_srvsvc_NetSrvInfo1544_get_initconntable,
   23026             :                 .set = py_srvsvc_NetSrvInfo1544_set_initconntable,
   23027             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23028             :         },
   23029             :         { .name = NULL }
   23030             : };
   23031             : 
   23032           0 : static PyObject *py_srvsvc_NetSrvInfo1544_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23033             : {
   23034           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1544, type);
   23035             : }
   23036             : 
   23037             : 
   23038             : static PyTypeObject srvsvc_NetSrvInfo1544_Type = {
   23039             :         PyVarObject_HEAD_INIT(NULL, 0)
   23040             :         .tp_name = "srvsvc.NetSrvInfo1544",
   23041             :         .tp_getset = py_srvsvc_NetSrvInfo1544_getsetters,
   23042             :         .tp_methods = NULL,
   23043             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23044             :         .tp_new = py_srvsvc_NetSrvInfo1544_new,
   23045             : };
   23046             : 
   23047             : 
   23048           0 : static PyObject *py_srvsvc_NetSrvInfo1545_get_initfiletable(PyObject *obj, void *closure)
   23049             : {
   23050           0 :         struct srvsvc_NetSrvInfo1545 *object = pytalloc_get_ptr(obj);
   23051           0 :         PyObject *py_initfiletable;
   23052           0 :         py_initfiletable = PyLong_FromUnsignedLongLong((uint32_t)(object->initfiletable));
   23053           0 :         return py_initfiletable;
   23054             : }
   23055             : 
   23056           0 : static int py_srvsvc_NetSrvInfo1545_set_initfiletable(PyObject *py_obj, PyObject *value, void *closure)
   23057             : {
   23058           0 :         struct srvsvc_NetSrvInfo1545 *object = pytalloc_get_ptr(py_obj);
   23059           0 :         if (value == NULL) {
   23060           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->initfiletable");
   23061           0 :                 return -1;
   23062             :         }
   23063             :         {
   23064           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initfiletable));
   23065           0 :                 if (PyLong_Check(value)) {
   23066           0 :                         unsigned long long test_var;
   23067           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23068           0 :                         if (PyErr_Occurred() != NULL) {
   23069           0 :                                 return -1;
   23070             :                         }
   23071           0 :                         if (test_var > uint_max) {
   23072           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23073             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23074           0 :                                 return -1;
   23075             :                         }
   23076           0 :                         object->initfiletable = test_var;
   23077             :                 } else {
   23078           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23079             :                           PyLong_Type.tp_name);
   23080           0 :                         return -1;
   23081             :                 }
   23082             :         }
   23083           0 :         return 0;
   23084             : }
   23085             : 
   23086             : static PyGetSetDef py_srvsvc_NetSrvInfo1545_getsetters[] = {
   23087             :         {
   23088             :                 .name = discard_const_p(char, "initfiletable"),
   23089             :                 .get = py_srvsvc_NetSrvInfo1545_get_initfiletable,
   23090             :                 .set = py_srvsvc_NetSrvInfo1545_set_initfiletable,
   23091             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23092             :         },
   23093             :         { .name = NULL }
   23094             : };
   23095             : 
   23096           0 : static PyObject *py_srvsvc_NetSrvInfo1545_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23097             : {
   23098           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1545, type);
   23099             : }
   23100             : 
   23101             : 
   23102             : static PyTypeObject srvsvc_NetSrvInfo1545_Type = {
   23103             :         PyVarObject_HEAD_INIT(NULL, 0)
   23104             :         .tp_name = "srvsvc.NetSrvInfo1545",
   23105             :         .tp_getset = py_srvsvc_NetSrvInfo1545_getsetters,
   23106             :         .tp_methods = NULL,
   23107             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23108             :         .tp_new = py_srvsvc_NetSrvInfo1545_new,
   23109             : };
   23110             : 
   23111             : 
   23112           0 : static PyObject *py_srvsvc_NetSrvInfo1546_get_initsearchtable(PyObject *obj, void *closure)
   23113             : {
   23114           0 :         struct srvsvc_NetSrvInfo1546 *object = pytalloc_get_ptr(obj);
   23115           0 :         PyObject *py_initsearchtable;
   23116           0 :         py_initsearchtable = PyLong_FromUnsignedLongLong((uint32_t)(object->initsearchtable));
   23117           0 :         return py_initsearchtable;
   23118             : }
   23119             : 
   23120           0 : static int py_srvsvc_NetSrvInfo1546_set_initsearchtable(PyObject *py_obj, PyObject *value, void *closure)
   23121             : {
   23122           0 :         struct srvsvc_NetSrvInfo1546 *object = pytalloc_get_ptr(py_obj);
   23123           0 :         if (value == NULL) {
   23124           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->initsearchtable");
   23125           0 :                 return -1;
   23126             :         }
   23127             :         {
   23128           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsearchtable));
   23129           0 :                 if (PyLong_Check(value)) {
   23130           0 :                         unsigned long long test_var;
   23131           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23132           0 :                         if (PyErr_Occurred() != NULL) {
   23133           0 :                                 return -1;
   23134             :                         }
   23135           0 :                         if (test_var > uint_max) {
   23136           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23137             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23138           0 :                                 return -1;
   23139             :                         }
   23140           0 :                         object->initsearchtable = test_var;
   23141             :                 } else {
   23142           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23143             :                           PyLong_Type.tp_name);
   23144           0 :                         return -1;
   23145             :                 }
   23146             :         }
   23147           0 :         return 0;
   23148             : }
   23149             : 
   23150             : static PyGetSetDef py_srvsvc_NetSrvInfo1546_getsetters[] = {
   23151             :         {
   23152             :                 .name = discard_const_p(char, "initsearchtable"),
   23153             :                 .get = py_srvsvc_NetSrvInfo1546_get_initsearchtable,
   23154             :                 .set = py_srvsvc_NetSrvInfo1546_set_initsearchtable,
   23155             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23156             :         },
   23157             :         { .name = NULL }
   23158             : };
   23159             : 
   23160           0 : static PyObject *py_srvsvc_NetSrvInfo1546_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23161             : {
   23162           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1546, type);
   23163             : }
   23164             : 
   23165             : 
   23166             : static PyTypeObject srvsvc_NetSrvInfo1546_Type = {
   23167             :         PyVarObject_HEAD_INIT(NULL, 0)
   23168             :         .tp_name = "srvsvc.NetSrvInfo1546",
   23169             :         .tp_getset = py_srvsvc_NetSrvInfo1546_getsetters,
   23170             :         .tp_methods = NULL,
   23171             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23172             :         .tp_new = py_srvsvc_NetSrvInfo1546_new,
   23173             : };
   23174             : 
   23175             : 
   23176           0 : static PyObject *py_srvsvc_NetSrvInfo1547_get_alertsched(PyObject *obj, void *closure)
   23177             : {
   23178           0 :         struct srvsvc_NetSrvInfo1547 *object = pytalloc_get_ptr(obj);
   23179           0 :         PyObject *py_alertsched;
   23180           0 :         py_alertsched = PyLong_FromUnsignedLongLong((uint32_t)(object->alertsched));
   23181           0 :         return py_alertsched;
   23182             : }
   23183             : 
   23184           0 : static int py_srvsvc_NetSrvInfo1547_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
   23185             : {
   23186           0 :         struct srvsvc_NetSrvInfo1547 *object = pytalloc_get_ptr(py_obj);
   23187           0 :         if (value == NULL) {
   23188           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->alertsched");
   23189           0 :                 return -1;
   23190             :         }
   23191             :         {
   23192           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
   23193           0 :                 if (PyLong_Check(value)) {
   23194           0 :                         unsigned long long test_var;
   23195           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23196           0 :                         if (PyErr_Occurred() != NULL) {
   23197           0 :                                 return -1;
   23198             :                         }
   23199           0 :                         if (test_var > uint_max) {
   23200           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23201             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23202           0 :                                 return -1;
   23203             :                         }
   23204           0 :                         object->alertsched = test_var;
   23205             :                 } else {
   23206           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23207             :                           PyLong_Type.tp_name);
   23208           0 :                         return -1;
   23209             :                 }
   23210             :         }
   23211           0 :         return 0;
   23212             : }
   23213             : 
   23214             : static PyGetSetDef py_srvsvc_NetSrvInfo1547_getsetters[] = {
   23215             :         {
   23216             :                 .name = discard_const_p(char, "alertsched"),
   23217             :                 .get = py_srvsvc_NetSrvInfo1547_get_alertsched,
   23218             :                 .set = py_srvsvc_NetSrvInfo1547_set_alertsched,
   23219             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23220             :         },
   23221             :         { .name = NULL }
   23222             : };
   23223             : 
   23224           0 : static PyObject *py_srvsvc_NetSrvInfo1547_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23225             : {
   23226           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1547, type);
   23227             : }
   23228             : 
   23229             : 
   23230             : static PyTypeObject srvsvc_NetSrvInfo1547_Type = {
   23231             :         PyVarObject_HEAD_INIT(NULL, 0)
   23232             :         .tp_name = "srvsvc.NetSrvInfo1547",
   23233             :         .tp_getset = py_srvsvc_NetSrvInfo1547_getsetters,
   23234             :         .tp_methods = NULL,
   23235             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23236             :         .tp_new = py_srvsvc_NetSrvInfo1547_new,
   23237             : };
   23238             : 
   23239             : 
   23240           0 : static PyObject *py_srvsvc_NetSrvInfo1548_get_errortreshold(PyObject *obj, void *closure)
   23241             : {
   23242           0 :         struct srvsvc_NetSrvInfo1548 *object = pytalloc_get_ptr(obj);
   23243           0 :         PyObject *py_errortreshold;
   23244           0 :         py_errortreshold = PyLong_FromUnsignedLongLong((uint32_t)(object->errortreshold));
   23245           0 :         return py_errortreshold;
   23246             : }
   23247             : 
   23248           0 : static int py_srvsvc_NetSrvInfo1548_set_errortreshold(PyObject *py_obj, PyObject *value, void *closure)
   23249             : {
   23250           0 :         struct srvsvc_NetSrvInfo1548 *object = pytalloc_get_ptr(py_obj);
   23251           0 :         if (value == NULL) {
   23252           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->errortreshold");
   23253           0 :                 return -1;
   23254             :         }
   23255             :         {
   23256           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->errortreshold));
   23257           0 :                 if (PyLong_Check(value)) {
   23258           0 :                         unsigned long long test_var;
   23259           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23260           0 :                         if (PyErr_Occurred() != NULL) {
   23261           0 :                                 return -1;
   23262             :                         }
   23263           0 :                         if (test_var > uint_max) {
   23264           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23265             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23266           0 :                                 return -1;
   23267             :                         }
   23268           0 :                         object->errortreshold = test_var;
   23269             :                 } else {
   23270           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23271             :                           PyLong_Type.tp_name);
   23272           0 :                         return -1;
   23273             :                 }
   23274             :         }
   23275           0 :         return 0;
   23276             : }
   23277             : 
   23278             : static PyGetSetDef py_srvsvc_NetSrvInfo1548_getsetters[] = {
   23279             :         {
   23280             :                 .name = discard_const_p(char, "errortreshold"),
   23281             :                 .get = py_srvsvc_NetSrvInfo1548_get_errortreshold,
   23282             :                 .set = py_srvsvc_NetSrvInfo1548_set_errortreshold,
   23283             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23284             :         },
   23285             :         { .name = NULL }
   23286             : };
   23287             : 
   23288           0 : static PyObject *py_srvsvc_NetSrvInfo1548_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23289             : {
   23290           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1548, type);
   23291             : }
   23292             : 
   23293             : 
   23294             : static PyTypeObject srvsvc_NetSrvInfo1548_Type = {
   23295             :         PyVarObject_HEAD_INIT(NULL, 0)
   23296             :         .tp_name = "srvsvc.NetSrvInfo1548",
   23297             :         .tp_getset = py_srvsvc_NetSrvInfo1548_getsetters,
   23298             :         .tp_methods = NULL,
   23299             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23300             :         .tp_new = py_srvsvc_NetSrvInfo1548_new,
   23301             : };
   23302             : 
   23303             : 
   23304           0 : static PyObject *py_srvsvc_NetSrvInfo1549_get_networkerrortreshold(PyObject *obj, void *closure)
   23305             : {
   23306           0 :         struct srvsvc_NetSrvInfo1549 *object = pytalloc_get_ptr(obj);
   23307           0 :         PyObject *py_networkerrortreshold;
   23308           0 :         py_networkerrortreshold = PyLong_FromUnsignedLongLong((uint32_t)(object->networkerrortreshold));
   23309           0 :         return py_networkerrortreshold;
   23310             : }
   23311             : 
   23312           0 : static int py_srvsvc_NetSrvInfo1549_set_networkerrortreshold(PyObject *py_obj, PyObject *value, void *closure)
   23313             : {
   23314           0 :         struct srvsvc_NetSrvInfo1549 *object = pytalloc_get_ptr(py_obj);
   23315           0 :         if (value == NULL) {
   23316           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->networkerrortreshold");
   23317           0 :                 return -1;
   23318             :         }
   23319             :         {
   23320           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->networkerrortreshold));
   23321           0 :                 if (PyLong_Check(value)) {
   23322           0 :                         unsigned long long test_var;
   23323           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23324           0 :                         if (PyErr_Occurred() != NULL) {
   23325           0 :                                 return -1;
   23326             :                         }
   23327           0 :                         if (test_var > uint_max) {
   23328           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23329             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23330           0 :                                 return -1;
   23331             :                         }
   23332           0 :                         object->networkerrortreshold = test_var;
   23333             :                 } else {
   23334           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23335             :                           PyLong_Type.tp_name);
   23336           0 :                         return -1;
   23337             :                 }
   23338             :         }
   23339           0 :         return 0;
   23340             : }
   23341             : 
   23342             : static PyGetSetDef py_srvsvc_NetSrvInfo1549_getsetters[] = {
   23343             :         {
   23344             :                 .name = discard_const_p(char, "networkerrortreshold"),
   23345             :                 .get = py_srvsvc_NetSrvInfo1549_get_networkerrortreshold,
   23346             :                 .set = py_srvsvc_NetSrvInfo1549_set_networkerrortreshold,
   23347             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23348             :         },
   23349             :         { .name = NULL }
   23350             : };
   23351             : 
   23352           0 : static PyObject *py_srvsvc_NetSrvInfo1549_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23353             : {
   23354           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1549, type);
   23355             : }
   23356             : 
   23357             : 
   23358             : static PyTypeObject srvsvc_NetSrvInfo1549_Type = {
   23359             :         PyVarObject_HEAD_INIT(NULL, 0)
   23360             :         .tp_name = "srvsvc.NetSrvInfo1549",
   23361             :         .tp_getset = py_srvsvc_NetSrvInfo1549_getsetters,
   23362             :         .tp_methods = NULL,
   23363             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23364             :         .tp_new = py_srvsvc_NetSrvInfo1549_new,
   23365             : };
   23366             : 
   23367             : 
   23368           0 : static PyObject *py_srvsvc_NetSrvInfo1550_get_diskspacetreshold(PyObject *obj, void *closure)
   23369             : {
   23370           0 :         struct srvsvc_NetSrvInfo1550 *object = pytalloc_get_ptr(obj);
   23371           0 :         PyObject *py_diskspacetreshold;
   23372           0 :         py_diskspacetreshold = PyLong_FromUnsignedLongLong((uint32_t)(object->diskspacetreshold));
   23373           0 :         return py_diskspacetreshold;
   23374             : }
   23375             : 
   23376           0 : static int py_srvsvc_NetSrvInfo1550_set_diskspacetreshold(PyObject *py_obj, PyObject *value, void *closure)
   23377             : {
   23378           0 :         struct srvsvc_NetSrvInfo1550 *object = pytalloc_get_ptr(py_obj);
   23379           0 :         if (value == NULL) {
   23380           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->diskspacetreshold");
   23381           0 :                 return -1;
   23382             :         }
   23383             :         {
   23384           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskspacetreshold));
   23385           0 :                 if (PyLong_Check(value)) {
   23386           0 :                         unsigned long long test_var;
   23387           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23388           0 :                         if (PyErr_Occurred() != NULL) {
   23389           0 :                                 return -1;
   23390             :                         }
   23391           0 :                         if (test_var > uint_max) {
   23392           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23393             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23394           0 :                                 return -1;
   23395             :                         }
   23396           0 :                         object->diskspacetreshold = test_var;
   23397             :                 } else {
   23398           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23399             :                           PyLong_Type.tp_name);
   23400           0 :                         return -1;
   23401             :                 }
   23402             :         }
   23403           0 :         return 0;
   23404             : }
   23405             : 
   23406             : static PyGetSetDef py_srvsvc_NetSrvInfo1550_getsetters[] = {
   23407             :         {
   23408             :                 .name = discard_const_p(char, "diskspacetreshold"),
   23409             :                 .get = py_srvsvc_NetSrvInfo1550_get_diskspacetreshold,
   23410             :                 .set = py_srvsvc_NetSrvInfo1550_set_diskspacetreshold,
   23411             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23412             :         },
   23413             :         { .name = NULL }
   23414             : };
   23415             : 
   23416           0 : static PyObject *py_srvsvc_NetSrvInfo1550_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23417             : {
   23418           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1550, type);
   23419             : }
   23420             : 
   23421             : 
   23422             : static PyTypeObject srvsvc_NetSrvInfo1550_Type = {
   23423             :         PyVarObject_HEAD_INIT(NULL, 0)
   23424             :         .tp_name = "srvsvc.NetSrvInfo1550",
   23425             :         .tp_getset = py_srvsvc_NetSrvInfo1550_getsetters,
   23426             :         .tp_methods = NULL,
   23427             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23428             :         .tp_new = py_srvsvc_NetSrvInfo1550_new,
   23429             : };
   23430             : 
   23431             : 
   23432           0 : static PyObject *py_srvsvc_NetSrvInfo1552_get_maxlinkdelay(PyObject *obj, void *closure)
   23433             : {
   23434           0 :         struct srvsvc_NetSrvInfo1552 *object = pytalloc_get_ptr(obj);
   23435           0 :         PyObject *py_maxlinkdelay;
   23436           0 :         py_maxlinkdelay = PyLong_FromUnsignedLongLong((uint32_t)(object->maxlinkdelay));
   23437           0 :         return py_maxlinkdelay;
   23438             : }
   23439             : 
   23440           0 : static int py_srvsvc_NetSrvInfo1552_set_maxlinkdelay(PyObject *py_obj, PyObject *value, void *closure)
   23441             : {
   23442           0 :         struct srvsvc_NetSrvInfo1552 *object = pytalloc_get_ptr(py_obj);
   23443           0 :         if (value == NULL) {
   23444           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxlinkdelay");
   23445           0 :                 return -1;
   23446             :         }
   23447             :         {
   23448           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlinkdelay));
   23449           0 :                 if (PyLong_Check(value)) {
   23450           0 :                         unsigned long long test_var;
   23451           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23452           0 :                         if (PyErr_Occurred() != NULL) {
   23453           0 :                                 return -1;
   23454             :                         }
   23455           0 :                         if (test_var > uint_max) {
   23456           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23457             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23458           0 :                                 return -1;
   23459             :                         }
   23460           0 :                         object->maxlinkdelay = test_var;
   23461             :                 } else {
   23462           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23463             :                           PyLong_Type.tp_name);
   23464           0 :                         return -1;
   23465             :                 }
   23466             :         }
   23467           0 :         return 0;
   23468             : }
   23469             : 
   23470             : static PyGetSetDef py_srvsvc_NetSrvInfo1552_getsetters[] = {
   23471             :         {
   23472             :                 .name = discard_const_p(char, "maxlinkdelay"),
   23473             :                 .get = py_srvsvc_NetSrvInfo1552_get_maxlinkdelay,
   23474             :                 .set = py_srvsvc_NetSrvInfo1552_set_maxlinkdelay,
   23475             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23476             :         },
   23477             :         { .name = NULL }
   23478             : };
   23479             : 
   23480           0 : static PyObject *py_srvsvc_NetSrvInfo1552_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23481             : {
   23482           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1552, type);
   23483             : }
   23484             : 
   23485             : 
   23486             : static PyTypeObject srvsvc_NetSrvInfo1552_Type = {
   23487             :         PyVarObject_HEAD_INIT(NULL, 0)
   23488             :         .tp_name = "srvsvc.NetSrvInfo1552",
   23489             :         .tp_getset = py_srvsvc_NetSrvInfo1552_getsetters,
   23490             :         .tp_methods = NULL,
   23491             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23492             :         .tp_new = py_srvsvc_NetSrvInfo1552_new,
   23493             : };
   23494             : 
   23495             : 
   23496           0 : static PyObject *py_srvsvc_NetSrvInfo1553_get_minlinkthroughput(PyObject *obj, void *closure)
   23497             : {
   23498           0 :         struct srvsvc_NetSrvInfo1553 *object = pytalloc_get_ptr(obj);
   23499           0 :         PyObject *py_minlinkthroughput;
   23500           0 :         py_minlinkthroughput = PyLong_FromUnsignedLongLong((uint32_t)(object->minlinkthroughput));
   23501           0 :         return py_minlinkthroughput;
   23502             : }
   23503             : 
   23504           0 : static int py_srvsvc_NetSrvInfo1553_set_minlinkthroughput(PyObject *py_obj, PyObject *value, void *closure)
   23505             : {
   23506           0 :         struct srvsvc_NetSrvInfo1553 *object = pytalloc_get_ptr(py_obj);
   23507           0 :         if (value == NULL) {
   23508           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minlinkthroughput");
   23509           0 :                 return -1;
   23510             :         }
   23511             :         {
   23512           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minlinkthroughput));
   23513           0 :                 if (PyLong_Check(value)) {
   23514           0 :                         unsigned long long test_var;
   23515           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23516           0 :                         if (PyErr_Occurred() != NULL) {
   23517           0 :                                 return -1;
   23518             :                         }
   23519           0 :                         if (test_var > uint_max) {
   23520           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23521             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23522           0 :                                 return -1;
   23523             :                         }
   23524           0 :                         object->minlinkthroughput = test_var;
   23525             :                 } else {
   23526           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23527             :                           PyLong_Type.tp_name);
   23528           0 :                         return -1;
   23529             :                 }
   23530             :         }
   23531           0 :         return 0;
   23532             : }
   23533             : 
   23534             : static PyGetSetDef py_srvsvc_NetSrvInfo1553_getsetters[] = {
   23535             :         {
   23536             :                 .name = discard_const_p(char, "minlinkthroughput"),
   23537             :                 .get = py_srvsvc_NetSrvInfo1553_get_minlinkthroughput,
   23538             :                 .set = py_srvsvc_NetSrvInfo1553_set_minlinkthroughput,
   23539             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23540             :         },
   23541             :         { .name = NULL }
   23542             : };
   23543             : 
   23544           0 : static PyObject *py_srvsvc_NetSrvInfo1553_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23545             : {
   23546           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1553, type);
   23547             : }
   23548             : 
   23549             : 
   23550             : static PyTypeObject srvsvc_NetSrvInfo1553_Type = {
   23551             :         PyVarObject_HEAD_INIT(NULL, 0)
   23552             :         .tp_name = "srvsvc.NetSrvInfo1553",
   23553             :         .tp_getset = py_srvsvc_NetSrvInfo1553_getsetters,
   23554             :         .tp_methods = NULL,
   23555             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23556             :         .tp_new = py_srvsvc_NetSrvInfo1553_new,
   23557             : };
   23558             : 
   23559             : 
   23560           0 : static PyObject *py_srvsvc_NetSrvInfo1554_get_linkinfovalidtime(PyObject *obj, void *closure)
   23561             : {
   23562           0 :         struct srvsvc_NetSrvInfo1554 *object = pytalloc_get_ptr(obj);
   23563           0 :         PyObject *py_linkinfovalidtime;
   23564           0 :         py_linkinfovalidtime = PyLong_FromUnsignedLongLong((uint32_t)(object->linkinfovalidtime));
   23565           0 :         return py_linkinfovalidtime;
   23566             : }
   23567             : 
   23568           0 : static int py_srvsvc_NetSrvInfo1554_set_linkinfovalidtime(PyObject *py_obj, PyObject *value, void *closure)
   23569             : {
   23570           0 :         struct srvsvc_NetSrvInfo1554 *object = pytalloc_get_ptr(py_obj);
   23571           0 :         if (value == NULL) {
   23572           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->linkinfovalidtime");
   23573           0 :                 return -1;
   23574             :         }
   23575             :         {
   23576           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->linkinfovalidtime));
   23577           0 :                 if (PyLong_Check(value)) {
   23578           0 :                         unsigned long long test_var;
   23579           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23580           0 :                         if (PyErr_Occurred() != NULL) {
   23581           0 :                                 return -1;
   23582             :                         }
   23583           0 :                         if (test_var > uint_max) {
   23584           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23585             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23586           0 :                                 return -1;
   23587             :                         }
   23588           0 :                         object->linkinfovalidtime = test_var;
   23589             :                 } else {
   23590           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23591             :                           PyLong_Type.tp_name);
   23592           0 :                         return -1;
   23593             :                 }
   23594             :         }
   23595           0 :         return 0;
   23596             : }
   23597             : 
   23598             : static PyGetSetDef py_srvsvc_NetSrvInfo1554_getsetters[] = {
   23599             :         {
   23600             :                 .name = discard_const_p(char, "linkinfovalidtime"),
   23601             :                 .get = py_srvsvc_NetSrvInfo1554_get_linkinfovalidtime,
   23602             :                 .set = py_srvsvc_NetSrvInfo1554_set_linkinfovalidtime,
   23603             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23604             :         },
   23605             :         { .name = NULL }
   23606             : };
   23607             : 
   23608           0 : static PyObject *py_srvsvc_NetSrvInfo1554_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23609             : {
   23610           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1554, type);
   23611             : }
   23612             : 
   23613             : 
   23614             : static PyTypeObject srvsvc_NetSrvInfo1554_Type = {
   23615             :         PyVarObject_HEAD_INIT(NULL, 0)
   23616             :         .tp_name = "srvsvc.NetSrvInfo1554",
   23617             :         .tp_getset = py_srvsvc_NetSrvInfo1554_getsetters,
   23618             :         .tp_methods = NULL,
   23619             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23620             :         .tp_new = py_srvsvc_NetSrvInfo1554_new,
   23621             : };
   23622             : 
   23623             : 
   23624           0 : static PyObject *py_srvsvc_NetSrvInfo1555_get_scavqosinfoupdatetime(PyObject *obj, void *closure)
   23625             : {
   23626           0 :         struct srvsvc_NetSrvInfo1555 *object = pytalloc_get_ptr(obj);
   23627           0 :         PyObject *py_scavqosinfoupdatetime;
   23628           0 :         py_scavqosinfoupdatetime = PyLong_FromUnsignedLongLong((uint32_t)(object->scavqosinfoupdatetime));
   23629           0 :         return py_scavqosinfoupdatetime;
   23630             : }
   23631             : 
   23632           0 : static int py_srvsvc_NetSrvInfo1555_set_scavqosinfoupdatetime(PyObject *py_obj, PyObject *value, void *closure)
   23633             : {
   23634           0 :         struct srvsvc_NetSrvInfo1555 *object = pytalloc_get_ptr(py_obj);
   23635           0 :         if (value == NULL) {
   23636           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->scavqosinfoupdatetime");
   23637           0 :                 return -1;
   23638             :         }
   23639             :         {
   23640           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavqosinfoupdatetime));
   23641           0 :                 if (PyLong_Check(value)) {
   23642           0 :                         unsigned long long test_var;
   23643           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23644           0 :                         if (PyErr_Occurred() != NULL) {
   23645           0 :                                 return -1;
   23646             :                         }
   23647           0 :                         if (test_var > uint_max) {
   23648           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23649             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23650           0 :                                 return -1;
   23651             :                         }
   23652           0 :                         object->scavqosinfoupdatetime = test_var;
   23653             :                 } else {
   23654           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23655             :                           PyLong_Type.tp_name);
   23656           0 :                         return -1;
   23657             :                 }
   23658             :         }
   23659           0 :         return 0;
   23660             : }
   23661             : 
   23662             : static PyGetSetDef py_srvsvc_NetSrvInfo1555_getsetters[] = {
   23663             :         {
   23664             :                 .name = discard_const_p(char, "scavqosinfoupdatetime"),
   23665             :                 .get = py_srvsvc_NetSrvInfo1555_get_scavqosinfoupdatetime,
   23666             :                 .set = py_srvsvc_NetSrvInfo1555_set_scavqosinfoupdatetime,
   23667             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23668             :         },
   23669             :         { .name = NULL }
   23670             : };
   23671             : 
   23672           0 : static PyObject *py_srvsvc_NetSrvInfo1555_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23673             : {
   23674           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1555, type);
   23675             : }
   23676             : 
   23677             : 
   23678             : static PyTypeObject srvsvc_NetSrvInfo1555_Type = {
   23679             :         PyVarObject_HEAD_INIT(NULL, 0)
   23680             :         .tp_name = "srvsvc.NetSrvInfo1555",
   23681             :         .tp_getset = py_srvsvc_NetSrvInfo1555_getsetters,
   23682             :         .tp_methods = NULL,
   23683             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23684             :         .tp_new = py_srvsvc_NetSrvInfo1555_new,
   23685             : };
   23686             : 
   23687             : 
   23688           0 : static PyObject *py_srvsvc_NetSrvInfo1556_get_maxworkitemidletime(PyObject *obj, void *closure)
   23689             : {
   23690           0 :         struct srvsvc_NetSrvInfo1556 *object = pytalloc_get_ptr(obj);
   23691           0 :         PyObject *py_maxworkitemidletime;
   23692           0 :         py_maxworkitemidletime = PyLong_FromUnsignedLongLong((uint32_t)(object->maxworkitemidletime));
   23693           0 :         return py_maxworkitemidletime;
   23694             : }
   23695             : 
   23696           0 : static int py_srvsvc_NetSrvInfo1556_set_maxworkitemidletime(PyObject *py_obj, PyObject *value, void *closure)
   23697             : {
   23698           0 :         struct srvsvc_NetSrvInfo1556 *object = pytalloc_get_ptr(py_obj);
   23699           0 :         if (value == NULL) {
   23700           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxworkitemidletime");
   23701           0 :                 return -1;
   23702             :         }
   23703             :         {
   23704           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitemidletime));
   23705           0 :                 if (PyLong_Check(value)) {
   23706           0 :                         unsigned long long test_var;
   23707           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23708           0 :                         if (PyErr_Occurred() != NULL) {
   23709           0 :                                 return -1;
   23710             :                         }
   23711           0 :                         if (test_var > uint_max) {
   23712           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23713             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23714           0 :                                 return -1;
   23715             :                         }
   23716           0 :                         object->maxworkitemidletime = test_var;
   23717             :                 } else {
   23718           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23719             :                           PyLong_Type.tp_name);
   23720           0 :                         return -1;
   23721             :                 }
   23722             :         }
   23723           0 :         return 0;
   23724             : }
   23725             : 
   23726             : static PyGetSetDef py_srvsvc_NetSrvInfo1556_getsetters[] = {
   23727             :         {
   23728             :                 .name = discard_const_p(char, "maxworkitemidletime"),
   23729             :                 .get = py_srvsvc_NetSrvInfo1556_get_maxworkitemidletime,
   23730             :                 .set = py_srvsvc_NetSrvInfo1556_set_maxworkitemidletime,
   23731             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23732             :         },
   23733             :         { .name = NULL }
   23734             : };
   23735             : 
   23736           0 : static PyObject *py_srvsvc_NetSrvInfo1556_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23737             : {
   23738           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1556, type);
   23739             : }
   23740             : 
   23741             : 
   23742             : static PyTypeObject srvsvc_NetSrvInfo1556_Type = {
   23743             :         PyVarObject_HEAD_INIT(NULL, 0)
   23744             :         .tp_name = "srvsvc.NetSrvInfo1556",
   23745             :         .tp_getset = py_srvsvc_NetSrvInfo1556_getsetters,
   23746             :         .tp_methods = NULL,
   23747             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23748             :         .tp_new = py_srvsvc_NetSrvInfo1556_new,
   23749             : };
   23750             : 
   23751           1 : static PyObject *py_import_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSrvInfo *in)
   23752             : {
   23753           0 :         PyObject *ret;
   23754             : 
   23755           1 :         switch (level) {
   23756           0 :                 case 100:
   23757           0 :                         if (in->info100 == NULL) {
   23758           0 :                                 ret = Py_None;
   23759           0 :                                 Py_INCREF(ret);
   23760             :                         } else {
   23761           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo100_Type, in->info100, in->info100);
   23762             :                         }
   23763           0 :                         return ret;
   23764             : 
   23765           1 :                 case 101:
   23766           1 :                         if (in->info101 == NULL) {
   23767           0 :                                 ret = Py_None;
   23768           0 :                                 Py_INCREF(ret);
   23769             :                         } else {
   23770           1 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo101_Type, in->info101, in->info101);
   23771             :                         }
   23772           1 :                         return ret;
   23773             : 
   23774           0 :                 case 102:
   23775           0 :                         if (in->info102 == NULL) {
   23776           0 :                                 ret = Py_None;
   23777           0 :                                 Py_INCREF(ret);
   23778             :                         } else {
   23779           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo102_Type, in->info102, in->info102);
   23780             :                         }
   23781           0 :                         return ret;
   23782             : 
   23783           0 :                 case 402:
   23784           0 :                         if (in->info402 == NULL) {
   23785           0 :                                 ret = Py_None;
   23786           0 :                                 Py_INCREF(ret);
   23787             :                         } else {
   23788           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo402_Type, in->info402, in->info402);
   23789             :                         }
   23790           0 :                         return ret;
   23791             : 
   23792           0 :                 case 403:
   23793           0 :                         if (in->info403 == NULL) {
   23794           0 :                                 ret = Py_None;
   23795           0 :                                 Py_INCREF(ret);
   23796             :                         } else {
   23797           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo403_Type, in->info403, in->info403);
   23798             :                         }
   23799           0 :                         return ret;
   23800             : 
   23801           0 :                 case 502:
   23802           0 :                         if (in->info502 == NULL) {
   23803           0 :                                 ret = Py_None;
   23804           0 :                                 Py_INCREF(ret);
   23805             :                         } else {
   23806           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo502_Type, in->info502, in->info502);
   23807             :                         }
   23808           0 :                         return ret;
   23809             : 
   23810           0 :                 case 503:
   23811           0 :                         if (in->info503 == NULL) {
   23812           0 :                                 ret = Py_None;
   23813           0 :                                 Py_INCREF(ret);
   23814             :                         } else {
   23815           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo503_Type, in->info503, in->info503);
   23816             :                         }
   23817           0 :                         return ret;
   23818             : 
   23819           0 :                 case 599:
   23820           0 :                         if (in->info599 == NULL) {
   23821           0 :                                 ret = Py_None;
   23822           0 :                                 Py_INCREF(ret);
   23823             :                         } else {
   23824           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo599_Type, in->info599, in->info599);
   23825             :                         }
   23826           0 :                         return ret;
   23827             : 
   23828           0 :                 case 1005:
   23829           0 :                         if (in->info1005 == NULL) {
   23830           0 :                                 ret = Py_None;
   23831           0 :                                 Py_INCREF(ret);
   23832             :                         } else {
   23833           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1005_Type, in->info1005, in->info1005);
   23834             :                         }
   23835           0 :                         return ret;
   23836             : 
   23837           0 :                 case 1010:
   23838           0 :                         if (in->info1010 == NULL) {
   23839           0 :                                 ret = Py_None;
   23840           0 :                                 Py_INCREF(ret);
   23841             :                         } else {
   23842           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1010_Type, in->info1010, in->info1010);
   23843             :                         }
   23844           0 :                         return ret;
   23845             : 
   23846           0 :                 case 1016:
   23847           0 :                         if (in->info1016 == NULL) {
   23848           0 :                                 ret = Py_None;
   23849           0 :                                 Py_INCREF(ret);
   23850             :                         } else {
   23851           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1016_Type, in->info1016, in->info1016);
   23852             :                         }
   23853           0 :                         return ret;
   23854             : 
   23855           0 :                 case 1017:
   23856           0 :                         if (in->info1017 == NULL) {
   23857           0 :                                 ret = Py_None;
   23858           0 :                                 Py_INCREF(ret);
   23859             :                         } else {
   23860           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1017_Type, in->info1017, in->info1017);
   23861             :                         }
   23862           0 :                         return ret;
   23863             : 
   23864           0 :                 case 1018:
   23865           0 :                         if (in->info1018 == NULL) {
   23866           0 :                                 ret = Py_None;
   23867           0 :                                 Py_INCREF(ret);
   23868             :                         } else {
   23869           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1018_Type, in->info1018, in->info1018);
   23870             :                         }
   23871           0 :                         return ret;
   23872             : 
   23873           0 :                 case 1107:
   23874           0 :                         if (in->info1107 == NULL) {
   23875           0 :                                 ret = Py_None;
   23876           0 :                                 Py_INCREF(ret);
   23877             :                         } else {
   23878           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1107_Type, in->info1107, in->info1107);
   23879             :                         }
   23880           0 :                         return ret;
   23881             : 
   23882           0 :                 case 1501:
   23883           0 :                         if (in->info1501 == NULL) {
   23884           0 :                                 ret = Py_None;
   23885           0 :                                 Py_INCREF(ret);
   23886             :                         } else {
   23887           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1501_Type, in->info1501, in->info1501);
   23888             :                         }
   23889           0 :                         return ret;
   23890             : 
   23891           0 :                 case 1502:
   23892           0 :                         if (in->info1502 == NULL) {
   23893           0 :                                 ret = Py_None;
   23894           0 :                                 Py_INCREF(ret);
   23895             :                         } else {
   23896           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1502_Type, in->info1502, in->info1502);
   23897             :                         }
   23898           0 :                         return ret;
   23899             : 
   23900           0 :                 case 1503:
   23901           0 :                         if (in->info1503 == NULL) {
   23902           0 :                                 ret = Py_None;
   23903           0 :                                 Py_INCREF(ret);
   23904             :                         } else {
   23905           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1503_Type, in->info1503, in->info1503);
   23906             :                         }
   23907           0 :                         return ret;
   23908             : 
   23909           0 :                 case 1506:
   23910           0 :                         if (in->info1506 == NULL) {
   23911           0 :                                 ret = Py_None;
   23912           0 :                                 Py_INCREF(ret);
   23913             :                         } else {
   23914           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1506_Type, in->info1506, in->info1506);
   23915             :                         }
   23916           0 :                         return ret;
   23917             : 
   23918           0 :                 case 1509:
   23919           0 :                         if (in->info1509 == NULL) {
   23920           0 :                                 ret = Py_None;
   23921           0 :                                 Py_INCREF(ret);
   23922             :                         } else {
   23923           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1509_Type, in->info1509, in->info1509);
   23924             :                         }
   23925           0 :                         return ret;
   23926             : 
   23927           0 :                 case 1510:
   23928           0 :                         if (in->info1510 == NULL) {
   23929           0 :                                 ret = Py_None;
   23930           0 :                                 Py_INCREF(ret);
   23931             :                         } else {
   23932           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1510_Type, in->info1510, in->info1510);
   23933             :                         }
   23934           0 :                         return ret;
   23935             : 
   23936           0 :                 case 1511:
   23937           0 :                         if (in->info1511 == NULL) {
   23938           0 :                                 ret = Py_None;
   23939           0 :                                 Py_INCREF(ret);
   23940             :                         } else {
   23941           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1511_Type, in->info1511, in->info1511);
   23942             :                         }
   23943           0 :                         return ret;
   23944             : 
   23945           0 :                 case 1512:
   23946           0 :                         if (in->info1512 == NULL) {
   23947           0 :                                 ret = Py_None;
   23948           0 :                                 Py_INCREF(ret);
   23949             :                         } else {
   23950           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1512_Type, in->info1512, in->info1512);
   23951             :                         }
   23952           0 :                         return ret;
   23953             : 
   23954           0 :                 case 1513:
   23955           0 :                         if (in->info1513 == NULL) {
   23956           0 :                                 ret = Py_None;
   23957           0 :                                 Py_INCREF(ret);
   23958             :                         } else {
   23959           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1513_Type, in->info1513, in->info1513);
   23960             :                         }
   23961           0 :                         return ret;
   23962             : 
   23963           0 :                 case 1514:
   23964           0 :                         if (in->info1514 == NULL) {
   23965           0 :                                 ret = Py_None;
   23966           0 :                                 Py_INCREF(ret);
   23967             :                         } else {
   23968           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1514_Type, in->info1514, in->info1514);
   23969             :                         }
   23970           0 :                         return ret;
   23971             : 
   23972           0 :                 case 1515:
   23973           0 :                         if (in->info1515 == NULL) {
   23974           0 :                                 ret = Py_None;
   23975           0 :                                 Py_INCREF(ret);
   23976             :                         } else {
   23977           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1515_Type, in->info1515, in->info1515);
   23978             :                         }
   23979           0 :                         return ret;
   23980             : 
   23981           0 :                 case 1516:
   23982           0 :                         if (in->info1516 == NULL) {
   23983           0 :                                 ret = Py_None;
   23984           0 :                                 Py_INCREF(ret);
   23985             :                         } else {
   23986           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1516_Type, in->info1516, in->info1516);
   23987             :                         }
   23988           0 :                         return ret;
   23989             : 
   23990           0 :                 case 1518:
   23991           0 :                         if (in->info1518 == NULL) {
   23992           0 :                                 ret = Py_None;
   23993           0 :                                 Py_INCREF(ret);
   23994             :                         } else {
   23995           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1518_Type, in->info1518, in->info1518);
   23996             :                         }
   23997           0 :                         return ret;
   23998             : 
   23999           0 :                 case 1520:
   24000           0 :                         if (in->info1520 == NULL) {
   24001           0 :                                 ret = Py_None;
   24002           0 :                                 Py_INCREF(ret);
   24003             :                         } else {
   24004           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1520_Type, in->info1520, in->info1520);
   24005             :                         }
   24006           0 :                         return ret;
   24007             : 
   24008           0 :                 case 1521:
   24009           0 :                         if (in->info1521 == NULL) {
   24010           0 :                                 ret = Py_None;
   24011           0 :                                 Py_INCREF(ret);
   24012             :                         } else {
   24013           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1521_Type, in->info1521, in->info1521);
   24014             :                         }
   24015           0 :                         return ret;
   24016             : 
   24017           0 :                 case 1522:
   24018           0 :                         if (in->info1522 == NULL) {
   24019           0 :                                 ret = Py_None;
   24020           0 :                                 Py_INCREF(ret);
   24021             :                         } else {
   24022           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1522_Type, in->info1522, in->info1522);
   24023             :                         }
   24024           0 :                         return ret;
   24025             : 
   24026           0 :                 case 1523:
   24027           0 :                         if (in->info1523 == NULL) {
   24028           0 :                                 ret = Py_None;
   24029           0 :                                 Py_INCREF(ret);
   24030             :                         } else {
   24031           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1523_Type, in->info1523, in->info1523);
   24032             :                         }
   24033           0 :                         return ret;
   24034             : 
   24035           0 :                 case 1524:
   24036           0 :                         if (in->info1524 == NULL) {
   24037           0 :                                 ret = Py_None;
   24038           0 :                                 Py_INCREF(ret);
   24039             :                         } else {
   24040           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1524_Type, in->info1524, in->info1524);
   24041             :                         }
   24042           0 :                         return ret;
   24043             : 
   24044           0 :                 case 1525:
   24045           0 :                         if (in->info1525 == NULL) {
   24046           0 :                                 ret = Py_None;
   24047           0 :                                 Py_INCREF(ret);
   24048             :                         } else {
   24049           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1525_Type, in->info1525, in->info1525);
   24050             :                         }
   24051           0 :                         return ret;
   24052             : 
   24053           0 :                 case 1528:
   24054           0 :                         if (in->info1528 == NULL) {
   24055           0 :                                 ret = Py_None;
   24056           0 :                                 Py_INCREF(ret);
   24057             :                         } else {
   24058           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1528_Type, in->info1528, in->info1528);
   24059             :                         }
   24060           0 :                         return ret;
   24061             : 
   24062           0 :                 case 1529:
   24063           0 :                         if (in->info1529 == NULL) {
   24064           0 :                                 ret = Py_None;
   24065           0 :                                 Py_INCREF(ret);
   24066             :                         } else {
   24067           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1529_Type, in->info1529, in->info1529);
   24068             :                         }
   24069           0 :                         return ret;
   24070             : 
   24071           0 :                 case 1530:
   24072           0 :                         if (in->info1530 == NULL) {
   24073           0 :                                 ret = Py_None;
   24074           0 :                                 Py_INCREF(ret);
   24075             :                         } else {
   24076           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1530_Type, in->info1530, in->info1530);
   24077             :                         }
   24078           0 :                         return ret;
   24079             : 
   24080           0 :                 case 1533:
   24081           0 :                         if (in->info1533 == NULL) {
   24082           0 :                                 ret = Py_None;
   24083           0 :                                 Py_INCREF(ret);
   24084             :                         } else {
   24085           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1533_Type, in->info1533, in->info1533);
   24086             :                         }
   24087           0 :                         return ret;
   24088             : 
   24089           0 :                 case 1534:
   24090           0 :                         if (in->info1534 == NULL) {
   24091           0 :                                 ret = Py_None;
   24092           0 :                                 Py_INCREF(ret);
   24093             :                         } else {
   24094           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1534_Type, in->info1534, in->info1534);
   24095             :                         }
   24096           0 :                         return ret;
   24097             : 
   24098           0 :                 case 1535:
   24099           0 :                         if (in->info1535 == NULL) {
   24100           0 :                                 ret = Py_None;
   24101           0 :                                 Py_INCREF(ret);
   24102             :                         } else {
   24103           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1535_Type, in->info1535, in->info1535);
   24104             :                         }
   24105           0 :                         return ret;
   24106             : 
   24107           0 :                 case 1536:
   24108           0 :                         if (in->info1536 == NULL) {
   24109           0 :                                 ret = Py_None;
   24110           0 :                                 Py_INCREF(ret);
   24111             :                         } else {
   24112           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1536_Type, in->info1536, in->info1536);
   24113             :                         }
   24114           0 :                         return ret;
   24115             : 
   24116           0 :                 case 1537:
   24117           0 :                         if (in->info1537 == NULL) {
   24118           0 :                                 ret = Py_None;
   24119           0 :                                 Py_INCREF(ret);
   24120             :                         } else {
   24121           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1537_Type, in->info1537, in->info1537);
   24122             :                         }
   24123           0 :                         return ret;
   24124             : 
   24125           0 :                 case 1538:
   24126           0 :                         if (in->info1538 == NULL) {
   24127           0 :                                 ret = Py_None;
   24128           0 :                                 Py_INCREF(ret);
   24129             :                         } else {
   24130           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1538_Type, in->info1538, in->info1538);
   24131             :                         }
   24132           0 :                         return ret;
   24133             : 
   24134           0 :                 case 1539:
   24135           0 :                         if (in->info1539 == NULL) {
   24136           0 :                                 ret = Py_None;
   24137           0 :                                 Py_INCREF(ret);
   24138             :                         } else {
   24139           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1539_Type, in->info1539, in->info1539);
   24140             :                         }
   24141           0 :                         return ret;
   24142             : 
   24143           0 :                 case 1540:
   24144           0 :                         if (in->info1540 == NULL) {
   24145           0 :                                 ret = Py_None;
   24146           0 :                                 Py_INCREF(ret);
   24147             :                         } else {
   24148           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1540_Type, in->info1540, in->info1540);
   24149             :                         }
   24150           0 :                         return ret;
   24151             : 
   24152           0 :                 case 1541:
   24153           0 :                         if (in->info1541 == NULL) {
   24154           0 :                                 ret = Py_None;
   24155           0 :                                 Py_INCREF(ret);
   24156             :                         } else {
   24157           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1541_Type, in->info1541, in->info1541);
   24158             :                         }
   24159           0 :                         return ret;
   24160             : 
   24161           0 :                 case 1542:
   24162           0 :                         if (in->info1542 == NULL) {
   24163           0 :                                 ret = Py_None;
   24164           0 :                                 Py_INCREF(ret);
   24165             :                         } else {
   24166           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1542_Type, in->info1542, in->info1542);
   24167             :                         }
   24168           0 :                         return ret;
   24169             : 
   24170           0 :                 case 1543:
   24171           0 :                         if (in->info1543 == NULL) {
   24172           0 :                                 ret = Py_None;
   24173           0 :                                 Py_INCREF(ret);
   24174             :                         } else {
   24175           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1543_Type, in->info1543, in->info1543);
   24176             :                         }
   24177           0 :                         return ret;
   24178             : 
   24179           0 :                 case 1544:
   24180           0 :                         if (in->info1544 == NULL) {
   24181           0 :                                 ret = Py_None;
   24182           0 :                                 Py_INCREF(ret);
   24183             :                         } else {
   24184           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1544_Type, in->info1544, in->info1544);
   24185             :                         }
   24186           0 :                         return ret;
   24187             : 
   24188           0 :                 case 1545:
   24189           0 :                         if (in->info1545 == NULL) {
   24190           0 :                                 ret = Py_None;
   24191           0 :                                 Py_INCREF(ret);
   24192             :                         } else {
   24193           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1545_Type, in->info1545, in->info1545);
   24194             :                         }
   24195           0 :                         return ret;
   24196             : 
   24197           0 :                 case 1546:
   24198           0 :                         if (in->info1546 == NULL) {
   24199           0 :                                 ret = Py_None;
   24200           0 :                                 Py_INCREF(ret);
   24201             :                         } else {
   24202           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1546_Type, in->info1546, in->info1546);
   24203             :                         }
   24204           0 :                         return ret;
   24205             : 
   24206           0 :                 case 1547:
   24207           0 :                         if (in->info1547 == NULL) {
   24208           0 :                                 ret = Py_None;
   24209           0 :                                 Py_INCREF(ret);
   24210             :                         } else {
   24211           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1547_Type, in->info1547, in->info1547);
   24212             :                         }
   24213           0 :                         return ret;
   24214             : 
   24215           0 :                 case 1548:
   24216           0 :                         if (in->info1548 == NULL) {
   24217           0 :                                 ret = Py_None;
   24218           0 :                                 Py_INCREF(ret);
   24219             :                         } else {
   24220           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1548_Type, in->info1548, in->info1548);
   24221             :                         }
   24222           0 :                         return ret;
   24223             : 
   24224           0 :                 case 1549:
   24225           0 :                         if (in->info1549 == NULL) {
   24226           0 :                                 ret = Py_None;
   24227           0 :                                 Py_INCREF(ret);
   24228             :                         } else {
   24229           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1549_Type, in->info1549, in->info1549);
   24230             :                         }
   24231           0 :                         return ret;
   24232             : 
   24233           0 :                 case 1550:
   24234           0 :                         if (in->info1550 == NULL) {
   24235           0 :                                 ret = Py_None;
   24236           0 :                                 Py_INCREF(ret);
   24237             :                         } else {
   24238           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1550_Type, in->info1550, in->info1550);
   24239             :                         }
   24240           0 :                         return ret;
   24241             : 
   24242           0 :                 case 1552:
   24243           0 :                         if (in->info1552 == NULL) {
   24244           0 :                                 ret = Py_None;
   24245           0 :                                 Py_INCREF(ret);
   24246             :                         } else {
   24247           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1552_Type, in->info1552, in->info1552);
   24248             :                         }
   24249           0 :                         return ret;
   24250             : 
   24251           0 :                 case 1553:
   24252           0 :                         if (in->info1553 == NULL) {
   24253           0 :                                 ret = Py_None;
   24254           0 :                                 Py_INCREF(ret);
   24255             :                         } else {
   24256           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1553_Type, in->info1553, in->info1553);
   24257             :                         }
   24258           0 :                         return ret;
   24259             : 
   24260           0 :                 case 1554:
   24261           0 :                         if (in->info1554 == NULL) {
   24262           0 :                                 ret = Py_None;
   24263           0 :                                 Py_INCREF(ret);
   24264             :                         } else {
   24265           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1554_Type, in->info1554, in->info1554);
   24266             :                         }
   24267           0 :                         return ret;
   24268             : 
   24269           0 :                 case 1555:
   24270           0 :                         if (in->info1555 == NULL) {
   24271           0 :                                 ret = Py_None;
   24272           0 :                                 Py_INCREF(ret);
   24273             :                         } else {
   24274           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1555_Type, in->info1555, in->info1555);
   24275             :                         }
   24276           0 :                         return ret;
   24277             : 
   24278           0 :                 case 1556:
   24279           0 :                         if (in->info1556 == NULL) {
   24280           0 :                                 ret = Py_None;
   24281           0 :                                 Py_INCREF(ret);
   24282             :                         } else {
   24283           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1556_Type, in->info1556, in->info1556);
   24284             :                         }
   24285           0 :                         return ret;
   24286             : 
   24287           0 :                 default:
   24288           0 :                         ret = Py_None;
   24289           0 :                         Py_INCREF(ret);
   24290           0 :                         return ret;
   24291             : 
   24292             :         }
   24293             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   24294             :         return NULL;
   24295             : }
   24296             : 
   24297           0 : static union srvsvc_NetSrvInfo *py_export_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   24298             : {
   24299           0 :         union srvsvc_NetSrvInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetSrvInfo);
   24300           0 :         switch (level) {
   24301           0 :                 case 100:
   24302           0 :                         if (in == NULL) {
   24303           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info100");
   24304           0 :                                 talloc_free(ret); return NULL;
   24305             :                         }
   24306           0 :                         if (in == Py_None) {
   24307           0 :                                 ret->info100 = NULL;
   24308             :                         } else {
   24309           0 :                                 ret->info100 = NULL;
   24310           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo100_Type, in, talloc_free(ret); return NULL;);
   24311           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24312           0 :                                         PyErr_NoMemory();
   24313           0 :                                         talloc_free(ret); return NULL;
   24314             :                                 }
   24315           0 :                                 ret->info100 = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(in);
   24316             :                         }
   24317           0 :                         break;
   24318             : 
   24319           0 :                 case 101:
   24320           0 :                         if (in == NULL) {
   24321           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info101");
   24322           0 :                                 talloc_free(ret); return NULL;
   24323             :                         }
   24324           0 :                         if (in == Py_None) {
   24325           0 :                                 ret->info101 = NULL;
   24326             :                         } else {
   24327           0 :                                 ret->info101 = NULL;
   24328           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo101_Type, in, talloc_free(ret); return NULL;);
   24329           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24330           0 :                                         PyErr_NoMemory();
   24331           0 :                                         talloc_free(ret); return NULL;
   24332             :                                 }
   24333           0 :                                 ret->info101 = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(in);
   24334             :                         }
   24335           0 :                         break;
   24336             : 
   24337           0 :                 case 102:
   24338           0 :                         if (in == NULL) {
   24339           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info102");
   24340           0 :                                 talloc_free(ret); return NULL;
   24341             :                         }
   24342           0 :                         if (in == Py_None) {
   24343           0 :                                 ret->info102 = NULL;
   24344             :                         } else {
   24345           0 :                                 ret->info102 = NULL;
   24346           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo102_Type, in, talloc_free(ret); return NULL;);
   24347           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24348           0 :                                         PyErr_NoMemory();
   24349           0 :                                         talloc_free(ret); return NULL;
   24350             :                                 }
   24351           0 :                                 ret->info102 = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(in);
   24352             :                         }
   24353           0 :                         break;
   24354             : 
   24355           0 :                 case 402:
   24356           0 :                         if (in == NULL) {
   24357           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info402");
   24358           0 :                                 talloc_free(ret); return NULL;
   24359             :                         }
   24360           0 :                         if (in == Py_None) {
   24361           0 :                                 ret->info402 = NULL;
   24362             :                         } else {
   24363           0 :                                 ret->info402 = NULL;
   24364           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo402_Type, in, talloc_free(ret); return NULL;);
   24365           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24366           0 :                                         PyErr_NoMemory();
   24367           0 :                                         talloc_free(ret); return NULL;
   24368             :                                 }
   24369           0 :                                 ret->info402 = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(in);
   24370             :                         }
   24371           0 :                         break;
   24372             : 
   24373           0 :                 case 403:
   24374           0 :                         if (in == NULL) {
   24375           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info403");
   24376           0 :                                 talloc_free(ret); return NULL;
   24377             :                         }
   24378           0 :                         if (in == Py_None) {
   24379           0 :                                 ret->info403 = NULL;
   24380             :                         } else {
   24381           0 :                                 ret->info403 = NULL;
   24382           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo403_Type, in, talloc_free(ret); return NULL;);
   24383           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24384           0 :                                         PyErr_NoMemory();
   24385           0 :                                         talloc_free(ret); return NULL;
   24386             :                                 }
   24387           0 :                                 ret->info403 = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(in);
   24388             :                         }
   24389           0 :                         break;
   24390             : 
   24391           0 :                 case 502:
   24392           0 :                         if (in == NULL) {
   24393           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info502");
   24394           0 :                                 talloc_free(ret); return NULL;
   24395             :                         }
   24396           0 :                         if (in == Py_None) {
   24397           0 :                                 ret->info502 = NULL;
   24398             :                         } else {
   24399           0 :                                 ret->info502 = NULL;
   24400           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo502_Type, in, talloc_free(ret); return NULL;);
   24401           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24402           0 :                                         PyErr_NoMemory();
   24403           0 :                                         talloc_free(ret); return NULL;
   24404             :                                 }
   24405           0 :                                 ret->info502 = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(in);
   24406             :                         }
   24407           0 :                         break;
   24408             : 
   24409           0 :                 case 503:
   24410           0 :                         if (in == NULL) {
   24411           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info503");
   24412           0 :                                 talloc_free(ret); return NULL;
   24413             :                         }
   24414           0 :                         if (in == Py_None) {
   24415           0 :                                 ret->info503 = NULL;
   24416             :                         } else {
   24417           0 :                                 ret->info503 = NULL;
   24418           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo503_Type, in, talloc_free(ret); return NULL;);
   24419           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24420           0 :                                         PyErr_NoMemory();
   24421           0 :                                         talloc_free(ret); return NULL;
   24422             :                                 }
   24423           0 :                                 ret->info503 = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(in);
   24424             :                         }
   24425           0 :                         break;
   24426             : 
   24427           0 :                 case 599:
   24428           0 :                         if (in == NULL) {
   24429           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info599");
   24430           0 :                                 talloc_free(ret); return NULL;
   24431             :                         }
   24432           0 :                         if (in == Py_None) {
   24433           0 :                                 ret->info599 = NULL;
   24434             :                         } else {
   24435           0 :                                 ret->info599 = NULL;
   24436           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo599_Type, in, talloc_free(ret); return NULL;);
   24437           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24438           0 :                                         PyErr_NoMemory();
   24439           0 :                                         talloc_free(ret); return NULL;
   24440             :                                 }
   24441           0 :                                 ret->info599 = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(in);
   24442             :                         }
   24443           0 :                         break;
   24444             : 
   24445           0 :                 case 1005:
   24446           0 :                         if (in == NULL) {
   24447           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1005");
   24448           0 :                                 talloc_free(ret); return NULL;
   24449             :                         }
   24450           0 :                         if (in == Py_None) {
   24451           0 :                                 ret->info1005 = NULL;
   24452             :                         } else {
   24453           0 :                                 ret->info1005 = NULL;
   24454           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1005_Type, in, talloc_free(ret); return NULL;);
   24455           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24456           0 :                                         PyErr_NoMemory();
   24457           0 :                                         talloc_free(ret); return NULL;
   24458             :                                 }
   24459           0 :                                 ret->info1005 = (struct srvsvc_NetSrvInfo1005 *)pytalloc_get_ptr(in);
   24460             :                         }
   24461           0 :                         break;
   24462             : 
   24463           0 :                 case 1010:
   24464           0 :                         if (in == NULL) {
   24465           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1010");
   24466           0 :                                 talloc_free(ret); return NULL;
   24467             :                         }
   24468           0 :                         if (in == Py_None) {
   24469           0 :                                 ret->info1010 = NULL;
   24470             :                         } else {
   24471           0 :                                 ret->info1010 = NULL;
   24472           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1010_Type, in, talloc_free(ret); return NULL;);
   24473           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24474           0 :                                         PyErr_NoMemory();
   24475           0 :                                         talloc_free(ret); return NULL;
   24476             :                                 }
   24477           0 :                                 ret->info1010 = (struct srvsvc_NetSrvInfo1010 *)pytalloc_get_ptr(in);
   24478             :                         }
   24479           0 :                         break;
   24480             : 
   24481           0 :                 case 1016:
   24482           0 :                         if (in == NULL) {
   24483           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1016");
   24484           0 :                                 talloc_free(ret); return NULL;
   24485             :                         }
   24486           0 :                         if (in == Py_None) {
   24487           0 :                                 ret->info1016 = NULL;
   24488             :                         } else {
   24489           0 :                                 ret->info1016 = NULL;
   24490           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1016_Type, in, talloc_free(ret); return NULL;);
   24491           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24492           0 :                                         PyErr_NoMemory();
   24493           0 :                                         talloc_free(ret); return NULL;
   24494             :                                 }
   24495           0 :                                 ret->info1016 = (struct srvsvc_NetSrvInfo1016 *)pytalloc_get_ptr(in);
   24496             :                         }
   24497           0 :                         break;
   24498             : 
   24499           0 :                 case 1017:
   24500           0 :                         if (in == NULL) {
   24501           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1017");
   24502           0 :                                 talloc_free(ret); return NULL;
   24503             :                         }
   24504           0 :                         if (in == Py_None) {
   24505           0 :                                 ret->info1017 = NULL;
   24506             :                         } else {
   24507           0 :                                 ret->info1017 = NULL;
   24508           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1017_Type, in, talloc_free(ret); return NULL;);
   24509           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24510           0 :                                         PyErr_NoMemory();
   24511           0 :                                         talloc_free(ret); return NULL;
   24512             :                                 }
   24513           0 :                                 ret->info1017 = (struct srvsvc_NetSrvInfo1017 *)pytalloc_get_ptr(in);
   24514             :                         }
   24515           0 :                         break;
   24516             : 
   24517           0 :                 case 1018:
   24518           0 :                         if (in == NULL) {
   24519           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1018");
   24520           0 :                                 talloc_free(ret); return NULL;
   24521             :                         }
   24522           0 :                         if (in == Py_None) {
   24523           0 :                                 ret->info1018 = NULL;
   24524             :                         } else {
   24525           0 :                                 ret->info1018 = NULL;
   24526           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1018_Type, in, talloc_free(ret); return NULL;);
   24527           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24528           0 :                                         PyErr_NoMemory();
   24529           0 :                                         talloc_free(ret); return NULL;
   24530             :                                 }
   24531           0 :                                 ret->info1018 = (struct srvsvc_NetSrvInfo1018 *)pytalloc_get_ptr(in);
   24532             :                         }
   24533           0 :                         break;
   24534             : 
   24535           0 :                 case 1107:
   24536           0 :                         if (in == NULL) {
   24537           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1107");
   24538           0 :                                 talloc_free(ret); return NULL;
   24539             :                         }
   24540           0 :                         if (in == Py_None) {
   24541           0 :                                 ret->info1107 = NULL;
   24542             :                         } else {
   24543           0 :                                 ret->info1107 = NULL;
   24544           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1107_Type, in, talloc_free(ret); return NULL;);
   24545           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24546           0 :                                         PyErr_NoMemory();
   24547           0 :                                         talloc_free(ret); return NULL;
   24548             :                                 }
   24549           0 :                                 ret->info1107 = (struct srvsvc_NetSrvInfo1107 *)pytalloc_get_ptr(in);
   24550             :                         }
   24551           0 :                         break;
   24552             : 
   24553           0 :                 case 1501:
   24554           0 :                         if (in == NULL) {
   24555           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1501");
   24556           0 :                                 talloc_free(ret); return NULL;
   24557             :                         }
   24558           0 :                         if (in == Py_None) {
   24559           0 :                                 ret->info1501 = NULL;
   24560             :                         } else {
   24561           0 :                                 ret->info1501 = NULL;
   24562           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1501_Type, in, talloc_free(ret); return NULL;);
   24563           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24564           0 :                                         PyErr_NoMemory();
   24565           0 :                                         talloc_free(ret); return NULL;
   24566             :                                 }
   24567           0 :                                 ret->info1501 = (struct srvsvc_NetSrvInfo1501 *)pytalloc_get_ptr(in);
   24568             :                         }
   24569           0 :                         break;
   24570             : 
   24571           0 :                 case 1502:
   24572           0 :                         if (in == NULL) {
   24573           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1502");
   24574           0 :                                 talloc_free(ret); return NULL;
   24575             :                         }
   24576           0 :                         if (in == Py_None) {
   24577           0 :                                 ret->info1502 = NULL;
   24578             :                         } else {
   24579           0 :                                 ret->info1502 = NULL;
   24580           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1502_Type, in, talloc_free(ret); return NULL;);
   24581           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24582           0 :                                         PyErr_NoMemory();
   24583           0 :                                         talloc_free(ret); return NULL;
   24584             :                                 }
   24585           0 :                                 ret->info1502 = (struct srvsvc_NetSrvInfo1502 *)pytalloc_get_ptr(in);
   24586             :                         }
   24587           0 :                         break;
   24588             : 
   24589           0 :                 case 1503:
   24590           0 :                         if (in == NULL) {
   24591           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1503");
   24592           0 :                                 talloc_free(ret); return NULL;
   24593             :                         }
   24594           0 :                         if (in == Py_None) {
   24595           0 :                                 ret->info1503 = NULL;
   24596             :                         } else {
   24597           0 :                                 ret->info1503 = NULL;
   24598           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1503_Type, in, talloc_free(ret); return NULL;);
   24599           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24600           0 :                                         PyErr_NoMemory();
   24601           0 :                                         talloc_free(ret); return NULL;
   24602             :                                 }
   24603           0 :                                 ret->info1503 = (struct srvsvc_NetSrvInfo1503 *)pytalloc_get_ptr(in);
   24604             :                         }
   24605           0 :                         break;
   24606             : 
   24607           0 :                 case 1506:
   24608           0 :                         if (in == NULL) {
   24609           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1506");
   24610           0 :                                 talloc_free(ret); return NULL;
   24611             :                         }
   24612           0 :                         if (in == Py_None) {
   24613           0 :                                 ret->info1506 = NULL;
   24614             :                         } else {
   24615           0 :                                 ret->info1506 = NULL;
   24616           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1506_Type, in, talloc_free(ret); return NULL;);
   24617           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24618           0 :                                         PyErr_NoMemory();
   24619           0 :                                         talloc_free(ret); return NULL;
   24620             :                                 }
   24621           0 :                                 ret->info1506 = (struct srvsvc_NetSrvInfo1506 *)pytalloc_get_ptr(in);
   24622             :                         }
   24623           0 :                         break;
   24624             : 
   24625           0 :                 case 1509:
   24626           0 :                         if (in == NULL) {
   24627           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1509");
   24628           0 :                                 talloc_free(ret); return NULL;
   24629             :                         }
   24630           0 :                         if (in == Py_None) {
   24631           0 :                                 ret->info1509 = NULL;
   24632             :                         } else {
   24633           0 :                                 ret->info1509 = NULL;
   24634           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1509_Type, in, talloc_free(ret); return NULL;);
   24635           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24636           0 :                                         PyErr_NoMemory();
   24637           0 :                                         talloc_free(ret); return NULL;
   24638             :                                 }
   24639           0 :                                 ret->info1509 = (struct srvsvc_NetSrvInfo1509 *)pytalloc_get_ptr(in);
   24640             :                         }
   24641           0 :                         break;
   24642             : 
   24643           0 :                 case 1510:
   24644           0 :                         if (in == NULL) {
   24645           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1510");
   24646           0 :                                 talloc_free(ret); return NULL;
   24647             :                         }
   24648           0 :                         if (in == Py_None) {
   24649           0 :                                 ret->info1510 = NULL;
   24650             :                         } else {
   24651           0 :                                 ret->info1510 = NULL;
   24652           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1510_Type, in, talloc_free(ret); return NULL;);
   24653           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24654           0 :                                         PyErr_NoMemory();
   24655           0 :                                         talloc_free(ret); return NULL;
   24656             :                                 }
   24657           0 :                                 ret->info1510 = (struct srvsvc_NetSrvInfo1510 *)pytalloc_get_ptr(in);
   24658             :                         }
   24659           0 :                         break;
   24660             : 
   24661           0 :                 case 1511:
   24662           0 :                         if (in == NULL) {
   24663           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1511");
   24664           0 :                                 talloc_free(ret); return NULL;
   24665             :                         }
   24666           0 :                         if (in == Py_None) {
   24667           0 :                                 ret->info1511 = NULL;
   24668             :                         } else {
   24669           0 :                                 ret->info1511 = NULL;
   24670           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1511_Type, in, talloc_free(ret); return NULL;);
   24671           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24672           0 :                                         PyErr_NoMemory();
   24673           0 :                                         talloc_free(ret); return NULL;
   24674             :                                 }
   24675           0 :                                 ret->info1511 = (struct srvsvc_NetSrvInfo1511 *)pytalloc_get_ptr(in);
   24676             :                         }
   24677           0 :                         break;
   24678             : 
   24679           0 :                 case 1512:
   24680           0 :                         if (in == NULL) {
   24681           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1512");
   24682           0 :                                 talloc_free(ret); return NULL;
   24683             :                         }
   24684           0 :                         if (in == Py_None) {
   24685           0 :                                 ret->info1512 = NULL;
   24686             :                         } else {
   24687           0 :                                 ret->info1512 = NULL;
   24688           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1512_Type, in, talloc_free(ret); return NULL;);
   24689           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24690           0 :                                         PyErr_NoMemory();
   24691           0 :                                         talloc_free(ret); return NULL;
   24692             :                                 }
   24693           0 :                                 ret->info1512 = (struct srvsvc_NetSrvInfo1512 *)pytalloc_get_ptr(in);
   24694             :                         }
   24695           0 :                         break;
   24696             : 
   24697           0 :                 case 1513:
   24698           0 :                         if (in == NULL) {
   24699           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1513");
   24700           0 :                                 talloc_free(ret); return NULL;
   24701             :                         }
   24702           0 :                         if (in == Py_None) {
   24703           0 :                                 ret->info1513 = NULL;
   24704             :                         } else {
   24705           0 :                                 ret->info1513 = NULL;
   24706           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1513_Type, in, talloc_free(ret); return NULL;);
   24707           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24708           0 :                                         PyErr_NoMemory();
   24709           0 :                                         talloc_free(ret); return NULL;
   24710             :                                 }
   24711           0 :                                 ret->info1513 = (struct srvsvc_NetSrvInfo1513 *)pytalloc_get_ptr(in);
   24712             :                         }
   24713           0 :                         break;
   24714             : 
   24715           0 :                 case 1514:
   24716           0 :                         if (in == NULL) {
   24717           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1514");
   24718           0 :                                 talloc_free(ret); return NULL;
   24719             :                         }
   24720           0 :                         if (in == Py_None) {
   24721           0 :                                 ret->info1514 = NULL;
   24722             :                         } else {
   24723           0 :                                 ret->info1514 = NULL;
   24724           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1514_Type, in, talloc_free(ret); return NULL;);
   24725           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24726           0 :                                         PyErr_NoMemory();
   24727           0 :                                         talloc_free(ret); return NULL;
   24728             :                                 }
   24729           0 :                                 ret->info1514 = (struct srvsvc_NetSrvInfo1514 *)pytalloc_get_ptr(in);
   24730             :                         }
   24731           0 :                         break;
   24732             : 
   24733           0 :                 case 1515:
   24734           0 :                         if (in == NULL) {
   24735           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1515");
   24736           0 :                                 talloc_free(ret); return NULL;
   24737             :                         }
   24738           0 :                         if (in == Py_None) {
   24739           0 :                                 ret->info1515 = NULL;
   24740             :                         } else {
   24741           0 :                                 ret->info1515 = NULL;
   24742           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1515_Type, in, talloc_free(ret); return NULL;);
   24743           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24744           0 :                                         PyErr_NoMemory();
   24745           0 :                                         talloc_free(ret); return NULL;
   24746             :                                 }
   24747           0 :                                 ret->info1515 = (struct srvsvc_NetSrvInfo1515 *)pytalloc_get_ptr(in);
   24748             :                         }
   24749           0 :                         break;
   24750             : 
   24751           0 :                 case 1516:
   24752           0 :                         if (in == NULL) {
   24753           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1516");
   24754           0 :                                 talloc_free(ret); return NULL;
   24755             :                         }
   24756           0 :                         if (in == Py_None) {
   24757           0 :                                 ret->info1516 = NULL;
   24758             :                         } else {
   24759           0 :                                 ret->info1516 = NULL;
   24760           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1516_Type, in, talloc_free(ret); return NULL;);
   24761           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24762           0 :                                         PyErr_NoMemory();
   24763           0 :                                         talloc_free(ret); return NULL;
   24764             :                                 }
   24765           0 :                                 ret->info1516 = (struct srvsvc_NetSrvInfo1516 *)pytalloc_get_ptr(in);
   24766             :                         }
   24767           0 :                         break;
   24768             : 
   24769           0 :                 case 1518:
   24770           0 :                         if (in == NULL) {
   24771           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1518");
   24772           0 :                                 talloc_free(ret); return NULL;
   24773             :                         }
   24774           0 :                         if (in == Py_None) {
   24775           0 :                                 ret->info1518 = NULL;
   24776             :                         } else {
   24777           0 :                                 ret->info1518 = NULL;
   24778           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1518_Type, in, talloc_free(ret); return NULL;);
   24779           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24780           0 :                                         PyErr_NoMemory();
   24781           0 :                                         talloc_free(ret); return NULL;
   24782             :                                 }
   24783           0 :                                 ret->info1518 = (struct srvsvc_NetSrvInfo1518 *)pytalloc_get_ptr(in);
   24784             :                         }
   24785           0 :                         break;
   24786             : 
   24787           0 :                 case 1520:
   24788           0 :                         if (in == NULL) {
   24789           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1520");
   24790           0 :                                 talloc_free(ret); return NULL;
   24791             :                         }
   24792           0 :                         if (in == Py_None) {
   24793           0 :                                 ret->info1520 = NULL;
   24794             :                         } else {
   24795           0 :                                 ret->info1520 = NULL;
   24796           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1520_Type, in, talloc_free(ret); return NULL;);
   24797           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24798           0 :                                         PyErr_NoMemory();
   24799           0 :                                         talloc_free(ret); return NULL;
   24800             :                                 }
   24801           0 :                                 ret->info1520 = (struct srvsvc_NetSrvInfo1520 *)pytalloc_get_ptr(in);
   24802             :                         }
   24803           0 :                         break;
   24804             : 
   24805           0 :                 case 1521:
   24806           0 :                         if (in == NULL) {
   24807           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1521");
   24808           0 :                                 talloc_free(ret); return NULL;
   24809             :                         }
   24810           0 :                         if (in == Py_None) {
   24811           0 :                                 ret->info1521 = NULL;
   24812             :                         } else {
   24813           0 :                                 ret->info1521 = NULL;
   24814           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1521_Type, in, talloc_free(ret); return NULL;);
   24815           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24816           0 :                                         PyErr_NoMemory();
   24817           0 :                                         talloc_free(ret); return NULL;
   24818             :                                 }
   24819           0 :                                 ret->info1521 = (struct srvsvc_NetSrvInfo1521 *)pytalloc_get_ptr(in);
   24820             :                         }
   24821           0 :                         break;
   24822             : 
   24823           0 :                 case 1522:
   24824           0 :                         if (in == NULL) {
   24825           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1522");
   24826           0 :                                 talloc_free(ret); return NULL;
   24827             :                         }
   24828           0 :                         if (in == Py_None) {
   24829           0 :                                 ret->info1522 = NULL;
   24830             :                         } else {
   24831           0 :                                 ret->info1522 = NULL;
   24832           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1522_Type, in, talloc_free(ret); return NULL;);
   24833           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24834           0 :                                         PyErr_NoMemory();
   24835           0 :                                         talloc_free(ret); return NULL;
   24836             :                                 }
   24837           0 :                                 ret->info1522 = (struct srvsvc_NetSrvInfo1522 *)pytalloc_get_ptr(in);
   24838             :                         }
   24839           0 :                         break;
   24840             : 
   24841           0 :                 case 1523:
   24842           0 :                         if (in == NULL) {
   24843           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1523");
   24844           0 :                                 talloc_free(ret); return NULL;
   24845             :                         }
   24846           0 :                         if (in == Py_None) {
   24847           0 :                                 ret->info1523 = NULL;
   24848             :                         } else {
   24849           0 :                                 ret->info1523 = NULL;
   24850           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1523_Type, in, talloc_free(ret); return NULL;);
   24851           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24852           0 :                                         PyErr_NoMemory();
   24853           0 :                                         talloc_free(ret); return NULL;
   24854             :                                 }
   24855           0 :                                 ret->info1523 = (struct srvsvc_NetSrvInfo1523 *)pytalloc_get_ptr(in);
   24856             :                         }
   24857           0 :                         break;
   24858             : 
   24859           0 :                 case 1524:
   24860           0 :                         if (in == NULL) {
   24861           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1524");
   24862           0 :                                 talloc_free(ret); return NULL;
   24863             :                         }
   24864           0 :                         if (in == Py_None) {
   24865           0 :                                 ret->info1524 = NULL;
   24866             :                         } else {
   24867           0 :                                 ret->info1524 = NULL;
   24868           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1524_Type, in, talloc_free(ret); return NULL;);
   24869           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24870           0 :                                         PyErr_NoMemory();
   24871           0 :                                         talloc_free(ret); return NULL;
   24872             :                                 }
   24873           0 :                                 ret->info1524 = (struct srvsvc_NetSrvInfo1524 *)pytalloc_get_ptr(in);
   24874             :                         }
   24875           0 :                         break;
   24876             : 
   24877           0 :                 case 1525:
   24878           0 :                         if (in == NULL) {
   24879           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1525");
   24880           0 :                                 talloc_free(ret); return NULL;
   24881             :                         }
   24882           0 :                         if (in == Py_None) {
   24883           0 :                                 ret->info1525 = NULL;
   24884             :                         } else {
   24885           0 :                                 ret->info1525 = NULL;
   24886           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1525_Type, in, talloc_free(ret); return NULL;);
   24887           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24888           0 :                                         PyErr_NoMemory();
   24889           0 :                                         talloc_free(ret); return NULL;
   24890             :                                 }
   24891           0 :                                 ret->info1525 = (struct srvsvc_NetSrvInfo1525 *)pytalloc_get_ptr(in);
   24892             :                         }
   24893           0 :                         break;
   24894             : 
   24895           0 :                 case 1528:
   24896           0 :                         if (in == NULL) {
   24897           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1528");
   24898           0 :                                 talloc_free(ret); return NULL;
   24899             :                         }
   24900           0 :                         if (in == Py_None) {
   24901           0 :                                 ret->info1528 = NULL;
   24902             :                         } else {
   24903           0 :                                 ret->info1528 = NULL;
   24904           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1528_Type, in, talloc_free(ret); return NULL;);
   24905           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24906           0 :                                         PyErr_NoMemory();
   24907           0 :                                         talloc_free(ret); return NULL;
   24908             :                                 }
   24909           0 :                                 ret->info1528 = (struct srvsvc_NetSrvInfo1528 *)pytalloc_get_ptr(in);
   24910             :                         }
   24911           0 :                         break;
   24912             : 
   24913           0 :                 case 1529:
   24914           0 :                         if (in == NULL) {
   24915           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1529");
   24916           0 :                                 talloc_free(ret); return NULL;
   24917             :                         }
   24918           0 :                         if (in == Py_None) {
   24919           0 :                                 ret->info1529 = NULL;
   24920             :                         } else {
   24921           0 :                                 ret->info1529 = NULL;
   24922           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1529_Type, in, talloc_free(ret); return NULL;);
   24923           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24924           0 :                                         PyErr_NoMemory();
   24925           0 :                                         talloc_free(ret); return NULL;
   24926             :                                 }
   24927           0 :                                 ret->info1529 = (struct srvsvc_NetSrvInfo1529 *)pytalloc_get_ptr(in);
   24928             :                         }
   24929           0 :                         break;
   24930             : 
   24931           0 :                 case 1530:
   24932           0 :                         if (in == NULL) {
   24933           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1530");
   24934           0 :                                 talloc_free(ret); return NULL;
   24935             :                         }
   24936           0 :                         if (in == Py_None) {
   24937           0 :                                 ret->info1530 = NULL;
   24938             :                         } else {
   24939           0 :                                 ret->info1530 = NULL;
   24940           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1530_Type, in, talloc_free(ret); return NULL;);
   24941           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24942           0 :                                         PyErr_NoMemory();
   24943           0 :                                         talloc_free(ret); return NULL;
   24944             :                                 }
   24945           0 :                                 ret->info1530 = (struct srvsvc_NetSrvInfo1530 *)pytalloc_get_ptr(in);
   24946             :                         }
   24947           0 :                         break;
   24948             : 
   24949           0 :                 case 1533:
   24950           0 :                         if (in == NULL) {
   24951           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1533");
   24952           0 :                                 talloc_free(ret); return NULL;
   24953             :                         }
   24954           0 :                         if (in == Py_None) {
   24955           0 :                                 ret->info1533 = NULL;
   24956             :                         } else {
   24957           0 :                                 ret->info1533 = NULL;
   24958           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1533_Type, in, talloc_free(ret); return NULL;);
   24959           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24960           0 :                                         PyErr_NoMemory();
   24961           0 :                                         talloc_free(ret); return NULL;
   24962             :                                 }
   24963           0 :                                 ret->info1533 = (struct srvsvc_NetSrvInfo1533 *)pytalloc_get_ptr(in);
   24964             :                         }
   24965           0 :                         break;
   24966             : 
   24967           0 :                 case 1534:
   24968           0 :                         if (in == NULL) {
   24969           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1534");
   24970           0 :                                 talloc_free(ret); return NULL;
   24971             :                         }
   24972           0 :                         if (in == Py_None) {
   24973           0 :                                 ret->info1534 = NULL;
   24974             :                         } else {
   24975           0 :                                 ret->info1534 = NULL;
   24976           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1534_Type, in, talloc_free(ret); return NULL;);
   24977           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24978           0 :                                         PyErr_NoMemory();
   24979           0 :                                         talloc_free(ret); return NULL;
   24980             :                                 }
   24981           0 :                                 ret->info1534 = (struct srvsvc_NetSrvInfo1534 *)pytalloc_get_ptr(in);
   24982             :                         }
   24983           0 :                         break;
   24984             : 
   24985           0 :                 case 1535:
   24986           0 :                         if (in == NULL) {
   24987           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1535");
   24988           0 :                                 talloc_free(ret); return NULL;
   24989             :                         }
   24990           0 :                         if (in == Py_None) {
   24991           0 :                                 ret->info1535 = NULL;
   24992             :                         } else {
   24993           0 :                                 ret->info1535 = NULL;
   24994           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1535_Type, in, talloc_free(ret); return NULL;);
   24995           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24996           0 :                                         PyErr_NoMemory();
   24997           0 :                                         talloc_free(ret); return NULL;
   24998             :                                 }
   24999           0 :                                 ret->info1535 = (struct srvsvc_NetSrvInfo1535 *)pytalloc_get_ptr(in);
   25000             :                         }
   25001           0 :                         break;
   25002             : 
   25003           0 :                 case 1536:
   25004           0 :                         if (in == NULL) {
   25005           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1536");
   25006           0 :                                 talloc_free(ret); return NULL;
   25007             :                         }
   25008           0 :                         if (in == Py_None) {
   25009           0 :                                 ret->info1536 = NULL;
   25010             :                         } else {
   25011           0 :                                 ret->info1536 = NULL;
   25012           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1536_Type, in, talloc_free(ret); return NULL;);
   25013           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25014           0 :                                         PyErr_NoMemory();
   25015           0 :                                         talloc_free(ret); return NULL;
   25016             :                                 }
   25017           0 :                                 ret->info1536 = (struct srvsvc_NetSrvInfo1536 *)pytalloc_get_ptr(in);
   25018             :                         }
   25019           0 :                         break;
   25020             : 
   25021           0 :                 case 1537:
   25022           0 :                         if (in == NULL) {
   25023           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1537");
   25024           0 :                                 talloc_free(ret); return NULL;
   25025             :                         }
   25026           0 :                         if (in == Py_None) {
   25027           0 :                                 ret->info1537 = NULL;
   25028             :                         } else {
   25029           0 :                                 ret->info1537 = NULL;
   25030           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1537_Type, in, talloc_free(ret); return NULL;);
   25031           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25032           0 :                                         PyErr_NoMemory();
   25033           0 :                                         talloc_free(ret); return NULL;
   25034             :                                 }
   25035           0 :                                 ret->info1537 = (struct srvsvc_NetSrvInfo1537 *)pytalloc_get_ptr(in);
   25036             :                         }
   25037           0 :                         break;
   25038             : 
   25039           0 :                 case 1538:
   25040           0 :                         if (in == NULL) {
   25041           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1538");
   25042           0 :                                 talloc_free(ret); return NULL;
   25043             :                         }
   25044           0 :                         if (in == Py_None) {
   25045           0 :                                 ret->info1538 = NULL;
   25046             :                         } else {
   25047           0 :                                 ret->info1538 = NULL;
   25048           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1538_Type, in, talloc_free(ret); return NULL;);
   25049           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25050           0 :                                         PyErr_NoMemory();
   25051           0 :                                         talloc_free(ret); return NULL;
   25052             :                                 }
   25053           0 :                                 ret->info1538 = (struct srvsvc_NetSrvInfo1538 *)pytalloc_get_ptr(in);
   25054             :                         }
   25055           0 :                         break;
   25056             : 
   25057           0 :                 case 1539:
   25058           0 :                         if (in == NULL) {
   25059           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1539");
   25060           0 :                                 talloc_free(ret); return NULL;
   25061             :                         }
   25062           0 :                         if (in == Py_None) {
   25063           0 :                                 ret->info1539 = NULL;
   25064             :                         } else {
   25065           0 :                                 ret->info1539 = NULL;
   25066           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1539_Type, in, talloc_free(ret); return NULL;);
   25067           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25068           0 :                                         PyErr_NoMemory();
   25069           0 :                                         talloc_free(ret); return NULL;
   25070             :                                 }
   25071           0 :                                 ret->info1539 = (struct srvsvc_NetSrvInfo1539 *)pytalloc_get_ptr(in);
   25072             :                         }
   25073           0 :                         break;
   25074             : 
   25075           0 :                 case 1540:
   25076           0 :                         if (in == NULL) {
   25077           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1540");
   25078           0 :                                 talloc_free(ret); return NULL;
   25079             :                         }
   25080           0 :                         if (in == Py_None) {
   25081           0 :                                 ret->info1540 = NULL;
   25082             :                         } else {
   25083           0 :                                 ret->info1540 = NULL;
   25084           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1540_Type, in, talloc_free(ret); return NULL;);
   25085           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25086           0 :                                         PyErr_NoMemory();
   25087           0 :                                         talloc_free(ret); return NULL;
   25088             :                                 }
   25089           0 :                                 ret->info1540 = (struct srvsvc_NetSrvInfo1540 *)pytalloc_get_ptr(in);
   25090             :                         }
   25091           0 :                         break;
   25092             : 
   25093           0 :                 case 1541:
   25094           0 :                         if (in == NULL) {
   25095           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1541");
   25096           0 :                                 talloc_free(ret); return NULL;
   25097             :                         }
   25098           0 :                         if (in == Py_None) {
   25099           0 :                                 ret->info1541 = NULL;
   25100             :                         } else {
   25101           0 :                                 ret->info1541 = NULL;
   25102           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1541_Type, in, talloc_free(ret); return NULL;);
   25103           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25104           0 :                                         PyErr_NoMemory();
   25105           0 :                                         talloc_free(ret); return NULL;
   25106             :                                 }
   25107           0 :                                 ret->info1541 = (struct srvsvc_NetSrvInfo1541 *)pytalloc_get_ptr(in);
   25108             :                         }
   25109           0 :                         break;
   25110             : 
   25111           0 :                 case 1542:
   25112           0 :                         if (in == NULL) {
   25113           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1542");
   25114           0 :                                 talloc_free(ret); return NULL;
   25115             :                         }
   25116           0 :                         if (in == Py_None) {
   25117           0 :                                 ret->info1542 = NULL;
   25118             :                         } else {
   25119           0 :                                 ret->info1542 = NULL;
   25120           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1542_Type, in, talloc_free(ret); return NULL;);
   25121           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25122           0 :                                         PyErr_NoMemory();
   25123           0 :                                         talloc_free(ret); return NULL;
   25124             :                                 }
   25125           0 :                                 ret->info1542 = (struct srvsvc_NetSrvInfo1542 *)pytalloc_get_ptr(in);
   25126             :                         }
   25127           0 :                         break;
   25128             : 
   25129           0 :                 case 1543:
   25130           0 :                         if (in == NULL) {
   25131           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1543");
   25132           0 :                                 talloc_free(ret); return NULL;
   25133             :                         }
   25134           0 :                         if (in == Py_None) {
   25135           0 :                                 ret->info1543 = NULL;
   25136             :                         } else {
   25137           0 :                                 ret->info1543 = NULL;
   25138           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1543_Type, in, talloc_free(ret); return NULL;);
   25139           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25140           0 :                                         PyErr_NoMemory();
   25141           0 :                                         talloc_free(ret); return NULL;
   25142             :                                 }
   25143           0 :                                 ret->info1543 = (struct srvsvc_NetSrvInfo1543 *)pytalloc_get_ptr(in);
   25144             :                         }
   25145           0 :                         break;
   25146             : 
   25147           0 :                 case 1544:
   25148           0 :                         if (in == NULL) {
   25149           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1544");
   25150           0 :                                 talloc_free(ret); return NULL;
   25151             :                         }
   25152           0 :                         if (in == Py_None) {
   25153           0 :                                 ret->info1544 = NULL;
   25154             :                         } else {
   25155           0 :                                 ret->info1544 = NULL;
   25156           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1544_Type, in, talloc_free(ret); return NULL;);
   25157           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25158           0 :                                         PyErr_NoMemory();
   25159           0 :                                         talloc_free(ret); return NULL;
   25160             :                                 }
   25161           0 :                                 ret->info1544 = (struct srvsvc_NetSrvInfo1544 *)pytalloc_get_ptr(in);
   25162             :                         }
   25163           0 :                         break;
   25164             : 
   25165           0 :                 case 1545:
   25166           0 :                         if (in == NULL) {
   25167           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1545");
   25168           0 :                                 talloc_free(ret); return NULL;
   25169             :                         }
   25170           0 :                         if (in == Py_None) {
   25171           0 :                                 ret->info1545 = NULL;
   25172             :                         } else {
   25173           0 :                                 ret->info1545 = NULL;
   25174           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1545_Type, in, talloc_free(ret); return NULL;);
   25175           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25176           0 :                                         PyErr_NoMemory();
   25177           0 :                                         talloc_free(ret); return NULL;
   25178             :                                 }
   25179           0 :                                 ret->info1545 = (struct srvsvc_NetSrvInfo1545 *)pytalloc_get_ptr(in);
   25180             :                         }
   25181           0 :                         break;
   25182             : 
   25183           0 :                 case 1546:
   25184           0 :                         if (in == NULL) {
   25185           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1546");
   25186           0 :                                 talloc_free(ret); return NULL;
   25187             :                         }
   25188           0 :                         if (in == Py_None) {
   25189           0 :                                 ret->info1546 = NULL;
   25190             :                         } else {
   25191           0 :                                 ret->info1546 = NULL;
   25192           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1546_Type, in, talloc_free(ret); return NULL;);
   25193           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25194           0 :                                         PyErr_NoMemory();
   25195           0 :                                         talloc_free(ret); return NULL;
   25196             :                                 }
   25197           0 :                                 ret->info1546 = (struct srvsvc_NetSrvInfo1546 *)pytalloc_get_ptr(in);
   25198             :                         }
   25199           0 :                         break;
   25200             : 
   25201           0 :                 case 1547:
   25202           0 :                         if (in == NULL) {
   25203           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1547");
   25204           0 :                                 talloc_free(ret); return NULL;
   25205             :                         }
   25206           0 :                         if (in == Py_None) {
   25207           0 :                                 ret->info1547 = NULL;
   25208             :                         } else {
   25209           0 :                                 ret->info1547 = NULL;
   25210           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1547_Type, in, talloc_free(ret); return NULL;);
   25211           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25212           0 :                                         PyErr_NoMemory();
   25213           0 :                                         talloc_free(ret); return NULL;
   25214             :                                 }
   25215           0 :                                 ret->info1547 = (struct srvsvc_NetSrvInfo1547 *)pytalloc_get_ptr(in);
   25216             :                         }
   25217           0 :                         break;
   25218             : 
   25219           0 :                 case 1548:
   25220           0 :                         if (in == NULL) {
   25221           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1548");
   25222           0 :                                 talloc_free(ret); return NULL;
   25223             :                         }
   25224           0 :                         if (in == Py_None) {
   25225           0 :                                 ret->info1548 = NULL;
   25226             :                         } else {
   25227           0 :                                 ret->info1548 = NULL;
   25228           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1548_Type, in, talloc_free(ret); return NULL;);
   25229           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25230           0 :                                         PyErr_NoMemory();
   25231           0 :                                         talloc_free(ret); return NULL;
   25232             :                                 }
   25233           0 :                                 ret->info1548 = (struct srvsvc_NetSrvInfo1548 *)pytalloc_get_ptr(in);
   25234             :                         }
   25235           0 :                         break;
   25236             : 
   25237           0 :                 case 1549:
   25238           0 :                         if (in == NULL) {
   25239           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1549");
   25240           0 :                                 talloc_free(ret); return NULL;
   25241             :                         }
   25242           0 :                         if (in == Py_None) {
   25243           0 :                                 ret->info1549 = NULL;
   25244             :                         } else {
   25245           0 :                                 ret->info1549 = NULL;
   25246           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1549_Type, in, talloc_free(ret); return NULL;);
   25247           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25248           0 :                                         PyErr_NoMemory();
   25249           0 :                                         talloc_free(ret); return NULL;
   25250             :                                 }
   25251           0 :                                 ret->info1549 = (struct srvsvc_NetSrvInfo1549 *)pytalloc_get_ptr(in);
   25252             :                         }
   25253           0 :                         break;
   25254             : 
   25255           0 :                 case 1550:
   25256           0 :                         if (in == NULL) {
   25257           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1550");
   25258           0 :                                 talloc_free(ret); return NULL;
   25259             :                         }
   25260           0 :                         if (in == Py_None) {
   25261           0 :                                 ret->info1550 = NULL;
   25262             :                         } else {
   25263           0 :                                 ret->info1550 = NULL;
   25264           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1550_Type, in, talloc_free(ret); return NULL;);
   25265           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25266           0 :                                         PyErr_NoMemory();
   25267           0 :                                         talloc_free(ret); return NULL;
   25268             :                                 }
   25269           0 :                                 ret->info1550 = (struct srvsvc_NetSrvInfo1550 *)pytalloc_get_ptr(in);
   25270             :                         }
   25271           0 :                         break;
   25272             : 
   25273           0 :                 case 1552:
   25274           0 :                         if (in == NULL) {
   25275           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1552");
   25276           0 :                                 talloc_free(ret); return NULL;
   25277             :                         }
   25278           0 :                         if (in == Py_None) {
   25279           0 :                                 ret->info1552 = NULL;
   25280             :                         } else {
   25281           0 :                                 ret->info1552 = NULL;
   25282           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1552_Type, in, talloc_free(ret); return NULL;);
   25283           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25284           0 :                                         PyErr_NoMemory();
   25285           0 :                                         talloc_free(ret); return NULL;
   25286             :                                 }
   25287           0 :                                 ret->info1552 = (struct srvsvc_NetSrvInfo1552 *)pytalloc_get_ptr(in);
   25288             :                         }
   25289           0 :                         break;
   25290             : 
   25291           0 :                 case 1553:
   25292           0 :                         if (in == NULL) {
   25293           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1553");
   25294           0 :                                 talloc_free(ret); return NULL;
   25295             :                         }
   25296           0 :                         if (in == Py_None) {
   25297           0 :                                 ret->info1553 = NULL;
   25298             :                         } else {
   25299           0 :                                 ret->info1553 = NULL;
   25300           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1553_Type, in, talloc_free(ret); return NULL;);
   25301           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25302           0 :                                         PyErr_NoMemory();
   25303           0 :                                         talloc_free(ret); return NULL;
   25304             :                                 }
   25305           0 :                                 ret->info1553 = (struct srvsvc_NetSrvInfo1553 *)pytalloc_get_ptr(in);
   25306             :                         }
   25307           0 :                         break;
   25308             : 
   25309           0 :                 case 1554:
   25310           0 :                         if (in == NULL) {
   25311           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1554");
   25312           0 :                                 talloc_free(ret); return NULL;
   25313             :                         }
   25314           0 :                         if (in == Py_None) {
   25315           0 :                                 ret->info1554 = NULL;
   25316             :                         } else {
   25317           0 :                                 ret->info1554 = NULL;
   25318           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1554_Type, in, talloc_free(ret); return NULL;);
   25319           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25320           0 :                                         PyErr_NoMemory();
   25321           0 :                                         talloc_free(ret); return NULL;
   25322             :                                 }
   25323           0 :                                 ret->info1554 = (struct srvsvc_NetSrvInfo1554 *)pytalloc_get_ptr(in);
   25324             :                         }
   25325           0 :                         break;
   25326             : 
   25327           0 :                 case 1555:
   25328           0 :                         if (in == NULL) {
   25329           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1555");
   25330           0 :                                 talloc_free(ret); return NULL;
   25331             :                         }
   25332           0 :                         if (in == Py_None) {
   25333           0 :                                 ret->info1555 = NULL;
   25334             :                         } else {
   25335           0 :                                 ret->info1555 = NULL;
   25336           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1555_Type, in, talloc_free(ret); return NULL;);
   25337           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25338           0 :                                         PyErr_NoMemory();
   25339           0 :                                         talloc_free(ret); return NULL;
   25340             :                                 }
   25341           0 :                                 ret->info1555 = (struct srvsvc_NetSrvInfo1555 *)pytalloc_get_ptr(in);
   25342             :                         }
   25343           0 :                         break;
   25344             : 
   25345           0 :                 case 1556:
   25346           0 :                         if (in == NULL) {
   25347           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1556");
   25348           0 :                                 talloc_free(ret); return NULL;
   25349             :                         }
   25350           0 :                         if (in == Py_None) {
   25351           0 :                                 ret->info1556 = NULL;
   25352             :                         } else {
   25353           0 :                                 ret->info1556 = NULL;
   25354           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1556_Type, in, talloc_free(ret); return NULL;);
   25355           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25356           0 :                                         PyErr_NoMemory();
   25357           0 :                                         talloc_free(ret); return NULL;
   25358             :                                 }
   25359           0 :                                 ret->info1556 = (struct srvsvc_NetSrvInfo1556 *)pytalloc_get_ptr(in);
   25360             :                         }
   25361           0 :                         break;
   25362             : 
   25363           0 :                 default:
   25364           0 :                         break;
   25365             : 
   25366             :         }
   25367             : 
   25368           0 :         return ret;
   25369             : }
   25370             : 
   25371           1 : static PyObject *py_srvsvc_NetSrvInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25372             : {
   25373           1 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   25374           1 :         PyObject *mem_ctx_obj = NULL;
   25375           1 :         TALLOC_CTX *mem_ctx = NULL;
   25376           1 :         int level = 0;
   25377           1 :         PyObject *in_obj = NULL;
   25378           1 :         union srvsvc_NetSrvInfo *in = NULL;
   25379             : 
   25380           1 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   25381             :                 discard_const_p(char *, kwnames),
   25382             :                 &mem_ctx_obj,
   25383             :                 &level,
   25384             :                 &in_obj)) {
   25385           0 :                 return NULL;
   25386             :         }
   25387           1 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   25388           1 :         if (mem_ctx == NULL) {
   25389           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   25390           0 :                 return NULL;
   25391             :         }
   25392           1 :         in = (union srvsvc_NetSrvInfo *)pytalloc_get_ptr(in_obj);
   25393           1 :         if (in == NULL) {
   25394           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetSrvInfo!");
   25395           0 :                 return NULL;
   25396             :         }
   25397             : 
   25398           1 :         return py_import_srvsvc_NetSrvInfo(mem_ctx, level, in);
   25399             : }
   25400             : 
   25401           0 : static PyObject *py_srvsvc_NetSrvInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25402             : {
   25403           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   25404           0 :         PyObject *mem_ctx_obj = NULL;
   25405           0 :         TALLOC_CTX *mem_ctx = NULL;
   25406           0 :         int level = 0;
   25407           0 :         PyObject *in = NULL;
   25408           0 :         union srvsvc_NetSrvInfo *out = NULL;
   25409             : 
   25410           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   25411             :                 discard_const_p(char *, kwnames),
   25412             :                 &mem_ctx_obj,
   25413             :                 &level,
   25414             :                 &in)) {
   25415           0 :                 return NULL;
   25416             :         }
   25417           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   25418           0 :         if (mem_ctx == NULL) {
   25419           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   25420           0 :                 return NULL;
   25421             :         }
   25422             : 
   25423           0 :         out = py_export_srvsvc_NetSrvInfo(mem_ctx, level, in);
   25424           0 :         if (out == NULL) {
   25425           0 :                 return NULL;
   25426             :         }
   25427             : 
   25428           0 :         return pytalloc_GenericObject_reference(out);
   25429             : }
   25430             : 
   25431             : static PyMethodDef py_srvsvc_NetSrvInfo_methods[] = {
   25432             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvInfo_import),
   25433             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   25434             :                 "T.__import__(mem_ctx, level, in) => ret." },
   25435             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvInfo_export),
   25436             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   25437             :                 "T.__export__(mem_ctx, level, in) => ret." },
   25438             :         { NULL, NULL, 0, NULL }
   25439             : };
   25440             : 
   25441           0 : static PyObject *py_srvsvc_NetSrvInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25442             : {
   25443           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   25444           0 :         return NULL;
   25445             : }
   25446             : 
   25447             : 
   25448             : static PyTypeObject srvsvc_NetSrvInfo_Type = {
   25449             :         PyVarObject_HEAD_INIT(NULL, 0)
   25450             :         .tp_name = "srvsvc.NetSrvInfo",
   25451             :         .tp_getset = NULL,
   25452             :         .tp_methods = py_srvsvc_NetSrvInfo_methods,
   25453             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25454             :         .tp_new = py_srvsvc_NetSrvInfo_new,
   25455             : };
   25456             : 
   25457             : 
   25458           0 : static PyObject *py_srvsvc_NetDiskInfo0_get___disk_offset(PyObject *obj, void *closure)
   25459             : {
   25460           0 :         struct srvsvc_NetDiskInfo0 *object = pytalloc_get_ptr(obj);
   25461           0 :         PyObject *py___disk_offset;
   25462           0 :         py___disk_offset = PyLong_FromUnsignedLongLong((uint32_t)(object->__disk_offset));
   25463           0 :         return py___disk_offset;
   25464             : }
   25465             : 
   25466           0 : static int py_srvsvc_NetDiskInfo0_set___disk_offset(PyObject *py_obj, PyObject *value, void *closure)
   25467             : {
   25468           0 :         struct srvsvc_NetDiskInfo0 *object = pytalloc_get_ptr(py_obj);
   25469           0 :         if (value == NULL) {
   25470           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->__disk_offset");
   25471           0 :                 return -1;
   25472             :         }
   25473             :         {
   25474           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__disk_offset));
   25475           0 :                 if (PyLong_Check(value)) {
   25476           0 :                         unsigned long long test_var;
   25477           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25478           0 :                         if (PyErr_Occurred() != NULL) {
   25479           0 :                                 return -1;
   25480             :                         }
   25481           0 :                         if (test_var > uint_max) {
   25482           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25483             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25484           0 :                                 return -1;
   25485             :                         }
   25486           0 :                         object->__disk_offset = test_var;
   25487             :                 } else {
   25488           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25489             :                           PyLong_Type.tp_name);
   25490           0 :                         return -1;
   25491             :                 }
   25492             :         }
   25493           0 :         return 0;
   25494             : }
   25495             : 
   25496           0 : static PyObject *py_srvsvc_NetDiskInfo0_get___disk_length(PyObject *obj, void *closure)
   25497             : {
   25498           0 :         struct srvsvc_NetDiskInfo0 *object = pytalloc_get_ptr(obj);
   25499           0 :         PyObject *py___disk_length;
   25500           0 :         py___disk_length = PyLong_FromUnsignedLongLong((uint32_t)(object->__disk_length));
   25501           0 :         return py___disk_length;
   25502             : }
   25503             : 
   25504           0 : static int py_srvsvc_NetDiskInfo0_set___disk_length(PyObject *py_obj, PyObject *value, void *closure)
   25505             : {
   25506           0 :         struct srvsvc_NetDiskInfo0 *object = pytalloc_get_ptr(py_obj);
   25507           0 :         if (value == NULL) {
   25508           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->__disk_length");
   25509           0 :                 return -1;
   25510             :         }
   25511             :         {
   25512           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__disk_length));
   25513           0 :                 if (PyLong_Check(value)) {
   25514           0 :                         unsigned long long test_var;
   25515           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25516           0 :                         if (PyErr_Occurred() != NULL) {
   25517           0 :                                 return -1;
   25518             :                         }
   25519           0 :                         if (test_var > uint_max) {
   25520           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25521             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25522           0 :                                 return -1;
   25523             :                         }
   25524           0 :                         object->__disk_length = test_var;
   25525             :                 } else {
   25526           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25527             :                           PyLong_Type.tp_name);
   25528           0 :                         return -1;
   25529             :                 }
   25530             :         }
   25531           0 :         return 0;
   25532             : }
   25533             : 
   25534           0 : static PyObject *py_srvsvc_NetDiskInfo0_get_disk(PyObject *obj, void *closure)
   25535             : {
   25536           0 :         struct srvsvc_NetDiskInfo0 *object = pytalloc_get_ptr(obj);
   25537           0 :         PyObject *py_disk;
   25538           0 :         if (object->disk == NULL) {
   25539           0 :                 py_disk = Py_None;
   25540           0 :                 Py_INCREF(py_disk);
   25541             :         } else {
   25542           0 :                 py_disk = PyUnicode_Decode(object->disk, strlen(object->disk), "utf-8", "ignore");
   25543             :         }
   25544           0 :         return py_disk;
   25545             : }
   25546             : 
   25547           0 : static int py_srvsvc_NetDiskInfo0_set_disk(PyObject *py_obj, PyObject *value, void *closure)
   25548             : {
   25549           0 :         struct srvsvc_NetDiskInfo0 *object = pytalloc_get_ptr(py_obj);
   25550           0 :         if (value == NULL) {
   25551           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->disk");
   25552           0 :                 return -1;
   25553             :         }
   25554             :         {
   25555           0 :                 const char *test_str;
   25556           0 :                 const char *talloc_str;
   25557           0 :                 PyObject *unicode = NULL;
   25558           0 :                 if (PyUnicode_Check(value)) {
   25559           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   25560           0 :                         if (unicode == NULL) {
   25561           0 :                                 return -1;
   25562             :                         }
   25563           0 :                         test_str = PyBytes_AS_STRING(unicode);
   25564           0 :                 } else if (PyBytes_Check(value)) {
   25565           0 :                         test_str = PyBytes_AS_STRING(value);
   25566             :                 } else {
   25567           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   25568           0 :                         return -1;
   25569             :                 }
   25570           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   25571           0 :                 if (unicode != NULL) {
   25572           0 :                         Py_DECREF(unicode);
   25573             :                 }
   25574           0 :                 if (talloc_str == NULL) {
   25575           0 :                         PyErr_NoMemory();
   25576           0 :                         return -1;
   25577             :                 }
   25578           0 :                 object->disk = talloc_str;
   25579             :         }
   25580           0 :         return 0;
   25581             : }
   25582             : 
   25583             : static PyGetSetDef py_srvsvc_NetDiskInfo0_getsetters[] = {
   25584             :         {
   25585             :                 .name = discard_const_p(char, "__disk_offset"),
   25586             :                 .get = py_srvsvc_NetDiskInfo0_get___disk_offset,
   25587             :                 .set = py_srvsvc_NetDiskInfo0_set___disk_offset,
   25588             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25589             :         },
   25590             :         {
   25591             :                 .name = discard_const_p(char, "__disk_length"),
   25592             :                 .get = py_srvsvc_NetDiskInfo0_get___disk_length,
   25593             :                 .set = py_srvsvc_NetDiskInfo0_set___disk_length,
   25594             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25595             :         },
   25596             :         {
   25597             :                 .name = discard_const_p(char, "disk"),
   25598             :                 .get = py_srvsvc_NetDiskInfo0_get_disk,
   25599             :                 .set = py_srvsvc_NetDiskInfo0_set_disk,
   25600             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   25601             :         },
   25602             :         { .name = NULL }
   25603             : };
   25604             : 
   25605           0 : static PyObject *py_srvsvc_NetDiskInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25606             : {
   25607           0 :         return pytalloc_new(struct srvsvc_NetDiskInfo0, type);
   25608             : }
   25609             : 
   25610             : 
   25611             : static PyTypeObject srvsvc_NetDiskInfo0_Type = {
   25612             :         PyVarObject_HEAD_INIT(NULL, 0)
   25613             :         .tp_name = "srvsvc.NetDiskInfo0",
   25614             :         .tp_getset = py_srvsvc_NetDiskInfo0_getsetters,
   25615             :         .tp_methods = NULL,
   25616             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25617             :         .tp_new = py_srvsvc_NetDiskInfo0_new,
   25618             : };
   25619             : 
   25620             : 
   25621           0 : static PyObject *py_srvsvc_NetDiskInfo_get_count(PyObject *obj, void *closure)
   25622             : {
   25623           0 :         struct srvsvc_NetDiskInfo *object = pytalloc_get_ptr(obj);
   25624           0 :         PyObject *py_count;
   25625           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   25626           0 :         return py_count;
   25627             : }
   25628             : 
   25629           0 : static int py_srvsvc_NetDiskInfo_set_count(PyObject *py_obj, PyObject *value, void *closure)
   25630             : {
   25631           0 :         struct srvsvc_NetDiskInfo *object = pytalloc_get_ptr(py_obj);
   25632           0 :         if (value == NULL) {
   25633           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
   25634           0 :                 return -1;
   25635             :         }
   25636             :         {
   25637           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   25638           0 :                 if (PyLong_Check(value)) {
   25639           0 :                         unsigned long long test_var;
   25640           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25641           0 :                         if (PyErr_Occurred() != NULL) {
   25642           0 :                                 return -1;
   25643             :                         }
   25644           0 :                         if (test_var > uint_max) {
   25645           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25646             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25647           0 :                                 return -1;
   25648             :                         }
   25649           0 :                         object->count = test_var;
   25650             :                 } else {
   25651           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25652             :                           PyLong_Type.tp_name);
   25653           0 :                         return -1;
   25654             :                 }
   25655             :         }
   25656           0 :         return 0;
   25657             : }
   25658             : 
   25659           0 : static PyObject *py_srvsvc_NetDiskInfo_get_disks(PyObject *obj, void *closure)
   25660             : {
   25661           0 :         struct srvsvc_NetDiskInfo *object = pytalloc_get_ptr(obj);
   25662           0 :         PyObject *py_disks;
   25663           0 :         if (object->disks == NULL) {
   25664           0 :                 Py_RETURN_NONE;
   25665             :         }
   25666           0 :         if (object->disks == NULL) {
   25667           0 :                 py_disks = Py_None;
   25668           0 :                 Py_INCREF(py_disks);
   25669             :         } else {
   25670           0 :                 py_disks = PyList_New(object->count);
   25671           0 :                 if (py_disks == NULL) {
   25672           0 :                         return NULL;
   25673             :                 }
   25674             :                 {
   25675             :                         int disks_cntr_1;
   25676           0 :                         for (disks_cntr_1 = 0; disks_cntr_1 < (object->count); disks_cntr_1++) {
   25677           0 :                                 PyObject *py_disks_1;
   25678           0 :                                 py_disks_1 = pytalloc_reference_ex(&srvsvc_NetDiskInfo0_Type, object->disks, &(object->disks)[disks_cntr_1]);
   25679           0 :                                 PyList_SetItem(py_disks, disks_cntr_1, py_disks_1);
   25680             :                         }
   25681             :                 }
   25682             :         }
   25683           0 :         return py_disks;
   25684             : }
   25685             : 
   25686           0 : static int py_srvsvc_NetDiskInfo_set_disks(PyObject *py_obj, PyObject *value, void *closure)
   25687             : {
   25688           0 :         struct srvsvc_NetDiskInfo *object = pytalloc_get_ptr(py_obj);
   25689           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->disks));
   25690           0 :         if (value == NULL) {
   25691           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->disks");
   25692           0 :                 return -1;
   25693             :         }
   25694           0 :         if (value == Py_None) {
   25695           0 :                 object->disks = NULL;
   25696             :         } else {
   25697           0 :                 object->disks = NULL;
   25698           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25699             :                 {
   25700           0 :                         int disks_cntr_1;
   25701           0 :                         object->disks = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->disks, PyList_GET_SIZE(value));
   25702           0 :                         if (!object->disks) { return -1; }
   25703           0 :                         talloc_set_name_const(object->disks, "ARRAY: object->disks");
   25704           0 :                         for (disks_cntr_1 = 0; disks_cntr_1 < PyList_GET_SIZE(value); disks_cntr_1++) {
   25705           0 :                                 if (PyList_GET_ITEM(value, disks_cntr_1) == NULL) {
   25706           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->disks)[disks_cntr_1]");
   25707           0 :                                         return -1;
   25708             :                                 }
   25709           0 :                                 PY_CHECK_TYPE(&srvsvc_NetDiskInfo0_Type, PyList_GET_ITEM(value, disks_cntr_1), return -1;);
   25710           0 :                                 if (talloc_reference(object->disks, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, disks_cntr_1))) == NULL) {
   25711           0 :                                         PyErr_NoMemory();
   25712           0 :                                         return -1;
   25713             :                                 }
   25714           0 :                                 (object->disks)[disks_cntr_1] = *(struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, disks_cntr_1));
   25715             :                         }
   25716             :                 }
   25717             :         }
   25718           0 :         return 0;
   25719             : }
   25720             : 
   25721             : static PyGetSetDef py_srvsvc_NetDiskInfo_getsetters[] = {
   25722             :         {
   25723             :                 .name = discard_const_p(char, "count"),
   25724             :                 .get = py_srvsvc_NetDiskInfo_get_count,
   25725             :                 .set = py_srvsvc_NetDiskInfo_set_count,
   25726             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25727             :         },
   25728             :         {
   25729             :                 .name = discard_const_p(char, "disks"),
   25730             :                 .get = py_srvsvc_NetDiskInfo_get_disks,
   25731             :                 .set = py_srvsvc_NetDiskInfo_set_disks,
   25732             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetDiskInfo0")
   25733             :         },
   25734             :         { .name = NULL }
   25735             : };
   25736             : 
   25737           0 : static PyObject *py_srvsvc_NetDiskInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25738             : {
   25739           0 :         return pytalloc_new(struct srvsvc_NetDiskInfo, type);
   25740             : }
   25741             : 
   25742             : 
   25743             : static PyTypeObject srvsvc_NetDiskInfo_Type = {
   25744             :         PyVarObject_HEAD_INIT(NULL, 0)
   25745             :         .tp_name = "srvsvc.NetDiskInfo",
   25746             :         .tp_getset = py_srvsvc_NetDiskInfo_getsetters,
   25747             :         .tp_methods = NULL,
   25748             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25749             :         .tp_new = py_srvsvc_NetDiskInfo_new,
   25750             : };
   25751             : 
   25752             : 
   25753           0 : static PyObject *py_srvsvc_Statistics_get_start(PyObject *obj, void *closure)
   25754             : {
   25755           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   25756           0 :         PyObject *py_start;
   25757           0 :         py_start = PyLong_FromUnsignedLongLong((uint32_t)(object->start));
   25758           0 :         return py_start;
   25759             : }
   25760             : 
   25761           0 : static int py_srvsvc_Statistics_set_start(PyObject *py_obj, PyObject *value, void *closure)
   25762             : {
   25763           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   25764           0 :         if (value == NULL) {
   25765           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->start");
   25766           0 :                 return -1;
   25767             :         }
   25768             :         {
   25769           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->start));
   25770           0 :                 if (PyLong_Check(value)) {
   25771           0 :                         unsigned long long test_var;
   25772           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25773           0 :                         if (PyErr_Occurred() != NULL) {
   25774           0 :                                 return -1;
   25775             :                         }
   25776           0 :                         if (test_var > uint_max) {
   25777           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25778             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25779           0 :                                 return -1;
   25780             :                         }
   25781           0 :                         object->start = test_var;
   25782             :                 } else {
   25783           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25784             :                           PyLong_Type.tp_name);
   25785           0 :                         return -1;
   25786             :                 }
   25787             :         }
   25788           0 :         return 0;
   25789             : }
   25790             : 
   25791           0 : static PyObject *py_srvsvc_Statistics_get_fopens(PyObject *obj, void *closure)
   25792             : {
   25793           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   25794           0 :         PyObject *py_fopens;
   25795           0 :         py_fopens = PyLong_FromUnsignedLongLong((uint32_t)(object->fopens));
   25796           0 :         return py_fopens;
   25797             : }
   25798             : 
   25799           0 : static int py_srvsvc_Statistics_set_fopens(PyObject *py_obj, PyObject *value, void *closure)
   25800             : {
   25801           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   25802           0 :         if (value == NULL) {
   25803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fopens");
   25804           0 :                 return -1;
   25805             :         }
   25806             :         {
   25807           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fopens));
   25808           0 :                 if (PyLong_Check(value)) {
   25809           0 :                         unsigned long long test_var;
   25810           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25811           0 :                         if (PyErr_Occurred() != NULL) {
   25812           0 :                                 return -1;
   25813             :                         }
   25814           0 :                         if (test_var > uint_max) {
   25815           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25816             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25817           0 :                                 return -1;
   25818             :                         }
   25819           0 :                         object->fopens = test_var;
   25820             :                 } else {
   25821           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25822             :                           PyLong_Type.tp_name);
   25823           0 :                         return -1;
   25824             :                 }
   25825             :         }
   25826           0 :         return 0;
   25827             : }
   25828             : 
   25829           0 : static PyObject *py_srvsvc_Statistics_get_devopens(PyObject *obj, void *closure)
   25830             : {
   25831           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   25832           0 :         PyObject *py_devopens;
   25833           0 :         py_devopens = PyLong_FromUnsignedLongLong((uint32_t)(object->devopens));
   25834           0 :         return py_devopens;
   25835             : }
   25836             : 
   25837           0 : static int py_srvsvc_Statistics_set_devopens(PyObject *py_obj, PyObject *value, void *closure)
   25838             : {
   25839           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   25840           0 :         if (value == NULL) {
   25841           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->devopens");
   25842           0 :                 return -1;
   25843             :         }
   25844             :         {
   25845           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->devopens));
   25846           0 :                 if (PyLong_Check(value)) {
   25847           0 :                         unsigned long long test_var;
   25848           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25849           0 :                         if (PyErr_Occurred() != NULL) {
   25850           0 :                                 return -1;
   25851             :                         }
   25852           0 :                         if (test_var > uint_max) {
   25853           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25854             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25855           0 :                                 return -1;
   25856             :                         }
   25857           0 :                         object->devopens = test_var;
   25858             :                 } else {
   25859           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25860             :                           PyLong_Type.tp_name);
   25861           0 :                         return -1;
   25862             :                 }
   25863             :         }
   25864           0 :         return 0;
   25865             : }
   25866             : 
   25867           0 : static PyObject *py_srvsvc_Statistics_get_jobsqueued(PyObject *obj, void *closure)
   25868             : {
   25869           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   25870           0 :         PyObject *py_jobsqueued;
   25871           0 :         py_jobsqueued = PyLong_FromUnsignedLongLong((uint32_t)(object->jobsqueued));
   25872           0 :         return py_jobsqueued;
   25873             : }
   25874             : 
   25875           0 : static int py_srvsvc_Statistics_set_jobsqueued(PyObject *py_obj, PyObject *value, void *closure)
   25876             : {
   25877           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   25878           0 :         if (value == NULL) {
   25879           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->jobsqueued");
   25880           0 :                 return -1;
   25881             :         }
   25882             :         {
   25883           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->jobsqueued));
   25884           0 :                 if (PyLong_Check(value)) {
   25885           0 :                         unsigned long long test_var;
   25886           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25887           0 :                         if (PyErr_Occurred() != NULL) {
   25888           0 :                                 return -1;
   25889             :                         }
   25890           0 :                         if (test_var > uint_max) {
   25891           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25892             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25893           0 :                                 return -1;
   25894             :                         }
   25895           0 :                         object->jobsqueued = test_var;
   25896             :                 } else {
   25897           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25898             :                           PyLong_Type.tp_name);
   25899           0 :                         return -1;
   25900             :                 }
   25901             :         }
   25902           0 :         return 0;
   25903             : }
   25904             : 
   25905           0 : static PyObject *py_srvsvc_Statistics_get_sopens(PyObject *obj, void *closure)
   25906             : {
   25907           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   25908           0 :         PyObject *py_sopens;
   25909           0 :         py_sopens = PyLong_FromUnsignedLongLong((uint32_t)(object->sopens));
   25910           0 :         return py_sopens;
   25911             : }
   25912             : 
   25913           0 : static int py_srvsvc_Statistics_set_sopens(PyObject *py_obj, PyObject *value, void *closure)
   25914             : {
   25915           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   25916           0 :         if (value == NULL) {
   25917           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sopens");
   25918           0 :                 return -1;
   25919             :         }
   25920             :         {
   25921           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sopens));
   25922           0 :                 if (PyLong_Check(value)) {
   25923           0 :                         unsigned long long test_var;
   25924           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25925           0 :                         if (PyErr_Occurred() != NULL) {
   25926           0 :                                 return -1;
   25927             :                         }
   25928           0 :                         if (test_var > uint_max) {
   25929           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25930             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25931           0 :                                 return -1;
   25932             :                         }
   25933           0 :                         object->sopens = test_var;
   25934             :                 } else {
   25935           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25936             :                           PyLong_Type.tp_name);
   25937           0 :                         return -1;
   25938             :                 }
   25939             :         }
   25940           0 :         return 0;
   25941             : }
   25942             : 
   25943           0 : static PyObject *py_srvsvc_Statistics_get_stimeouts(PyObject *obj, void *closure)
   25944             : {
   25945           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   25946           0 :         PyObject *py_stimeouts;
   25947           0 :         py_stimeouts = PyLong_FromUnsignedLongLong((uint32_t)(object->stimeouts));
   25948           0 :         return py_stimeouts;
   25949             : }
   25950             : 
   25951           0 : static int py_srvsvc_Statistics_set_stimeouts(PyObject *py_obj, PyObject *value, void *closure)
   25952             : {
   25953           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   25954           0 :         if (value == NULL) {
   25955           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->stimeouts");
   25956           0 :                 return -1;
   25957             :         }
   25958             :         {
   25959           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->stimeouts));
   25960           0 :                 if (PyLong_Check(value)) {
   25961           0 :                         unsigned long long test_var;
   25962           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25963           0 :                         if (PyErr_Occurred() != NULL) {
   25964           0 :                                 return -1;
   25965             :                         }
   25966           0 :                         if (test_var > uint_max) {
   25967           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25968             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25969           0 :                                 return -1;
   25970             :                         }
   25971           0 :                         object->stimeouts = test_var;
   25972             :                 } else {
   25973           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25974             :                           PyLong_Type.tp_name);
   25975           0 :                         return -1;
   25976             :                 }
   25977             :         }
   25978           0 :         return 0;
   25979             : }
   25980             : 
   25981           0 : static PyObject *py_srvsvc_Statistics_get_serrorout(PyObject *obj, void *closure)
   25982             : {
   25983           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   25984           0 :         PyObject *py_serrorout;
   25985           0 :         py_serrorout = PyLong_FromUnsignedLongLong((uint32_t)(object->serrorout));
   25986           0 :         return py_serrorout;
   25987             : }
   25988             : 
   25989           0 : static int py_srvsvc_Statistics_set_serrorout(PyObject *py_obj, PyObject *value, void *closure)
   25990             : {
   25991           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   25992           0 :         if (value == NULL) {
   25993           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->serrorout");
   25994           0 :                 return -1;
   25995             :         }
   25996             :         {
   25997           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serrorout));
   25998           0 :                 if (PyLong_Check(value)) {
   25999           0 :                         unsigned long long test_var;
   26000           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26001           0 :                         if (PyErr_Occurred() != NULL) {
   26002           0 :                                 return -1;
   26003             :                         }
   26004           0 :                         if (test_var > uint_max) {
   26005           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26006             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26007           0 :                                 return -1;
   26008             :                         }
   26009           0 :                         object->serrorout = test_var;
   26010             :                 } else {
   26011           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26012             :                           PyLong_Type.tp_name);
   26013           0 :                         return -1;
   26014             :                 }
   26015             :         }
   26016           0 :         return 0;
   26017             : }
   26018             : 
   26019           0 : static PyObject *py_srvsvc_Statistics_get_pwerrors(PyObject *obj, void *closure)
   26020             : {
   26021           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   26022           0 :         PyObject *py_pwerrors;
   26023           0 :         py_pwerrors = PyLong_FromUnsignedLongLong((uint32_t)(object->pwerrors));
   26024           0 :         return py_pwerrors;
   26025             : }
   26026             : 
   26027           0 : static int py_srvsvc_Statistics_set_pwerrors(PyObject *py_obj, PyObject *value, void *closure)
   26028             : {
   26029           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   26030           0 :         if (value == NULL) {
   26031           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pwerrors");
   26032           0 :                 return -1;
   26033             :         }
   26034             :         {
   26035           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pwerrors));
   26036           0 :                 if (PyLong_Check(value)) {
   26037           0 :                         unsigned long long test_var;
   26038           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26039           0 :                         if (PyErr_Occurred() != NULL) {
   26040           0 :                                 return -1;
   26041             :                         }
   26042           0 :                         if (test_var > uint_max) {
   26043           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26044             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26045           0 :                                 return -1;
   26046             :                         }
   26047           0 :                         object->pwerrors = test_var;
   26048             :                 } else {
   26049           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26050             :                           PyLong_Type.tp_name);
   26051           0 :                         return -1;
   26052             :                 }
   26053             :         }
   26054           0 :         return 0;
   26055             : }
   26056             : 
   26057           0 : static PyObject *py_srvsvc_Statistics_get_permerrors(PyObject *obj, void *closure)
   26058             : {
   26059           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   26060           0 :         PyObject *py_permerrors;
   26061           0 :         py_permerrors = PyLong_FromUnsignedLongLong((uint32_t)(object->permerrors));
   26062           0 :         return py_permerrors;
   26063             : }
   26064             : 
   26065           0 : static int py_srvsvc_Statistics_set_permerrors(PyObject *py_obj, PyObject *value, void *closure)
   26066             : {
   26067           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   26068           0 :         if (value == NULL) {
   26069           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->permerrors");
   26070           0 :                 return -1;
   26071             :         }
   26072             :         {
   26073           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permerrors));
   26074           0 :                 if (PyLong_Check(value)) {
   26075           0 :                         unsigned long long test_var;
   26076           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26077           0 :                         if (PyErr_Occurred() != NULL) {
   26078           0 :                                 return -1;
   26079             :                         }
   26080           0 :                         if (test_var > uint_max) {
   26081           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26082             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26083           0 :                                 return -1;
   26084             :                         }
   26085           0 :                         object->permerrors = test_var;
   26086             :                 } else {
   26087           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26088             :                           PyLong_Type.tp_name);
   26089           0 :                         return -1;
   26090             :                 }
   26091             :         }
   26092           0 :         return 0;
   26093             : }
   26094             : 
   26095           0 : static PyObject *py_srvsvc_Statistics_get_syserrors(PyObject *obj, void *closure)
   26096             : {
   26097           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   26098           0 :         PyObject *py_syserrors;
   26099           0 :         py_syserrors = PyLong_FromUnsignedLongLong((uint32_t)(object->syserrors));
   26100           0 :         return py_syserrors;
   26101             : }
   26102             : 
   26103           0 : static int py_srvsvc_Statistics_set_syserrors(PyObject *py_obj, PyObject *value, void *closure)
   26104             : {
   26105           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   26106           0 :         if (value == NULL) {
   26107           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->syserrors");
   26108           0 :                 return -1;
   26109             :         }
   26110             :         {
   26111           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->syserrors));
   26112           0 :                 if (PyLong_Check(value)) {
   26113           0 :                         unsigned long long test_var;
   26114           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26115           0 :                         if (PyErr_Occurred() != NULL) {
   26116           0 :                                 return -1;
   26117             :                         }
   26118           0 :                         if (test_var > uint_max) {
   26119           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26120             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26121           0 :                                 return -1;
   26122             :                         }
   26123           0 :                         object->syserrors = test_var;
   26124             :                 } else {
   26125           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26126             :                           PyLong_Type.tp_name);
   26127           0 :                         return -1;
   26128             :                 }
   26129             :         }
   26130           0 :         return 0;
   26131             : }
   26132             : 
   26133           0 : static PyObject *py_srvsvc_Statistics_get_bytessent_low(PyObject *obj, void *closure)
   26134             : {
   26135           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   26136           0 :         PyObject *py_bytessent_low;
   26137           0 :         py_bytessent_low = PyLong_FromUnsignedLongLong((uint32_t)(object->bytessent_low));
   26138           0 :         return py_bytessent_low;
   26139             : }
   26140             : 
   26141           0 : static int py_srvsvc_Statistics_set_bytessent_low(PyObject *py_obj, PyObject *value, void *closure)
   26142             : {
   26143           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   26144           0 :         if (value == NULL) {
   26145           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bytessent_low");
   26146           0 :                 return -1;
   26147             :         }
   26148             :         {
   26149           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytessent_low));
   26150           0 :                 if (PyLong_Check(value)) {
   26151           0 :                         unsigned long long test_var;
   26152           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26153           0 :                         if (PyErr_Occurred() != NULL) {
   26154           0 :                                 return -1;
   26155             :                         }
   26156           0 :                         if (test_var > uint_max) {
   26157           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26158             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26159           0 :                                 return -1;
   26160             :                         }
   26161           0 :                         object->bytessent_low = test_var;
   26162             :                 } else {
   26163           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26164             :                           PyLong_Type.tp_name);
   26165           0 :                         return -1;
   26166             :                 }
   26167             :         }
   26168           0 :         return 0;
   26169             : }
   26170             : 
   26171           0 : static PyObject *py_srvsvc_Statistics_get_bytessent_high(PyObject *obj, void *closure)
   26172             : {
   26173           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   26174           0 :         PyObject *py_bytessent_high;
   26175           0 :         py_bytessent_high = PyLong_FromUnsignedLongLong((uint32_t)(object->bytessent_high));
   26176           0 :         return py_bytessent_high;
   26177             : }
   26178             : 
   26179           0 : static int py_srvsvc_Statistics_set_bytessent_high(PyObject *py_obj, PyObject *value, void *closure)
   26180             : {
   26181           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   26182           0 :         if (value == NULL) {
   26183           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bytessent_high");
   26184           0 :                 return -1;
   26185             :         }
   26186             :         {
   26187           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytessent_high));
   26188           0 :                 if (PyLong_Check(value)) {
   26189           0 :                         unsigned long long test_var;
   26190           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26191           0 :                         if (PyErr_Occurred() != NULL) {
   26192           0 :                                 return -1;
   26193             :                         }
   26194           0 :                         if (test_var > uint_max) {
   26195           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26196             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26197           0 :                                 return -1;
   26198             :                         }
   26199           0 :                         object->bytessent_high = test_var;
   26200             :                 } else {
   26201           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26202             :                           PyLong_Type.tp_name);
   26203           0 :                         return -1;
   26204             :                 }
   26205             :         }
   26206           0 :         return 0;
   26207             : }
   26208             : 
   26209           0 : static PyObject *py_srvsvc_Statistics_get_bytesrcvd_low(PyObject *obj, void *closure)
   26210             : {
   26211           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   26212           0 :         PyObject *py_bytesrcvd_low;
   26213           0 :         py_bytesrcvd_low = PyLong_FromUnsignedLongLong((uint32_t)(object->bytesrcvd_low));
   26214           0 :         return py_bytesrcvd_low;
   26215             : }
   26216             : 
   26217           0 : static int py_srvsvc_Statistics_set_bytesrcvd_low(PyObject *py_obj, PyObject *value, void *closure)
   26218             : {
   26219           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   26220           0 :         if (value == NULL) {
   26221           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bytesrcvd_low");
   26222           0 :                 return -1;
   26223             :         }
   26224             :         {
   26225           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytesrcvd_low));
   26226           0 :                 if (PyLong_Check(value)) {
   26227           0 :                         unsigned long long test_var;
   26228           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26229           0 :                         if (PyErr_Occurred() != NULL) {
   26230           0 :                                 return -1;
   26231             :                         }
   26232           0 :                         if (test_var > uint_max) {
   26233           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26234             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26235           0 :                                 return -1;
   26236             :                         }
   26237           0 :                         object->bytesrcvd_low = test_var;
   26238             :                 } else {
   26239           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26240             :                           PyLong_Type.tp_name);
   26241           0 :                         return -1;
   26242             :                 }
   26243             :         }
   26244           0 :         return 0;
   26245             : }
   26246             : 
   26247           0 : static PyObject *py_srvsvc_Statistics_get_bytesrcvd_high(PyObject *obj, void *closure)
   26248             : {
   26249           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   26250           0 :         PyObject *py_bytesrcvd_high;
   26251           0 :         py_bytesrcvd_high = PyLong_FromUnsignedLongLong((uint32_t)(object->bytesrcvd_high));
   26252           0 :         return py_bytesrcvd_high;
   26253             : }
   26254             : 
   26255           0 : static int py_srvsvc_Statistics_set_bytesrcvd_high(PyObject *py_obj, PyObject *value, void *closure)
   26256             : {
   26257           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   26258           0 :         if (value == NULL) {
   26259           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bytesrcvd_high");
   26260           0 :                 return -1;
   26261             :         }
   26262             :         {
   26263           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytesrcvd_high));
   26264           0 :                 if (PyLong_Check(value)) {
   26265           0 :                         unsigned long long test_var;
   26266           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26267           0 :                         if (PyErr_Occurred() != NULL) {
   26268           0 :                                 return -1;
   26269             :                         }
   26270           0 :                         if (test_var > uint_max) {
   26271           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26272             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26273           0 :                                 return -1;
   26274             :                         }
   26275           0 :                         object->bytesrcvd_high = test_var;
   26276             :                 } else {
   26277           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26278             :                           PyLong_Type.tp_name);
   26279           0 :                         return -1;
   26280             :                 }
   26281             :         }
   26282           0 :         return 0;
   26283             : }
   26284             : 
   26285           0 : static PyObject *py_srvsvc_Statistics_get_avresponse(PyObject *obj, void *closure)
   26286             : {
   26287           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   26288           0 :         PyObject *py_avresponse;
   26289           0 :         py_avresponse = PyLong_FromUnsignedLongLong((uint32_t)(object->avresponse));
   26290           0 :         return py_avresponse;
   26291             : }
   26292             : 
   26293           0 : static int py_srvsvc_Statistics_set_avresponse(PyObject *py_obj, PyObject *value, void *closure)
   26294             : {
   26295           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   26296           0 :         if (value == NULL) {
   26297           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->avresponse");
   26298           0 :                 return -1;
   26299             :         }
   26300             :         {
   26301           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->avresponse));
   26302           0 :                 if (PyLong_Check(value)) {
   26303           0 :                         unsigned long long test_var;
   26304           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26305           0 :                         if (PyErr_Occurred() != NULL) {
   26306           0 :                                 return -1;
   26307             :                         }
   26308           0 :                         if (test_var > uint_max) {
   26309           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26310             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26311           0 :                                 return -1;
   26312             :                         }
   26313           0 :                         object->avresponse = test_var;
   26314             :                 } else {
   26315           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26316             :                           PyLong_Type.tp_name);
   26317           0 :                         return -1;
   26318             :                 }
   26319             :         }
   26320           0 :         return 0;
   26321             : }
   26322             : 
   26323           0 : static PyObject *py_srvsvc_Statistics_get_reqbufneed(PyObject *obj, void *closure)
   26324             : {
   26325           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   26326           0 :         PyObject *py_reqbufneed;
   26327           0 :         py_reqbufneed = PyLong_FromUnsignedLongLong((uint32_t)(object->reqbufneed));
   26328           0 :         return py_reqbufneed;
   26329             : }
   26330             : 
   26331           0 : static int py_srvsvc_Statistics_set_reqbufneed(PyObject *py_obj, PyObject *value, void *closure)
   26332             : {
   26333           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   26334           0 :         if (value == NULL) {
   26335           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reqbufneed");
   26336           0 :                 return -1;
   26337             :         }
   26338             :         {
   26339           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reqbufneed));
   26340           0 :                 if (PyLong_Check(value)) {
   26341           0 :                         unsigned long long test_var;
   26342           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26343           0 :                         if (PyErr_Occurred() != NULL) {
   26344           0 :                                 return -1;
   26345             :                         }
   26346           0 :                         if (test_var > uint_max) {
   26347           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26348             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26349           0 :                                 return -1;
   26350             :                         }
   26351           0 :                         object->reqbufneed = test_var;
   26352             :                 } else {
   26353           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26354             :                           PyLong_Type.tp_name);
   26355           0 :                         return -1;
   26356             :                 }
   26357             :         }
   26358           0 :         return 0;
   26359             : }
   26360             : 
   26361           0 : static PyObject *py_srvsvc_Statistics_get_bigbufneed(PyObject *obj, void *closure)
   26362             : {
   26363           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(obj);
   26364           0 :         PyObject *py_bigbufneed;
   26365           0 :         py_bigbufneed = PyLong_FromUnsignedLongLong((uint32_t)(object->bigbufneed));
   26366           0 :         return py_bigbufneed;
   26367             : }
   26368             : 
   26369           0 : static int py_srvsvc_Statistics_set_bigbufneed(PyObject *py_obj, PyObject *value, void *closure)
   26370             : {
   26371           0 :         struct srvsvc_Statistics *object = pytalloc_get_ptr(py_obj);
   26372           0 :         if (value == NULL) {
   26373           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bigbufneed");
   26374           0 :                 return -1;
   26375             :         }
   26376             :         {
   26377           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bigbufneed));
   26378           0 :                 if (PyLong_Check(value)) {
   26379           0 :                         unsigned long long test_var;
   26380           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26381           0 :                         if (PyErr_Occurred() != NULL) {
   26382           0 :                                 return -1;
   26383             :                         }
   26384           0 :                         if (test_var > uint_max) {
   26385           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26386             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26387           0 :                                 return -1;
   26388             :                         }
   26389           0 :                         object->bigbufneed = test_var;
   26390             :                 } else {
   26391           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26392             :                           PyLong_Type.tp_name);
   26393           0 :                         return -1;
   26394             :                 }
   26395             :         }
   26396           0 :         return 0;
   26397             : }
   26398             : 
   26399             : static PyGetSetDef py_srvsvc_Statistics_getsetters[] = {
   26400             :         {
   26401             :                 .name = discard_const_p(char, "start"),
   26402             :                 .get = py_srvsvc_Statistics_get_start,
   26403             :                 .set = py_srvsvc_Statistics_set_start,
   26404             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26405             :         },
   26406             :         {
   26407             :                 .name = discard_const_p(char, "fopens"),
   26408             :                 .get = py_srvsvc_Statistics_get_fopens,
   26409             :                 .set = py_srvsvc_Statistics_set_fopens,
   26410             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26411             :         },
   26412             :         {
   26413             :                 .name = discard_const_p(char, "devopens"),
   26414             :                 .get = py_srvsvc_Statistics_get_devopens,
   26415             :                 .set = py_srvsvc_Statistics_set_devopens,
   26416             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26417             :         },
   26418             :         {
   26419             :                 .name = discard_const_p(char, "jobsqueued"),
   26420             :                 .get = py_srvsvc_Statistics_get_jobsqueued,
   26421             :                 .set = py_srvsvc_Statistics_set_jobsqueued,
   26422             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26423             :         },
   26424             :         {
   26425             :                 .name = discard_const_p(char, "sopens"),
   26426             :                 .get = py_srvsvc_Statistics_get_sopens,
   26427             :                 .set = py_srvsvc_Statistics_set_sopens,
   26428             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26429             :         },
   26430             :         {
   26431             :                 .name = discard_const_p(char, "stimeouts"),
   26432             :                 .get = py_srvsvc_Statistics_get_stimeouts,
   26433             :                 .set = py_srvsvc_Statistics_set_stimeouts,
   26434             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26435             :         },
   26436             :         {
   26437             :                 .name = discard_const_p(char, "serrorout"),
   26438             :                 .get = py_srvsvc_Statistics_get_serrorout,
   26439             :                 .set = py_srvsvc_Statistics_set_serrorout,
   26440             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26441             :         },
   26442             :         {
   26443             :                 .name = discard_const_p(char, "pwerrors"),
   26444             :                 .get = py_srvsvc_Statistics_get_pwerrors,
   26445             :                 .set = py_srvsvc_Statistics_set_pwerrors,
   26446             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26447             :         },
   26448             :         {
   26449             :                 .name = discard_const_p(char, "permerrors"),
   26450             :                 .get = py_srvsvc_Statistics_get_permerrors,
   26451             :                 .set = py_srvsvc_Statistics_set_permerrors,
   26452             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26453             :         },
   26454             :         {
   26455             :                 .name = discard_const_p(char, "syserrors"),
   26456             :                 .get = py_srvsvc_Statistics_get_syserrors,
   26457             :                 .set = py_srvsvc_Statistics_set_syserrors,
   26458             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26459             :         },
   26460             :         {
   26461             :                 .name = discard_const_p(char, "bytessent_low"),
   26462             :                 .get = py_srvsvc_Statistics_get_bytessent_low,
   26463             :                 .set = py_srvsvc_Statistics_set_bytessent_low,
   26464             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26465             :         },
   26466             :         {
   26467             :                 .name = discard_const_p(char, "bytessent_high"),
   26468             :                 .get = py_srvsvc_Statistics_get_bytessent_high,
   26469             :                 .set = py_srvsvc_Statistics_set_bytessent_high,
   26470             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26471             :         },
   26472             :         {
   26473             :                 .name = discard_const_p(char, "bytesrcvd_low"),
   26474             :                 .get = py_srvsvc_Statistics_get_bytesrcvd_low,
   26475             :                 .set = py_srvsvc_Statistics_set_bytesrcvd_low,
   26476             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26477             :         },
   26478             :         {
   26479             :                 .name = discard_const_p(char, "bytesrcvd_high"),
   26480             :                 .get = py_srvsvc_Statistics_get_bytesrcvd_high,
   26481             :                 .set = py_srvsvc_Statistics_set_bytesrcvd_high,
   26482             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26483             :         },
   26484             :         {
   26485             :                 .name = discard_const_p(char, "avresponse"),
   26486             :                 .get = py_srvsvc_Statistics_get_avresponse,
   26487             :                 .set = py_srvsvc_Statistics_set_avresponse,
   26488             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26489             :         },
   26490             :         {
   26491             :                 .name = discard_const_p(char, "reqbufneed"),
   26492             :                 .get = py_srvsvc_Statistics_get_reqbufneed,
   26493             :                 .set = py_srvsvc_Statistics_set_reqbufneed,
   26494             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26495             :         },
   26496             :         {
   26497             :                 .name = discard_const_p(char, "bigbufneed"),
   26498             :                 .get = py_srvsvc_Statistics_get_bigbufneed,
   26499             :                 .set = py_srvsvc_Statistics_set_bigbufneed,
   26500             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26501             :         },
   26502             :         { .name = NULL }
   26503             : };
   26504             : 
   26505           0 : static PyObject *py_srvsvc_Statistics_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26506             : {
   26507           0 :         return pytalloc_new(struct srvsvc_Statistics, type);
   26508             : }
   26509             : 
   26510             : 
   26511             : static PyTypeObject srvsvc_Statistics_Type = {
   26512             :         PyVarObject_HEAD_INIT(NULL, 0)
   26513             :         .tp_name = "srvsvc.Statistics",
   26514             :         .tp_getset = py_srvsvc_Statistics_getsetters,
   26515             :         .tp_methods = NULL,
   26516             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26517             :         .tp_new = py_srvsvc_Statistics_new,
   26518             : };
   26519             : 
   26520             : 
   26521           0 : static PyObject *py_srvsvc_NetTransportInfo0_get_vcs(PyObject *obj, void *closure)
   26522             : {
   26523           0 :         struct srvsvc_NetTransportInfo0 *object = pytalloc_get_ptr(obj);
   26524           0 :         PyObject *py_vcs;
   26525           0 :         py_vcs = PyLong_FromUnsignedLongLong((uint32_t)(object->vcs));
   26526           0 :         return py_vcs;
   26527             : }
   26528             : 
   26529           0 : static int py_srvsvc_NetTransportInfo0_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
   26530             : {
   26531           0 :         struct srvsvc_NetTransportInfo0 *object = pytalloc_get_ptr(py_obj);
   26532           0 :         if (value == NULL) {
   26533           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->vcs");
   26534           0 :                 return -1;
   26535             :         }
   26536             :         {
   26537           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
   26538           0 :                 if (PyLong_Check(value)) {
   26539           0 :                         unsigned long long test_var;
   26540           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26541           0 :                         if (PyErr_Occurred() != NULL) {
   26542           0 :                                 return -1;
   26543             :                         }
   26544           0 :                         if (test_var > uint_max) {
   26545           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26546             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26547           0 :                                 return -1;
   26548             :                         }
   26549           0 :                         object->vcs = test_var;
   26550             :                 } else {
   26551           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26552             :                           PyLong_Type.tp_name);
   26553           0 :                         return -1;
   26554             :                 }
   26555             :         }
   26556           0 :         return 0;
   26557             : }
   26558             : 
   26559           0 : static PyObject *py_srvsvc_NetTransportInfo0_get_name(PyObject *obj, void *closure)
   26560             : {
   26561           0 :         struct srvsvc_NetTransportInfo0 *object = pytalloc_get_ptr(obj);
   26562           0 :         PyObject *py_name;
   26563           0 :         if (object->name == NULL) {
   26564           0 :                 Py_RETURN_NONE;
   26565             :         }
   26566           0 :         if (object->name == NULL) {
   26567           0 :                 py_name = Py_None;
   26568           0 :                 Py_INCREF(py_name);
   26569             :         } else {
   26570           0 :                 if (object->name == NULL) {
   26571           0 :                         py_name = Py_None;
   26572           0 :                         Py_INCREF(py_name);
   26573             :                 } else {
   26574           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
   26575             :                 }
   26576             :         }
   26577           0 :         return py_name;
   26578             : }
   26579             : 
   26580           0 : static int py_srvsvc_NetTransportInfo0_set_name(PyObject *py_obj, PyObject *value, void *closure)
   26581             : {
   26582           0 :         struct srvsvc_NetTransportInfo0 *object = pytalloc_get_ptr(py_obj);
   26583           0 :         if (value == NULL) {
   26584           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->name");
   26585           0 :                 return -1;
   26586             :         }
   26587           0 :         if (value == Py_None) {
   26588           0 :                 object->name = NULL;
   26589             :         } else {
   26590           0 :                 object->name = NULL;
   26591             :                 {
   26592           0 :                         const char *test_str;
   26593           0 :                         const char *talloc_str;
   26594           0 :                         PyObject *unicode = NULL;
   26595           0 :                         if (PyUnicode_Check(value)) {
   26596           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26597           0 :                                 if (unicode == NULL) {
   26598           0 :                                         return -1;
   26599             :                                 }
   26600           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26601           0 :                         } else if (PyBytes_Check(value)) {
   26602           0 :                                 test_str = PyBytes_AS_STRING(value);
   26603             :                         } else {
   26604           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26605           0 :                                 return -1;
   26606             :                         }
   26607           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26608           0 :                         if (unicode != NULL) {
   26609           0 :                                 Py_DECREF(unicode);
   26610             :                         }
   26611           0 :                         if (talloc_str == NULL) {
   26612           0 :                                 PyErr_NoMemory();
   26613           0 :                                 return -1;
   26614             :                         }
   26615           0 :                         object->name = talloc_str;
   26616             :                 }
   26617             :         }
   26618           0 :         return 0;
   26619             : }
   26620             : 
   26621           0 : static PyObject *py_srvsvc_NetTransportInfo0_get_addr(PyObject *obj, void *closure)
   26622             : {
   26623           0 :         struct srvsvc_NetTransportInfo0 *object = pytalloc_get_ptr(obj);
   26624           0 :         PyObject *py_addr;
   26625           0 :         if (object->addr == NULL) {
   26626           0 :                 Py_RETURN_NONE;
   26627             :         }
   26628           0 :         if (object->addr == NULL) {
   26629           0 :                 py_addr = Py_None;
   26630           0 :                 Py_INCREF(py_addr);
   26631             :         } else {
   26632           0 :                 py_addr = PyList_New(object->addr_len);
   26633           0 :                 if (py_addr == NULL) {
   26634           0 :                         return NULL;
   26635             :                 }
   26636             :                 {
   26637             :                         int addr_cntr_1;
   26638           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
   26639           0 :                                 PyObject *py_addr_1;
   26640           0 :                                 py_addr_1 = PyLong_FromLong((uint16_t)((object->addr)[addr_cntr_1]));
   26641           0 :                                 PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
   26642             :                         }
   26643             :                 }
   26644             :         }
   26645           0 :         return py_addr;
   26646             : }
   26647             : 
   26648           0 : static int py_srvsvc_NetTransportInfo0_set_addr(PyObject *py_obj, PyObject *value, void *closure)
   26649             : {
   26650           0 :         struct srvsvc_NetTransportInfo0 *object = pytalloc_get_ptr(py_obj);
   26651           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
   26652           0 :         if (value == NULL) {
   26653           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->addr");
   26654           0 :                 return -1;
   26655             :         }
   26656           0 :         if (value == Py_None) {
   26657           0 :                 object->addr = NULL;
   26658             :         } else {
   26659           0 :                 object->addr = NULL;
   26660           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   26661             :                 {
   26662           0 :                         int addr_cntr_1;
   26663           0 :                         object->addr = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->addr, PyList_GET_SIZE(value));
   26664           0 :                         if (!object->addr) { return -1; }
   26665           0 :                         talloc_set_name_const(object->addr, "ARRAY: object->addr");
   26666           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
   26667           0 :                                 if (PyList_GET_ITEM(value, addr_cntr_1) == NULL) {
   26668           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->addr)[addr_cntr_1]");
   26669           0 :                                         return -1;
   26670             :                                 }
   26671             :                                 {
   26672           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->addr)[addr_cntr_1]));
   26673           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
   26674           0 :                                                 unsigned long long test_var;
   26675           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
   26676           0 :                                                 if (PyErr_Occurred() != NULL) {
   26677           0 :                                                         return -1;
   26678             :                                                 }
   26679           0 :                                                 if (test_var > uint_max) {
   26680           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26681             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   26682           0 :                                                         return -1;
   26683             :                                                 }
   26684           0 :                                                 (object->addr)[addr_cntr_1] = test_var;
   26685             :                                         } else {
   26686           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   26687             :                                                   PyLong_Type.tp_name);
   26688           0 :                                                 return -1;
   26689             :                                         }
   26690             :                                 }
   26691             :                         }
   26692             :                 }
   26693             :         }
   26694           0 :         return 0;
   26695             : }
   26696             : 
   26697           0 : static PyObject *py_srvsvc_NetTransportInfo0_get_addr_len(PyObject *obj, void *closure)
   26698             : {
   26699           0 :         struct srvsvc_NetTransportInfo0 *object = pytalloc_get_ptr(obj);
   26700           0 :         PyObject *py_addr_len;
   26701           0 :         py_addr_len = PyLong_FromUnsignedLongLong((uint32_t)(object->addr_len));
   26702           0 :         return py_addr_len;
   26703             : }
   26704             : 
   26705           0 : static int py_srvsvc_NetTransportInfo0_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
   26706             : {
   26707           0 :         struct srvsvc_NetTransportInfo0 *object = pytalloc_get_ptr(py_obj);
   26708           0 :         if (value == NULL) {
   26709           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->addr_len");
   26710           0 :                 return -1;
   26711             :         }
   26712             :         {
   26713           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
   26714           0 :                 if (PyLong_Check(value)) {
   26715           0 :                         unsigned long long test_var;
   26716           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26717           0 :                         if (PyErr_Occurred() != NULL) {
   26718           0 :                                 return -1;
   26719             :                         }
   26720           0 :                         if (test_var > uint_max) {
   26721           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26722             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26723           0 :                                 return -1;
   26724             :                         }
   26725           0 :                         object->addr_len = test_var;
   26726             :                 } else {
   26727           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26728             :                           PyLong_Type.tp_name);
   26729           0 :                         return -1;
   26730             :                 }
   26731             :         }
   26732           0 :         return 0;
   26733             : }
   26734             : 
   26735           0 : static PyObject *py_srvsvc_NetTransportInfo0_get_net_addr(PyObject *obj, void *closure)
   26736             : {
   26737           0 :         struct srvsvc_NetTransportInfo0 *object = pytalloc_get_ptr(obj);
   26738           0 :         PyObject *py_net_addr;
   26739           0 :         if (object->net_addr == NULL) {
   26740           0 :                 Py_RETURN_NONE;
   26741             :         }
   26742           0 :         if (object->net_addr == NULL) {
   26743           0 :                 py_net_addr = Py_None;
   26744           0 :                 Py_INCREF(py_net_addr);
   26745             :         } else {
   26746           0 :                 if (object->net_addr == NULL) {
   26747           0 :                         py_net_addr = Py_None;
   26748           0 :                         Py_INCREF(py_net_addr);
   26749             :                 } else {
   26750           0 :                         py_net_addr = PyUnicode_Decode(object->net_addr, strlen(object->net_addr), "utf-8", "ignore");
   26751             :                 }
   26752             :         }
   26753           0 :         return py_net_addr;
   26754             : }
   26755             : 
   26756           0 : static int py_srvsvc_NetTransportInfo0_set_net_addr(PyObject *py_obj, PyObject *value, void *closure)
   26757             : {
   26758           0 :         struct srvsvc_NetTransportInfo0 *object = pytalloc_get_ptr(py_obj);
   26759           0 :         if (value == NULL) {
   26760           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->net_addr");
   26761           0 :                 return -1;
   26762             :         }
   26763           0 :         if (value == Py_None) {
   26764           0 :                 object->net_addr = NULL;
   26765             :         } else {
   26766           0 :                 object->net_addr = NULL;
   26767             :                 {
   26768           0 :                         const char *test_str;
   26769           0 :                         const char *talloc_str;
   26770           0 :                         PyObject *unicode = NULL;
   26771           0 :                         if (PyUnicode_Check(value)) {
   26772           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26773           0 :                                 if (unicode == NULL) {
   26774           0 :                                         return -1;
   26775             :                                 }
   26776           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26777           0 :                         } else if (PyBytes_Check(value)) {
   26778           0 :                                 test_str = PyBytes_AS_STRING(value);
   26779             :                         } else {
   26780           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26781           0 :                                 return -1;
   26782             :                         }
   26783           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26784           0 :                         if (unicode != NULL) {
   26785           0 :                                 Py_DECREF(unicode);
   26786             :                         }
   26787           0 :                         if (talloc_str == NULL) {
   26788           0 :                                 PyErr_NoMemory();
   26789           0 :                                 return -1;
   26790             :                         }
   26791           0 :                         object->net_addr = talloc_str;
   26792             :                 }
   26793             :         }
   26794           0 :         return 0;
   26795             : }
   26796             : 
   26797             : static PyGetSetDef py_srvsvc_NetTransportInfo0_getsetters[] = {
   26798             :         {
   26799             :                 .name = discard_const_p(char, "vcs"),
   26800             :                 .get = py_srvsvc_NetTransportInfo0_get_vcs,
   26801             :                 .set = py_srvsvc_NetTransportInfo0_set_vcs,
   26802             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26803             :         },
   26804             :         {
   26805             :                 .name = discard_const_p(char, "name"),
   26806             :                 .get = py_srvsvc_NetTransportInfo0_get_name,
   26807             :                 .set = py_srvsvc_NetTransportInfo0_set_name,
   26808             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26809             :         },
   26810             :         {
   26811             :                 .name = discard_const_p(char, "addr"),
   26812             :                 .get = py_srvsvc_NetTransportInfo0_get_addr,
   26813             :                 .set = py_srvsvc_NetTransportInfo0_set_addr,
   26814             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   26815             :         },
   26816             :         {
   26817             :                 .name = discard_const_p(char, "addr_len"),
   26818             :                 .get = py_srvsvc_NetTransportInfo0_get_addr_len,
   26819             :                 .set = py_srvsvc_NetTransportInfo0_set_addr_len,
   26820             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26821             :         },
   26822             :         {
   26823             :                 .name = discard_const_p(char, "net_addr"),
   26824             :                 .get = py_srvsvc_NetTransportInfo0_get_net_addr,
   26825             :                 .set = py_srvsvc_NetTransportInfo0_set_net_addr,
   26826             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26827             :         },
   26828             :         { .name = NULL }
   26829             : };
   26830             : 
   26831           0 : static PyObject *py_srvsvc_NetTransportInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26832             : {
   26833           0 :         return pytalloc_new(struct srvsvc_NetTransportInfo0, type);
   26834             : }
   26835             : 
   26836             : 
   26837             : static PyTypeObject srvsvc_NetTransportInfo0_Type = {
   26838             :         PyVarObject_HEAD_INIT(NULL, 0)
   26839             :         .tp_name = "srvsvc.NetTransportInfo0",
   26840             :         .tp_getset = py_srvsvc_NetTransportInfo0_getsetters,
   26841             :         .tp_methods = NULL,
   26842             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26843             :         .tp_new = py_srvsvc_NetTransportInfo0_new,
   26844             : };
   26845             : 
   26846             : 
   26847           0 : static PyObject *py_srvsvc_NetTransportCtr0_get_count(PyObject *obj, void *closure)
   26848             : {
   26849           0 :         struct srvsvc_NetTransportCtr0 *object = pytalloc_get_ptr(obj);
   26850           0 :         PyObject *py_count;
   26851           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   26852           0 :         return py_count;
   26853             : }
   26854             : 
   26855           0 : static int py_srvsvc_NetTransportCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
   26856             : {
   26857           0 :         struct srvsvc_NetTransportCtr0 *object = pytalloc_get_ptr(py_obj);
   26858           0 :         if (value == NULL) {
   26859           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
   26860           0 :                 return -1;
   26861             :         }
   26862             :         {
   26863           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   26864           0 :                 if (PyLong_Check(value)) {
   26865           0 :                         unsigned long long test_var;
   26866           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26867           0 :                         if (PyErr_Occurred() != NULL) {
   26868           0 :                                 return -1;
   26869             :                         }
   26870           0 :                         if (test_var > uint_max) {
   26871           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26872             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26873           0 :                                 return -1;
   26874             :                         }
   26875           0 :                         object->count = test_var;
   26876             :                 } else {
   26877           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26878             :                           PyLong_Type.tp_name);
   26879           0 :                         return -1;
   26880             :                 }
   26881             :         }
   26882           0 :         return 0;
   26883             : }
   26884             : 
   26885           0 : static PyObject *py_srvsvc_NetTransportCtr0_get_array(PyObject *obj, void *closure)
   26886             : {
   26887           0 :         struct srvsvc_NetTransportCtr0 *object = pytalloc_get_ptr(obj);
   26888           0 :         PyObject *py_array;
   26889           0 :         if (object->array == NULL) {
   26890           0 :                 Py_RETURN_NONE;
   26891             :         }
   26892           0 :         if (object->array == NULL) {
   26893           0 :                 py_array = Py_None;
   26894           0 :                 Py_INCREF(py_array);
   26895             :         } else {
   26896           0 :                 py_array = PyList_New(object->count);
   26897           0 :                 if (py_array == NULL) {
   26898           0 :                         return NULL;
   26899             :                 }
   26900             :                 {
   26901             :                         int array_cntr_1;
   26902           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   26903           0 :                                 PyObject *py_array_1;
   26904           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo0_Type, object->array, &(object->array)[array_cntr_1]);
   26905           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   26906             :                         }
   26907             :                 }
   26908             :         }
   26909           0 :         return py_array;
   26910             : }
   26911             : 
   26912           0 : static int py_srvsvc_NetTransportCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
   26913             : {
   26914           0 :         struct srvsvc_NetTransportCtr0 *object = pytalloc_get_ptr(py_obj);
   26915           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   26916           0 :         if (value == NULL) {
   26917           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
   26918           0 :                 return -1;
   26919             :         }
   26920           0 :         if (value == Py_None) {
   26921           0 :                 object->array = NULL;
   26922             :         } else {
   26923           0 :                 object->array = NULL;
   26924           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   26925             :                 {
   26926           0 :                         int array_cntr_1;
   26927           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   26928           0 :                         if (!object->array) { return -1; }
   26929           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   26930           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   26931           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   26932           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
   26933           0 :                                         return -1;
   26934             :                                 }
   26935           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   26936           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   26937           0 :                                         PyErr_NoMemory();
   26938           0 :                                         return -1;
   26939             :                                 }
   26940           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   26941             :                         }
   26942             :                 }
   26943             :         }
   26944           0 :         return 0;
   26945             : }
   26946             : 
   26947             : static PyGetSetDef py_srvsvc_NetTransportCtr0_getsetters[] = {
   26948             :         {
   26949             :                 .name = discard_const_p(char, "count"),
   26950             :                 .get = py_srvsvc_NetTransportCtr0_get_count,
   26951             :                 .set = py_srvsvc_NetTransportCtr0_set_count,
   26952             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26953             :         },
   26954             :         {
   26955             :                 .name = discard_const_p(char, "array"),
   26956             :                 .get = py_srvsvc_NetTransportCtr0_get_array,
   26957             :                 .set = py_srvsvc_NetTransportCtr0_set_array,
   26958             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo0")
   26959             :         },
   26960             :         { .name = NULL }
   26961             : };
   26962             : 
   26963           0 : static PyObject *py_srvsvc_NetTransportCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26964             : {
   26965           0 :         return pytalloc_new(struct srvsvc_NetTransportCtr0, type);
   26966             : }
   26967             : 
   26968             : 
   26969             : static PyTypeObject srvsvc_NetTransportCtr0_Type = {
   26970             :         PyVarObject_HEAD_INIT(NULL, 0)
   26971             :         .tp_name = "srvsvc.NetTransportCtr0",
   26972             :         .tp_getset = py_srvsvc_NetTransportCtr0_getsetters,
   26973             :         .tp_methods = NULL,
   26974             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26975             :         .tp_new = py_srvsvc_NetTransportCtr0_new,
   26976             : };
   26977             : 
   26978             : 
   26979           0 : static PyObject *py_srvsvc_NetTransportInfo1_get_vcs(PyObject *obj, void *closure)
   26980             : {
   26981           0 :         struct srvsvc_NetTransportInfo1 *object = pytalloc_get_ptr(obj);
   26982           0 :         PyObject *py_vcs;
   26983           0 :         py_vcs = PyLong_FromUnsignedLongLong((uint32_t)(object->vcs));
   26984           0 :         return py_vcs;
   26985             : }
   26986             : 
   26987           0 : static int py_srvsvc_NetTransportInfo1_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
   26988             : {
   26989           0 :         struct srvsvc_NetTransportInfo1 *object = pytalloc_get_ptr(py_obj);
   26990           0 :         if (value == NULL) {
   26991           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->vcs");
   26992           0 :                 return -1;
   26993             :         }
   26994             :         {
   26995           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
   26996           0 :                 if (PyLong_Check(value)) {
   26997           0 :                         unsigned long long test_var;
   26998           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26999           0 :                         if (PyErr_Occurred() != NULL) {
   27000           0 :                                 return -1;
   27001             :                         }
   27002           0 :                         if (test_var > uint_max) {
   27003           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27004             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27005           0 :                                 return -1;
   27006             :                         }
   27007           0 :                         object->vcs = test_var;
   27008             :                 } else {
   27009           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27010             :                           PyLong_Type.tp_name);
   27011           0 :                         return -1;
   27012             :                 }
   27013             :         }
   27014           0 :         return 0;
   27015             : }
   27016             : 
   27017           0 : static PyObject *py_srvsvc_NetTransportInfo1_get_name(PyObject *obj, void *closure)
   27018             : {
   27019           0 :         struct srvsvc_NetTransportInfo1 *object = pytalloc_get_ptr(obj);
   27020           0 :         PyObject *py_name;
   27021           0 :         if (object->name == NULL) {
   27022           0 :                 Py_RETURN_NONE;
   27023             :         }
   27024           0 :         if (object->name == NULL) {
   27025           0 :                 py_name = Py_None;
   27026           0 :                 Py_INCREF(py_name);
   27027             :         } else {
   27028           0 :                 if (object->name == NULL) {
   27029           0 :                         py_name = Py_None;
   27030           0 :                         Py_INCREF(py_name);
   27031             :                 } else {
   27032           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
   27033             :                 }
   27034             :         }
   27035           0 :         return py_name;
   27036             : }
   27037             : 
   27038           0 : static int py_srvsvc_NetTransportInfo1_set_name(PyObject *py_obj, PyObject *value, void *closure)
   27039             : {
   27040           0 :         struct srvsvc_NetTransportInfo1 *object = pytalloc_get_ptr(py_obj);
   27041           0 :         if (value == NULL) {
   27042           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->name");
   27043           0 :                 return -1;
   27044             :         }
   27045           0 :         if (value == Py_None) {
   27046           0 :                 object->name = NULL;
   27047             :         } else {
   27048           0 :                 object->name = NULL;
   27049             :                 {
   27050           0 :                         const char *test_str;
   27051           0 :                         const char *talloc_str;
   27052           0 :                         PyObject *unicode = NULL;
   27053           0 :                         if (PyUnicode_Check(value)) {
   27054           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27055           0 :                                 if (unicode == NULL) {
   27056           0 :                                         return -1;
   27057             :                                 }
   27058           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27059           0 :                         } else if (PyBytes_Check(value)) {
   27060           0 :                                 test_str = PyBytes_AS_STRING(value);
   27061             :                         } else {
   27062           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27063           0 :                                 return -1;
   27064             :                         }
   27065           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27066           0 :                         if (unicode != NULL) {
   27067           0 :                                 Py_DECREF(unicode);
   27068             :                         }
   27069           0 :                         if (talloc_str == NULL) {
   27070           0 :                                 PyErr_NoMemory();
   27071           0 :                                 return -1;
   27072             :                         }
   27073           0 :                         object->name = talloc_str;
   27074             :                 }
   27075             :         }
   27076           0 :         return 0;
   27077             : }
   27078             : 
   27079           0 : static PyObject *py_srvsvc_NetTransportInfo1_get_addr(PyObject *obj, void *closure)
   27080             : {
   27081           0 :         struct srvsvc_NetTransportInfo1 *object = pytalloc_get_ptr(obj);
   27082           0 :         PyObject *py_addr;
   27083           0 :         if (object->addr == NULL) {
   27084           0 :                 Py_RETURN_NONE;
   27085             :         }
   27086           0 :         if (object->addr == NULL) {
   27087           0 :                 py_addr = Py_None;
   27088           0 :                 Py_INCREF(py_addr);
   27089             :         } else {
   27090           0 :                 py_addr = PyList_New(object->addr_len);
   27091           0 :                 if (py_addr == NULL) {
   27092           0 :                         return NULL;
   27093             :                 }
   27094             :                 {
   27095             :                         int addr_cntr_1;
   27096           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
   27097           0 :                                 PyObject *py_addr_1;
   27098           0 :                                 py_addr_1 = PyLong_FromLong((uint16_t)((object->addr)[addr_cntr_1]));
   27099           0 :                                 PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
   27100             :                         }
   27101             :                 }
   27102             :         }
   27103           0 :         return py_addr;
   27104             : }
   27105             : 
   27106           0 : static int py_srvsvc_NetTransportInfo1_set_addr(PyObject *py_obj, PyObject *value, void *closure)
   27107             : {
   27108           0 :         struct srvsvc_NetTransportInfo1 *object = pytalloc_get_ptr(py_obj);
   27109           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
   27110           0 :         if (value == NULL) {
   27111           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->addr");
   27112           0 :                 return -1;
   27113             :         }
   27114           0 :         if (value == Py_None) {
   27115           0 :                 object->addr = NULL;
   27116             :         } else {
   27117           0 :                 object->addr = NULL;
   27118           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   27119             :                 {
   27120           0 :                         int addr_cntr_1;
   27121           0 :                         object->addr = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->addr, PyList_GET_SIZE(value));
   27122           0 :                         if (!object->addr) { return -1; }
   27123           0 :                         talloc_set_name_const(object->addr, "ARRAY: object->addr");
   27124           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
   27125           0 :                                 if (PyList_GET_ITEM(value, addr_cntr_1) == NULL) {
   27126           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->addr)[addr_cntr_1]");
   27127           0 :                                         return -1;
   27128             :                                 }
   27129             :                                 {
   27130           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->addr)[addr_cntr_1]));
   27131           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
   27132           0 :                                                 unsigned long long test_var;
   27133           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
   27134           0 :                                                 if (PyErr_Occurred() != NULL) {
   27135           0 :                                                         return -1;
   27136             :                                                 }
   27137           0 :                                                 if (test_var > uint_max) {
   27138           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27139             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   27140           0 :                                                         return -1;
   27141             :                                                 }
   27142           0 :                                                 (object->addr)[addr_cntr_1] = test_var;
   27143             :                                         } else {
   27144           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   27145             :                                                   PyLong_Type.tp_name);
   27146           0 :                                                 return -1;
   27147             :                                         }
   27148             :                                 }
   27149             :                         }
   27150             :                 }
   27151             :         }
   27152           0 :         return 0;
   27153             : }
   27154             : 
   27155           0 : static PyObject *py_srvsvc_NetTransportInfo1_get_addr_len(PyObject *obj, void *closure)
   27156             : {
   27157           0 :         struct srvsvc_NetTransportInfo1 *object = pytalloc_get_ptr(obj);
   27158           0 :         PyObject *py_addr_len;
   27159           0 :         py_addr_len = PyLong_FromUnsignedLongLong((uint32_t)(object->addr_len));
   27160           0 :         return py_addr_len;
   27161             : }
   27162             : 
   27163           0 : static int py_srvsvc_NetTransportInfo1_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
   27164             : {
   27165           0 :         struct srvsvc_NetTransportInfo1 *object = pytalloc_get_ptr(py_obj);
   27166           0 :         if (value == NULL) {
   27167           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->addr_len");
   27168           0 :                 return -1;
   27169             :         }
   27170             :         {
   27171           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
   27172           0 :                 if (PyLong_Check(value)) {
   27173           0 :                         unsigned long long test_var;
   27174           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27175           0 :                         if (PyErr_Occurred() != NULL) {
   27176           0 :                                 return -1;
   27177             :                         }
   27178           0 :                         if (test_var > uint_max) {
   27179           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27180             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27181           0 :                                 return -1;
   27182             :                         }
   27183           0 :                         object->addr_len = test_var;
   27184             :                 } else {
   27185           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27186             :                           PyLong_Type.tp_name);
   27187           0 :                         return -1;
   27188             :                 }
   27189             :         }
   27190           0 :         return 0;
   27191             : }
   27192             : 
   27193           0 : static PyObject *py_srvsvc_NetTransportInfo1_get_net_addr(PyObject *obj, void *closure)
   27194             : {
   27195           0 :         struct srvsvc_NetTransportInfo1 *object = pytalloc_get_ptr(obj);
   27196           0 :         PyObject *py_net_addr;
   27197           0 :         if (object->net_addr == NULL) {
   27198           0 :                 Py_RETURN_NONE;
   27199             :         }
   27200           0 :         if (object->net_addr == NULL) {
   27201           0 :                 py_net_addr = Py_None;
   27202           0 :                 Py_INCREF(py_net_addr);
   27203             :         } else {
   27204           0 :                 if (object->net_addr == NULL) {
   27205           0 :                         py_net_addr = Py_None;
   27206           0 :                         Py_INCREF(py_net_addr);
   27207             :                 } else {
   27208           0 :                         py_net_addr = PyUnicode_Decode(object->net_addr, strlen(object->net_addr), "utf-8", "ignore");
   27209             :                 }
   27210             :         }
   27211           0 :         return py_net_addr;
   27212             : }
   27213             : 
   27214           0 : static int py_srvsvc_NetTransportInfo1_set_net_addr(PyObject *py_obj, PyObject *value, void *closure)
   27215             : {
   27216           0 :         struct srvsvc_NetTransportInfo1 *object = pytalloc_get_ptr(py_obj);
   27217           0 :         if (value == NULL) {
   27218           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->net_addr");
   27219           0 :                 return -1;
   27220             :         }
   27221           0 :         if (value == Py_None) {
   27222           0 :                 object->net_addr = NULL;
   27223             :         } else {
   27224           0 :                 object->net_addr = NULL;
   27225             :                 {
   27226           0 :                         const char *test_str;
   27227           0 :                         const char *talloc_str;
   27228           0 :                         PyObject *unicode = NULL;
   27229           0 :                         if (PyUnicode_Check(value)) {
   27230           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27231           0 :                                 if (unicode == NULL) {
   27232           0 :                                         return -1;
   27233             :                                 }
   27234           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27235           0 :                         } else if (PyBytes_Check(value)) {
   27236           0 :                                 test_str = PyBytes_AS_STRING(value);
   27237             :                         } else {
   27238           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27239           0 :                                 return -1;
   27240             :                         }
   27241           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27242           0 :                         if (unicode != NULL) {
   27243           0 :                                 Py_DECREF(unicode);
   27244             :                         }
   27245           0 :                         if (talloc_str == NULL) {
   27246           0 :                                 PyErr_NoMemory();
   27247           0 :                                 return -1;
   27248             :                         }
   27249           0 :                         object->net_addr = talloc_str;
   27250             :                 }
   27251             :         }
   27252           0 :         return 0;
   27253             : }
   27254             : 
   27255           0 : static PyObject *py_srvsvc_NetTransportInfo1_get_domain(PyObject *obj, void *closure)
   27256             : {
   27257           0 :         struct srvsvc_NetTransportInfo1 *object = pytalloc_get_ptr(obj);
   27258           0 :         PyObject *py_domain;
   27259           0 :         if (object->domain == NULL) {
   27260           0 :                 Py_RETURN_NONE;
   27261             :         }
   27262           0 :         if (object->domain == NULL) {
   27263           0 :                 py_domain = Py_None;
   27264           0 :                 Py_INCREF(py_domain);
   27265             :         } else {
   27266           0 :                 if (object->domain == NULL) {
   27267           0 :                         py_domain = Py_None;
   27268           0 :                         Py_INCREF(py_domain);
   27269             :                 } else {
   27270           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
   27271             :                 }
   27272             :         }
   27273           0 :         return py_domain;
   27274             : }
   27275             : 
   27276           0 : static int py_srvsvc_NetTransportInfo1_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   27277             : {
   27278           0 :         struct srvsvc_NetTransportInfo1 *object = pytalloc_get_ptr(py_obj);
   27279           0 :         if (value == NULL) {
   27280           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain");
   27281           0 :                 return -1;
   27282             :         }
   27283           0 :         if (value == Py_None) {
   27284           0 :                 object->domain = NULL;
   27285             :         } else {
   27286           0 :                 object->domain = NULL;
   27287             :                 {
   27288           0 :                         const char *test_str;
   27289           0 :                         const char *talloc_str;
   27290           0 :                         PyObject *unicode = NULL;
   27291           0 :                         if (PyUnicode_Check(value)) {
   27292           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27293           0 :                                 if (unicode == NULL) {
   27294           0 :                                         return -1;
   27295             :                                 }
   27296           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27297           0 :                         } else if (PyBytes_Check(value)) {
   27298           0 :                                 test_str = PyBytes_AS_STRING(value);
   27299             :                         } else {
   27300           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27301           0 :                                 return -1;
   27302             :                         }
   27303           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27304           0 :                         if (unicode != NULL) {
   27305           0 :                                 Py_DECREF(unicode);
   27306             :                         }
   27307           0 :                         if (talloc_str == NULL) {
   27308           0 :                                 PyErr_NoMemory();
   27309           0 :                                 return -1;
   27310             :                         }
   27311           0 :                         object->domain = talloc_str;
   27312             :                 }
   27313             :         }
   27314           0 :         return 0;
   27315             : }
   27316             : 
   27317             : static PyGetSetDef py_srvsvc_NetTransportInfo1_getsetters[] = {
   27318             :         {
   27319             :                 .name = discard_const_p(char, "vcs"),
   27320             :                 .get = py_srvsvc_NetTransportInfo1_get_vcs,
   27321             :                 .set = py_srvsvc_NetTransportInfo1_set_vcs,
   27322             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27323             :         },
   27324             :         {
   27325             :                 .name = discard_const_p(char, "name"),
   27326             :                 .get = py_srvsvc_NetTransportInfo1_get_name,
   27327             :                 .set = py_srvsvc_NetTransportInfo1_set_name,
   27328             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27329             :         },
   27330             :         {
   27331             :                 .name = discard_const_p(char, "addr"),
   27332             :                 .get = py_srvsvc_NetTransportInfo1_get_addr,
   27333             :                 .set = py_srvsvc_NetTransportInfo1_set_addr,
   27334             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   27335             :         },
   27336             :         {
   27337             :                 .name = discard_const_p(char, "addr_len"),
   27338             :                 .get = py_srvsvc_NetTransportInfo1_get_addr_len,
   27339             :                 .set = py_srvsvc_NetTransportInfo1_set_addr_len,
   27340             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27341             :         },
   27342             :         {
   27343             :                 .name = discard_const_p(char, "net_addr"),
   27344             :                 .get = py_srvsvc_NetTransportInfo1_get_net_addr,
   27345             :                 .set = py_srvsvc_NetTransportInfo1_set_net_addr,
   27346             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27347             :         },
   27348             :         {
   27349             :                 .name = discard_const_p(char, "domain"),
   27350             :                 .get = py_srvsvc_NetTransportInfo1_get_domain,
   27351             :                 .set = py_srvsvc_NetTransportInfo1_set_domain,
   27352             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27353             :         },
   27354             :         { .name = NULL }
   27355             : };
   27356             : 
   27357           0 : static PyObject *py_srvsvc_NetTransportInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27358             : {
   27359           0 :         return pytalloc_new(struct srvsvc_NetTransportInfo1, type);
   27360             : }
   27361             : 
   27362             : 
   27363             : static PyTypeObject srvsvc_NetTransportInfo1_Type = {
   27364             :         PyVarObject_HEAD_INIT(NULL, 0)
   27365             :         .tp_name = "srvsvc.NetTransportInfo1",
   27366             :         .tp_getset = py_srvsvc_NetTransportInfo1_getsetters,
   27367             :         .tp_methods = NULL,
   27368             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27369             :         .tp_new = py_srvsvc_NetTransportInfo1_new,
   27370             : };
   27371             : 
   27372             : 
   27373           0 : static PyObject *py_srvsvc_NetTransportCtr1_get_count(PyObject *obj, void *closure)
   27374             : {
   27375           0 :         struct srvsvc_NetTransportCtr1 *object = pytalloc_get_ptr(obj);
   27376           0 :         PyObject *py_count;
   27377           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   27378           0 :         return py_count;
   27379             : }
   27380             : 
   27381           0 : static int py_srvsvc_NetTransportCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
   27382             : {
   27383           0 :         struct srvsvc_NetTransportCtr1 *object = pytalloc_get_ptr(py_obj);
   27384           0 :         if (value == NULL) {
   27385           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
   27386           0 :                 return -1;
   27387             :         }
   27388             :         {
   27389           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   27390           0 :                 if (PyLong_Check(value)) {
   27391           0 :                         unsigned long long test_var;
   27392           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27393           0 :                         if (PyErr_Occurred() != NULL) {
   27394           0 :                                 return -1;
   27395             :                         }
   27396           0 :                         if (test_var > uint_max) {
   27397           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27398             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27399           0 :                                 return -1;
   27400             :                         }
   27401           0 :                         object->count = test_var;
   27402             :                 } else {
   27403           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27404             :                           PyLong_Type.tp_name);
   27405           0 :                         return -1;
   27406             :                 }
   27407             :         }
   27408           0 :         return 0;
   27409             : }
   27410             : 
   27411           0 : static PyObject *py_srvsvc_NetTransportCtr1_get_array(PyObject *obj, void *closure)
   27412             : {
   27413           0 :         struct srvsvc_NetTransportCtr1 *object = pytalloc_get_ptr(obj);
   27414           0 :         PyObject *py_array;
   27415           0 :         if (object->array == NULL) {
   27416           0 :                 Py_RETURN_NONE;
   27417             :         }
   27418           0 :         if (object->array == NULL) {
   27419           0 :                 py_array = Py_None;
   27420           0 :                 Py_INCREF(py_array);
   27421             :         } else {
   27422           0 :                 py_array = PyList_New(object->count);
   27423           0 :                 if (py_array == NULL) {
   27424           0 :                         return NULL;
   27425             :                 }
   27426             :                 {
   27427             :                         int array_cntr_1;
   27428           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   27429           0 :                                 PyObject *py_array_1;
   27430           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo1_Type, object->array, &(object->array)[array_cntr_1]);
   27431           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   27432             :                         }
   27433             :                 }
   27434             :         }
   27435           0 :         return py_array;
   27436             : }
   27437             : 
   27438           0 : static int py_srvsvc_NetTransportCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
   27439             : {
   27440           0 :         struct srvsvc_NetTransportCtr1 *object = pytalloc_get_ptr(py_obj);
   27441           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   27442           0 :         if (value == NULL) {
   27443           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
   27444           0 :                 return -1;
   27445             :         }
   27446           0 :         if (value == Py_None) {
   27447           0 :                 object->array = NULL;
   27448             :         } else {
   27449           0 :                 object->array = NULL;
   27450           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   27451             :                 {
   27452           0 :                         int array_cntr_1;
   27453           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   27454           0 :                         if (!object->array) { return -1; }
   27455           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   27456           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   27457           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   27458           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
   27459           0 :                                         return -1;
   27460             :                                 }
   27461           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   27462           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   27463           0 :                                         PyErr_NoMemory();
   27464           0 :                                         return -1;
   27465             :                                 }
   27466           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   27467             :                         }
   27468             :                 }
   27469             :         }
   27470           0 :         return 0;
   27471             : }
   27472             : 
   27473             : static PyGetSetDef py_srvsvc_NetTransportCtr1_getsetters[] = {
   27474             :         {
   27475             :                 .name = discard_const_p(char, "count"),
   27476             :                 .get = py_srvsvc_NetTransportCtr1_get_count,
   27477             :                 .set = py_srvsvc_NetTransportCtr1_set_count,
   27478             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27479             :         },
   27480             :         {
   27481             :                 .name = discard_const_p(char, "array"),
   27482             :                 .get = py_srvsvc_NetTransportCtr1_get_array,
   27483             :                 .set = py_srvsvc_NetTransportCtr1_set_array,
   27484             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo1")
   27485             :         },
   27486             :         { .name = NULL }
   27487             : };
   27488             : 
   27489           0 : static PyObject *py_srvsvc_NetTransportCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27490             : {
   27491           0 :         return pytalloc_new(struct srvsvc_NetTransportCtr1, type);
   27492             : }
   27493             : 
   27494             : 
   27495             : static PyTypeObject srvsvc_NetTransportCtr1_Type = {
   27496             :         PyVarObject_HEAD_INIT(NULL, 0)
   27497             :         .tp_name = "srvsvc.NetTransportCtr1",
   27498             :         .tp_getset = py_srvsvc_NetTransportCtr1_getsetters,
   27499             :         .tp_methods = NULL,
   27500             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27501             :         .tp_new = py_srvsvc_NetTransportCtr1_new,
   27502             : };
   27503             : 
   27504             : 
   27505           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_vcs(PyObject *obj, void *closure)
   27506             : {
   27507           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(obj);
   27508           0 :         PyObject *py_vcs;
   27509           0 :         py_vcs = PyLong_FromUnsignedLongLong((uint32_t)(object->vcs));
   27510           0 :         return py_vcs;
   27511             : }
   27512             : 
   27513           0 : static int py_srvsvc_NetTransportInfo2_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
   27514             : {
   27515           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(py_obj);
   27516           0 :         if (value == NULL) {
   27517           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->vcs");
   27518           0 :                 return -1;
   27519             :         }
   27520             :         {
   27521           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
   27522           0 :                 if (PyLong_Check(value)) {
   27523           0 :                         unsigned long long test_var;
   27524           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27525           0 :                         if (PyErr_Occurred() != NULL) {
   27526           0 :                                 return -1;
   27527             :                         }
   27528           0 :                         if (test_var > uint_max) {
   27529           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27530             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27531           0 :                                 return -1;
   27532             :                         }
   27533           0 :                         object->vcs = test_var;
   27534             :                 } else {
   27535           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27536             :                           PyLong_Type.tp_name);
   27537           0 :                         return -1;
   27538             :                 }
   27539             :         }
   27540           0 :         return 0;
   27541             : }
   27542             : 
   27543           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_name(PyObject *obj, void *closure)
   27544             : {
   27545           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(obj);
   27546           0 :         PyObject *py_name;
   27547           0 :         if (object->name == NULL) {
   27548           0 :                 Py_RETURN_NONE;
   27549             :         }
   27550           0 :         if (object->name == NULL) {
   27551           0 :                 py_name = Py_None;
   27552           0 :                 Py_INCREF(py_name);
   27553             :         } else {
   27554           0 :                 if (object->name == NULL) {
   27555           0 :                         py_name = Py_None;
   27556           0 :                         Py_INCREF(py_name);
   27557             :                 } else {
   27558           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
   27559             :                 }
   27560             :         }
   27561           0 :         return py_name;
   27562             : }
   27563             : 
   27564           0 : static int py_srvsvc_NetTransportInfo2_set_name(PyObject *py_obj, PyObject *value, void *closure)
   27565             : {
   27566           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(py_obj);
   27567           0 :         if (value == NULL) {
   27568           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->name");
   27569           0 :                 return -1;
   27570             :         }
   27571           0 :         if (value == Py_None) {
   27572           0 :                 object->name = NULL;
   27573             :         } else {
   27574           0 :                 object->name = NULL;
   27575             :                 {
   27576           0 :                         const char *test_str;
   27577           0 :                         const char *talloc_str;
   27578           0 :                         PyObject *unicode = NULL;
   27579           0 :                         if (PyUnicode_Check(value)) {
   27580           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27581           0 :                                 if (unicode == NULL) {
   27582           0 :                                         return -1;
   27583             :                                 }
   27584           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27585           0 :                         } else if (PyBytes_Check(value)) {
   27586           0 :                                 test_str = PyBytes_AS_STRING(value);
   27587             :                         } else {
   27588           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27589           0 :                                 return -1;
   27590             :                         }
   27591           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27592           0 :                         if (unicode != NULL) {
   27593           0 :                                 Py_DECREF(unicode);
   27594             :                         }
   27595           0 :                         if (talloc_str == NULL) {
   27596           0 :                                 PyErr_NoMemory();
   27597           0 :                                 return -1;
   27598             :                         }
   27599           0 :                         object->name = talloc_str;
   27600             :                 }
   27601             :         }
   27602           0 :         return 0;
   27603             : }
   27604             : 
   27605           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_addr(PyObject *obj, void *closure)
   27606             : {
   27607           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(obj);
   27608           0 :         PyObject *py_addr;
   27609           0 :         if (object->addr == NULL) {
   27610           0 :                 Py_RETURN_NONE;
   27611             :         }
   27612           0 :         if (object->addr == NULL) {
   27613           0 :                 py_addr = Py_None;
   27614           0 :                 Py_INCREF(py_addr);
   27615             :         } else {
   27616           0 :                 py_addr = PyList_New(object->addr_len);
   27617           0 :                 if (py_addr == NULL) {
   27618           0 :                         return NULL;
   27619             :                 }
   27620             :                 {
   27621             :                         int addr_cntr_1;
   27622           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
   27623           0 :                                 PyObject *py_addr_1;
   27624           0 :                                 py_addr_1 = PyLong_FromLong((uint16_t)((object->addr)[addr_cntr_1]));
   27625           0 :                                 PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
   27626             :                         }
   27627             :                 }
   27628             :         }
   27629           0 :         return py_addr;
   27630             : }
   27631             : 
   27632           0 : static int py_srvsvc_NetTransportInfo2_set_addr(PyObject *py_obj, PyObject *value, void *closure)
   27633             : {
   27634           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(py_obj);
   27635           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
   27636           0 :         if (value == NULL) {
   27637           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->addr");
   27638           0 :                 return -1;
   27639             :         }
   27640           0 :         if (value == Py_None) {
   27641           0 :                 object->addr = NULL;
   27642             :         } else {
   27643           0 :                 object->addr = NULL;
   27644           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   27645             :                 {
   27646           0 :                         int addr_cntr_1;
   27647           0 :                         object->addr = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->addr, PyList_GET_SIZE(value));
   27648           0 :                         if (!object->addr) { return -1; }
   27649           0 :                         talloc_set_name_const(object->addr, "ARRAY: object->addr");
   27650           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
   27651           0 :                                 if (PyList_GET_ITEM(value, addr_cntr_1) == NULL) {
   27652           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->addr)[addr_cntr_1]");
   27653           0 :                                         return -1;
   27654             :                                 }
   27655             :                                 {
   27656           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->addr)[addr_cntr_1]));
   27657           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
   27658           0 :                                                 unsigned long long test_var;
   27659           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
   27660           0 :                                                 if (PyErr_Occurred() != NULL) {
   27661           0 :                                                         return -1;
   27662             :                                                 }
   27663           0 :                                                 if (test_var > uint_max) {
   27664           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27665             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   27666           0 :                                                         return -1;
   27667             :                                                 }
   27668           0 :                                                 (object->addr)[addr_cntr_1] = test_var;
   27669             :                                         } else {
   27670           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   27671             :                                                   PyLong_Type.tp_name);
   27672           0 :                                                 return -1;
   27673             :                                         }
   27674             :                                 }
   27675             :                         }
   27676             :                 }
   27677             :         }
   27678           0 :         return 0;
   27679             : }
   27680             : 
   27681           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_addr_len(PyObject *obj, void *closure)
   27682             : {
   27683           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(obj);
   27684           0 :         PyObject *py_addr_len;
   27685           0 :         py_addr_len = PyLong_FromUnsignedLongLong((uint32_t)(object->addr_len));
   27686           0 :         return py_addr_len;
   27687             : }
   27688             : 
   27689           0 : static int py_srvsvc_NetTransportInfo2_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
   27690             : {
   27691           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(py_obj);
   27692           0 :         if (value == NULL) {
   27693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->addr_len");
   27694           0 :                 return -1;
   27695             :         }
   27696             :         {
   27697           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
   27698           0 :                 if (PyLong_Check(value)) {
   27699           0 :                         unsigned long long test_var;
   27700           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27701           0 :                         if (PyErr_Occurred() != NULL) {
   27702           0 :                                 return -1;
   27703             :                         }
   27704           0 :                         if (test_var > uint_max) {
   27705           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27706             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27707           0 :                                 return -1;
   27708             :                         }
   27709           0 :                         object->addr_len = test_var;
   27710             :                 } else {
   27711           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27712             :                           PyLong_Type.tp_name);
   27713           0 :                         return -1;
   27714             :                 }
   27715             :         }
   27716           0 :         return 0;
   27717             : }
   27718             : 
   27719           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_net_addr(PyObject *obj, void *closure)
   27720             : {
   27721           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(obj);
   27722           0 :         PyObject *py_net_addr;
   27723           0 :         if (object->net_addr == NULL) {
   27724           0 :                 Py_RETURN_NONE;
   27725             :         }
   27726           0 :         if (object->net_addr == NULL) {
   27727           0 :                 py_net_addr = Py_None;
   27728           0 :                 Py_INCREF(py_net_addr);
   27729             :         } else {
   27730           0 :                 if (object->net_addr == NULL) {
   27731           0 :                         py_net_addr = Py_None;
   27732           0 :                         Py_INCREF(py_net_addr);
   27733             :                 } else {
   27734           0 :                         py_net_addr = PyUnicode_Decode(object->net_addr, strlen(object->net_addr), "utf-8", "ignore");
   27735             :                 }
   27736             :         }
   27737           0 :         return py_net_addr;
   27738             : }
   27739             : 
   27740           0 : static int py_srvsvc_NetTransportInfo2_set_net_addr(PyObject *py_obj, PyObject *value, void *closure)
   27741             : {
   27742           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(py_obj);
   27743           0 :         if (value == NULL) {
   27744           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->net_addr");
   27745           0 :                 return -1;
   27746             :         }
   27747           0 :         if (value == Py_None) {
   27748           0 :                 object->net_addr = NULL;
   27749             :         } else {
   27750           0 :                 object->net_addr = NULL;
   27751             :                 {
   27752           0 :                         const char *test_str;
   27753           0 :                         const char *talloc_str;
   27754           0 :                         PyObject *unicode = NULL;
   27755           0 :                         if (PyUnicode_Check(value)) {
   27756           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27757           0 :                                 if (unicode == NULL) {
   27758           0 :                                         return -1;
   27759             :                                 }
   27760           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27761           0 :                         } else if (PyBytes_Check(value)) {
   27762           0 :                                 test_str = PyBytes_AS_STRING(value);
   27763             :                         } else {
   27764           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27765           0 :                                 return -1;
   27766             :                         }
   27767           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27768           0 :                         if (unicode != NULL) {
   27769           0 :                                 Py_DECREF(unicode);
   27770             :                         }
   27771           0 :                         if (talloc_str == NULL) {
   27772           0 :                                 PyErr_NoMemory();
   27773           0 :                                 return -1;
   27774             :                         }
   27775           0 :                         object->net_addr = talloc_str;
   27776             :                 }
   27777             :         }
   27778           0 :         return 0;
   27779             : }
   27780             : 
   27781           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_domain(PyObject *obj, void *closure)
   27782             : {
   27783           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(obj);
   27784           0 :         PyObject *py_domain;
   27785           0 :         if (object->domain == NULL) {
   27786           0 :                 Py_RETURN_NONE;
   27787             :         }
   27788           0 :         if (object->domain == NULL) {
   27789           0 :                 py_domain = Py_None;
   27790           0 :                 Py_INCREF(py_domain);
   27791             :         } else {
   27792           0 :                 if (object->domain == NULL) {
   27793           0 :                         py_domain = Py_None;
   27794           0 :                         Py_INCREF(py_domain);
   27795             :                 } else {
   27796           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
   27797             :                 }
   27798             :         }
   27799           0 :         return py_domain;
   27800             : }
   27801             : 
   27802           0 : static int py_srvsvc_NetTransportInfo2_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   27803             : {
   27804           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(py_obj);
   27805           0 :         if (value == NULL) {
   27806           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain");
   27807           0 :                 return -1;
   27808             :         }
   27809           0 :         if (value == Py_None) {
   27810           0 :                 object->domain = NULL;
   27811             :         } else {
   27812           0 :                 object->domain = NULL;
   27813             :                 {
   27814           0 :                         const char *test_str;
   27815           0 :                         const char *talloc_str;
   27816           0 :                         PyObject *unicode = NULL;
   27817           0 :                         if (PyUnicode_Check(value)) {
   27818           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27819           0 :                                 if (unicode == NULL) {
   27820           0 :                                         return -1;
   27821             :                                 }
   27822           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27823           0 :                         } else if (PyBytes_Check(value)) {
   27824           0 :                                 test_str = PyBytes_AS_STRING(value);
   27825             :                         } else {
   27826           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27827           0 :                                 return -1;
   27828             :                         }
   27829           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27830           0 :                         if (unicode != NULL) {
   27831           0 :                                 Py_DECREF(unicode);
   27832             :                         }
   27833           0 :                         if (talloc_str == NULL) {
   27834           0 :                                 PyErr_NoMemory();
   27835           0 :                                 return -1;
   27836             :                         }
   27837           0 :                         object->domain = talloc_str;
   27838             :                 }
   27839             :         }
   27840           0 :         return 0;
   27841             : }
   27842             : 
   27843           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_unknown(PyObject *obj, void *closure)
   27844             : {
   27845           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(obj);
   27846           0 :         PyObject *py_unknown;
   27847           0 :         py_unknown = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown));
   27848           0 :         return py_unknown;
   27849             : }
   27850             : 
   27851           0 : static int py_srvsvc_NetTransportInfo2_set_unknown(PyObject *py_obj, PyObject *value, void *closure)
   27852             : {
   27853           0 :         struct srvsvc_NetTransportInfo2 *object = pytalloc_get_ptr(py_obj);
   27854           0 :         if (value == NULL) {
   27855           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown");
   27856           0 :                 return -1;
   27857             :         }
   27858             :         {
   27859           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown));
   27860           0 :                 if (PyLong_Check(value)) {
   27861           0 :                         unsigned long long test_var;
   27862           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27863           0 :                         if (PyErr_Occurred() != NULL) {
   27864           0 :                                 return -1;
   27865             :                         }
   27866           0 :                         if (test_var > uint_max) {
   27867           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27868             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27869           0 :                                 return -1;
   27870             :                         }
   27871           0 :                         object->unknown = test_var;
   27872             :                 } else {
   27873           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27874             :                           PyLong_Type.tp_name);
   27875           0 :                         return -1;
   27876             :                 }
   27877             :         }
   27878           0 :         return 0;
   27879             : }
   27880             : 
   27881             : static PyGetSetDef py_srvsvc_NetTransportInfo2_getsetters[] = {
   27882             :         {
   27883             :                 .name = discard_const_p(char, "vcs"),
   27884             :                 .get = py_srvsvc_NetTransportInfo2_get_vcs,
   27885             :                 .set = py_srvsvc_NetTransportInfo2_set_vcs,
   27886             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27887             :         },
   27888             :         {
   27889             :                 .name = discard_const_p(char, "name"),
   27890             :                 .get = py_srvsvc_NetTransportInfo2_get_name,
   27891             :                 .set = py_srvsvc_NetTransportInfo2_set_name,
   27892             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27893             :         },
   27894             :         {
   27895             :                 .name = discard_const_p(char, "addr"),
   27896             :                 .get = py_srvsvc_NetTransportInfo2_get_addr,
   27897             :                 .set = py_srvsvc_NetTransportInfo2_set_addr,
   27898             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   27899             :         },
   27900             :         {
   27901             :                 .name = discard_const_p(char, "addr_len"),
   27902             :                 .get = py_srvsvc_NetTransportInfo2_get_addr_len,
   27903             :                 .set = py_srvsvc_NetTransportInfo2_set_addr_len,
   27904             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27905             :         },
   27906             :         {
   27907             :                 .name = discard_const_p(char, "net_addr"),
   27908             :                 .get = py_srvsvc_NetTransportInfo2_get_net_addr,
   27909             :                 .set = py_srvsvc_NetTransportInfo2_set_net_addr,
   27910             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27911             :         },
   27912             :         {
   27913             :                 .name = discard_const_p(char, "domain"),
   27914             :                 .get = py_srvsvc_NetTransportInfo2_get_domain,
   27915             :                 .set = py_srvsvc_NetTransportInfo2_set_domain,
   27916             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27917             :         },
   27918             :         {
   27919             :                 .name = discard_const_p(char, "unknown"),
   27920             :                 .get = py_srvsvc_NetTransportInfo2_get_unknown,
   27921             :                 .set = py_srvsvc_NetTransportInfo2_set_unknown,
   27922             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27923             :         },
   27924             :         { .name = NULL }
   27925             : };
   27926             : 
   27927           0 : static PyObject *py_srvsvc_NetTransportInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27928             : {
   27929           0 :         return pytalloc_new(struct srvsvc_NetTransportInfo2, type);
   27930             : }
   27931             : 
   27932             : 
   27933             : static PyTypeObject srvsvc_NetTransportInfo2_Type = {
   27934             :         PyVarObject_HEAD_INIT(NULL, 0)
   27935             :         .tp_name = "srvsvc.NetTransportInfo2",
   27936             :         .tp_getset = py_srvsvc_NetTransportInfo2_getsetters,
   27937             :         .tp_methods = NULL,
   27938             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27939             :         .tp_new = py_srvsvc_NetTransportInfo2_new,
   27940             : };
   27941             : 
   27942             : 
   27943           0 : static PyObject *py_srvsvc_NetTransportCtr2_get_count(PyObject *obj, void *closure)
   27944             : {
   27945           0 :         struct srvsvc_NetTransportCtr2 *object = pytalloc_get_ptr(obj);
   27946           0 :         PyObject *py_count;
   27947           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   27948           0 :         return py_count;
   27949             : }
   27950             : 
   27951           0 : static int py_srvsvc_NetTransportCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
   27952             : {
   27953           0 :         struct srvsvc_NetTransportCtr2 *object = pytalloc_get_ptr(py_obj);
   27954           0 :         if (value == NULL) {
   27955           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
   27956           0 :                 return -1;
   27957             :         }
   27958             :         {
   27959           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   27960           0 :                 if (PyLong_Check(value)) {
   27961           0 :                         unsigned long long test_var;
   27962           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27963           0 :                         if (PyErr_Occurred() != NULL) {
   27964           0 :                                 return -1;
   27965             :                         }
   27966           0 :                         if (test_var > uint_max) {
   27967           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27968             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27969           0 :                                 return -1;
   27970             :                         }
   27971           0 :                         object->count = test_var;
   27972             :                 } else {
   27973           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27974             :                           PyLong_Type.tp_name);
   27975           0 :                         return -1;
   27976             :                 }
   27977             :         }
   27978           0 :         return 0;
   27979             : }
   27980             : 
   27981           0 : static PyObject *py_srvsvc_NetTransportCtr2_get_array(PyObject *obj, void *closure)
   27982             : {
   27983           0 :         struct srvsvc_NetTransportCtr2 *object = pytalloc_get_ptr(obj);
   27984           0 :         PyObject *py_array;
   27985           0 :         if (object->array == NULL) {
   27986           0 :                 Py_RETURN_NONE;
   27987             :         }
   27988           0 :         if (object->array == NULL) {
   27989           0 :                 py_array = Py_None;
   27990           0 :                 Py_INCREF(py_array);
   27991             :         } else {
   27992           0 :                 py_array = PyList_New(object->count);
   27993           0 :                 if (py_array == NULL) {
   27994           0 :                         return NULL;
   27995             :                 }
   27996             :                 {
   27997             :                         int array_cntr_1;
   27998           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   27999           0 :                                 PyObject *py_array_1;
   28000           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo2_Type, object->array, &(object->array)[array_cntr_1]);
   28001           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   28002             :                         }
   28003             :                 }
   28004             :         }
   28005           0 :         return py_array;
   28006             : }
   28007             : 
   28008           0 : static int py_srvsvc_NetTransportCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
   28009             : {
   28010           0 :         struct srvsvc_NetTransportCtr2 *object = pytalloc_get_ptr(py_obj);
   28011           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   28012           0 :         if (value == NULL) {
   28013           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
   28014           0 :                 return -1;
   28015             :         }
   28016           0 :         if (value == Py_None) {
   28017           0 :                 object->array = NULL;
   28018             :         } else {
   28019           0 :                 object->array = NULL;
   28020           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   28021             :                 {
   28022           0 :                         int array_cntr_1;
   28023           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   28024           0 :                         if (!object->array) { return -1; }
   28025           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   28026           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   28027           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   28028           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
   28029           0 :                                         return -1;
   28030             :                                 }
   28031           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   28032           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   28033           0 :                                         PyErr_NoMemory();
   28034           0 :                                         return -1;
   28035             :                                 }
   28036           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   28037             :                         }
   28038             :                 }
   28039             :         }
   28040           0 :         return 0;
   28041             : }
   28042             : 
   28043             : static PyGetSetDef py_srvsvc_NetTransportCtr2_getsetters[] = {
   28044             :         {
   28045             :                 .name = discard_const_p(char, "count"),
   28046             :                 .get = py_srvsvc_NetTransportCtr2_get_count,
   28047             :                 .set = py_srvsvc_NetTransportCtr2_set_count,
   28048             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28049             :         },
   28050             :         {
   28051             :                 .name = discard_const_p(char, "array"),
   28052             :                 .get = py_srvsvc_NetTransportCtr2_get_array,
   28053             :                 .set = py_srvsvc_NetTransportCtr2_set_array,
   28054             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo2")
   28055             :         },
   28056             :         { .name = NULL }
   28057             : };
   28058             : 
   28059           0 : static PyObject *py_srvsvc_NetTransportCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28060             : {
   28061           0 :         return pytalloc_new(struct srvsvc_NetTransportCtr2, type);
   28062             : }
   28063             : 
   28064             : 
   28065             : static PyTypeObject srvsvc_NetTransportCtr2_Type = {
   28066             :         PyVarObject_HEAD_INIT(NULL, 0)
   28067             :         .tp_name = "srvsvc.NetTransportCtr2",
   28068             :         .tp_getset = py_srvsvc_NetTransportCtr2_getsetters,
   28069             :         .tp_methods = NULL,
   28070             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28071             :         .tp_new = py_srvsvc_NetTransportCtr2_new,
   28072             : };
   28073             : 
   28074             : 
   28075           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_vcs(PyObject *obj, void *closure)
   28076             : {
   28077           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(obj);
   28078           0 :         PyObject *py_vcs;
   28079           0 :         py_vcs = PyLong_FromUnsignedLongLong((uint32_t)(object->vcs));
   28080           0 :         return py_vcs;
   28081             : }
   28082             : 
   28083           0 : static int py_srvsvc_NetTransportInfo3_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
   28084             : {
   28085           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(py_obj);
   28086           0 :         if (value == NULL) {
   28087           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->vcs");
   28088           0 :                 return -1;
   28089             :         }
   28090             :         {
   28091           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
   28092           0 :                 if (PyLong_Check(value)) {
   28093           0 :                         unsigned long long test_var;
   28094           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28095           0 :                         if (PyErr_Occurred() != NULL) {
   28096           0 :                                 return -1;
   28097             :                         }
   28098           0 :                         if (test_var > uint_max) {
   28099           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28100             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28101           0 :                                 return -1;
   28102             :                         }
   28103           0 :                         object->vcs = test_var;
   28104             :                 } else {
   28105           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28106             :                           PyLong_Type.tp_name);
   28107           0 :                         return -1;
   28108             :                 }
   28109             :         }
   28110           0 :         return 0;
   28111             : }
   28112             : 
   28113           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_name(PyObject *obj, void *closure)
   28114             : {
   28115           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(obj);
   28116           0 :         PyObject *py_name;
   28117           0 :         if (object->name == NULL) {
   28118           0 :                 Py_RETURN_NONE;
   28119             :         }
   28120           0 :         if (object->name == NULL) {
   28121           0 :                 py_name = Py_None;
   28122           0 :                 Py_INCREF(py_name);
   28123             :         } else {
   28124           0 :                 if (object->name == NULL) {
   28125           0 :                         py_name = Py_None;
   28126           0 :                         Py_INCREF(py_name);
   28127             :                 } else {
   28128           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
   28129             :                 }
   28130             :         }
   28131           0 :         return py_name;
   28132             : }
   28133             : 
   28134           0 : static int py_srvsvc_NetTransportInfo3_set_name(PyObject *py_obj, PyObject *value, void *closure)
   28135             : {
   28136           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(py_obj);
   28137           0 :         if (value == NULL) {
   28138           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->name");
   28139           0 :                 return -1;
   28140             :         }
   28141           0 :         if (value == Py_None) {
   28142           0 :                 object->name = NULL;
   28143             :         } else {
   28144           0 :                 object->name = NULL;
   28145             :                 {
   28146           0 :                         const char *test_str;
   28147           0 :                         const char *talloc_str;
   28148           0 :                         PyObject *unicode = NULL;
   28149           0 :                         if (PyUnicode_Check(value)) {
   28150           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28151           0 :                                 if (unicode == NULL) {
   28152           0 :                                         return -1;
   28153             :                                 }
   28154           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28155           0 :                         } else if (PyBytes_Check(value)) {
   28156           0 :                                 test_str = PyBytes_AS_STRING(value);
   28157             :                         } else {
   28158           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28159           0 :                                 return -1;
   28160             :                         }
   28161           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28162           0 :                         if (unicode != NULL) {
   28163           0 :                                 Py_DECREF(unicode);
   28164             :                         }
   28165           0 :                         if (talloc_str == NULL) {
   28166           0 :                                 PyErr_NoMemory();
   28167           0 :                                 return -1;
   28168             :                         }
   28169           0 :                         object->name = talloc_str;
   28170             :                 }
   28171             :         }
   28172           0 :         return 0;
   28173             : }
   28174             : 
   28175           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_addr(PyObject *obj, void *closure)
   28176             : {
   28177           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(obj);
   28178           0 :         PyObject *py_addr;
   28179           0 :         if (object->addr == NULL) {
   28180           0 :                 Py_RETURN_NONE;
   28181             :         }
   28182           0 :         if (object->addr == NULL) {
   28183           0 :                 py_addr = Py_None;
   28184           0 :                 Py_INCREF(py_addr);
   28185             :         } else {
   28186           0 :                 py_addr = PyList_New(object->addr_len);
   28187           0 :                 if (py_addr == NULL) {
   28188           0 :                         return NULL;
   28189             :                 }
   28190             :                 {
   28191             :                         int addr_cntr_1;
   28192           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
   28193           0 :                                 PyObject *py_addr_1;
   28194           0 :                                 py_addr_1 = PyLong_FromLong((uint16_t)((object->addr)[addr_cntr_1]));
   28195           0 :                                 PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
   28196             :                         }
   28197             :                 }
   28198             :         }
   28199           0 :         return py_addr;
   28200             : }
   28201             : 
   28202           0 : static int py_srvsvc_NetTransportInfo3_set_addr(PyObject *py_obj, PyObject *value, void *closure)
   28203             : {
   28204           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(py_obj);
   28205           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
   28206           0 :         if (value == NULL) {
   28207           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->addr");
   28208           0 :                 return -1;
   28209             :         }
   28210           0 :         if (value == Py_None) {
   28211           0 :                 object->addr = NULL;
   28212             :         } else {
   28213           0 :                 object->addr = NULL;
   28214           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   28215             :                 {
   28216           0 :                         int addr_cntr_1;
   28217           0 :                         object->addr = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->addr, PyList_GET_SIZE(value));
   28218           0 :                         if (!object->addr) { return -1; }
   28219           0 :                         talloc_set_name_const(object->addr, "ARRAY: object->addr");
   28220           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
   28221           0 :                                 if (PyList_GET_ITEM(value, addr_cntr_1) == NULL) {
   28222           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->addr)[addr_cntr_1]");
   28223           0 :                                         return -1;
   28224             :                                 }
   28225             :                                 {
   28226           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->addr)[addr_cntr_1]));
   28227           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
   28228           0 :                                                 unsigned long long test_var;
   28229           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
   28230           0 :                                                 if (PyErr_Occurred() != NULL) {
   28231           0 :                                                         return -1;
   28232             :                                                 }
   28233           0 :                                                 if (test_var > uint_max) {
   28234           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28235             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   28236           0 :                                                         return -1;
   28237             :                                                 }
   28238           0 :                                                 (object->addr)[addr_cntr_1] = test_var;
   28239             :                                         } else {
   28240           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   28241             :                                                   PyLong_Type.tp_name);
   28242           0 :                                                 return -1;
   28243             :                                         }
   28244             :                                 }
   28245             :                         }
   28246             :                 }
   28247             :         }
   28248           0 :         return 0;
   28249             : }
   28250             : 
   28251           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_addr_len(PyObject *obj, void *closure)
   28252             : {
   28253           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(obj);
   28254           0 :         PyObject *py_addr_len;
   28255           0 :         py_addr_len = PyLong_FromUnsignedLongLong((uint32_t)(object->addr_len));
   28256           0 :         return py_addr_len;
   28257             : }
   28258             : 
   28259           0 : static int py_srvsvc_NetTransportInfo3_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
   28260             : {
   28261           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(py_obj);
   28262           0 :         if (value == NULL) {
   28263           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->addr_len");
   28264           0 :                 return -1;
   28265             :         }
   28266             :         {
   28267           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
   28268           0 :                 if (PyLong_Check(value)) {
   28269           0 :                         unsigned long long test_var;
   28270           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28271           0 :                         if (PyErr_Occurred() != NULL) {
   28272           0 :                                 return -1;
   28273             :                         }
   28274           0 :                         if (test_var > uint_max) {
   28275           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28276             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28277           0 :                                 return -1;
   28278             :                         }
   28279           0 :                         object->addr_len = test_var;
   28280             :                 } else {
   28281           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28282             :                           PyLong_Type.tp_name);
   28283           0 :                         return -1;
   28284             :                 }
   28285             :         }
   28286           0 :         return 0;
   28287             : }
   28288             : 
   28289           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_net_addr(PyObject *obj, void *closure)
   28290             : {
   28291           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(obj);
   28292           0 :         PyObject *py_net_addr;
   28293           0 :         if (object->net_addr == NULL) {
   28294           0 :                 Py_RETURN_NONE;
   28295             :         }
   28296           0 :         if (object->net_addr == NULL) {
   28297           0 :                 py_net_addr = Py_None;
   28298           0 :                 Py_INCREF(py_net_addr);
   28299             :         } else {
   28300           0 :                 if (object->net_addr == NULL) {
   28301           0 :                         py_net_addr = Py_None;
   28302           0 :                         Py_INCREF(py_net_addr);
   28303             :                 } else {
   28304           0 :                         py_net_addr = PyUnicode_Decode(object->net_addr, strlen(object->net_addr), "utf-8", "ignore");
   28305             :                 }
   28306             :         }
   28307           0 :         return py_net_addr;
   28308             : }
   28309             : 
   28310           0 : static int py_srvsvc_NetTransportInfo3_set_net_addr(PyObject *py_obj, PyObject *value, void *closure)
   28311             : {
   28312           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(py_obj);
   28313           0 :         if (value == NULL) {
   28314           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->net_addr");
   28315           0 :                 return -1;
   28316             :         }
   28317           0 :         if (value == Py_None) {
   28318           0 :                 object->net_addr = NULL;
   28319             :         } else {
   28320           0 :                 object->net_addr = NULL;
   28321             :                 {
   28322           0 :                         const char *test_str;
   28323           0 :                         const char *talloc_str;
   28324           0 :                         PyObject *unicode = NULL;
   28325           0 :                         if (PyUnicode_Check(value)) {
   28326           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28327           0 :                                 if (unicode == NULL) {
   28328           0 :                                         return -1;
   28329             :                                 }
   28330           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28331           0 :                         } else if (PyBytes_Check(value)) {
   28332           0 :                                 test_str = PyBytes_AS_STRING(value);
   28333             :                         } else {
   28334           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28335           0 :                                 return -1;
   28336             :                         }
   28337           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28338           0 :                         if (unicode != NULL) {
   28339           0 :                                 Py_DECREF(unicode);
   28340             :                         }
   28341           0 :                         if (talloc_str == NULL) {
   28342           0 :                                 PyErr_NoMemory();
   28343           0 :                                 return -1;
   28344             :                         }
   28345           0 :                         object->net_addr = talloc_str;
   28346             :                 }
   28347             :         }
   28348           0 :         return 0;
   28349             : }
   28350             : 
   28351           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_domain(PyObject *obj, void *closure)
   28352             : {
   28353           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(obj);
   28354           0 :         PyObject *py_domain;
   28355           0 :         if (object->domain == NULL) {
   28356           0 :                 Py_RETURN_NONE;
   28357             :         }
   28358           0 :         if (object->domain == NULL) {
   28359           0 :                 py_domain = Py_None;
   28360           0 :                 Py_INCREF(py_domain);
   28361             :         } else {
   28362           0 :                 if (object->domain == NULL) {
   28363           0 :                         py_domain = Py_None;
   28364           0 :                         Py_INCREF(py_domain);
   28365             :                 } else {
   28366           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
   28367             :                 }
   28368             :         }
   28369           0 :         return py_domain;
   28370             : }
   28371             : 
   28372           0 : static int py_srvsvc_NetTransportInfo3_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   28373             : {
   28374           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(py_obj);
   28375           0 :         if (value == NULL) {
   28376           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain");
   28377           0 :                 return -1;
   28378             :         }
   28379           0 :         if (value == Py_None) {
   28380           0 :                 object->domain = NULL;
   28381             :         } else {
   28382           0 :                 object->domain = NULL;
   28383             :                 {
   28384           0 :                         const char *test_str;
   28385           0 :                         const char *talloc_str;
   28386           0 :                         PyObject *unicode = NULL;
   28387           0 :                         if (PyUnicode_Check(value)) {
   28388           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28389           0 :                                 if (unicode == NULL) {
   28390           0 :                                         return -1;
   28391             :                                 }
   28392           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28393           0 :                         } else if (PyBytes_Check(value)) {
   28394           0 :                                 test_str = PyBytes_AS_STRING(value);
   28395             :                         } else {
   28396           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28397           0 :                                 return -1;
   28398             :                         }
   28399           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28400           0 :                         if (unicode != NULL) {
   28401           0 :                                 Py_DECREF(unicode);
   28402             :                         }
   28403           0 :                         if (talloc_str == NULL) {
   28404           0 :                                 PyErr_NoMemory();
   28405           0 :                                 return -1;
   28406             :                         }
   28407           0 :                         object->domain = talloc_str;
   28408             :                 }
   28409             :         }
   28410           0 :         return 0;
   28411             : }
   28412             : 
   28413           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_unknown1(PyObject *obj, void *closure)
   28414             : {
   28415           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(obj);
   28416           0 :         PyObject *py_unknown1;
   28417           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown1));
   28418           0 :         return py_unknown1;
   28419             : }
   28420             : 
   28421           0 : static int py_srvsvc_NetTransportInfo3_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   28422             : {
   28423           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(py_obj);
   28424           0 :         if (value == NULL) {
   28425           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
   28426           0 :                 return -1;
   28427             :         }
   28428             :         {
   28429           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   28430           0 :                 if (PyLong_Check(value)) {
   28431           0 :                         unsigned long long test_var;
   28432           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28433           0 :                         if (PyErr_Occurred() != NULL) {
   28434           0 :                                 return -1;
   28435             :                         }
   28436           0 :                         if (test_var > uint_max) {
   28437           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28438             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28439           0 :                                 return -1;
   28440             :                         }
   28441           0 :                         object->unknown1 = test_var;
   28442             :                 } else {
   28443           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28444             :                           PyLong_Type.tp_name);
   28445           0 :                         return -1;
   28446             :                 }
   28447             :         }
   28448           0 :         return 0;
   28449             : }
   28450             : 
   28451           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_unknown2(PyObject *obj, void *closure)
   28452             : {
   28453           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(obj);
   28454           0 :         PyObject *py_unknown2;
   28455           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown2));
   28456           0 :         return py_unknown2;
   28457             : }
   28458             : 
   28459           0 : static int py_srvsvc_NetTransportInfo3_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   28460             : {
   28461           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(py_obj);
   28462           0 :         if (value == NULL) {
   28463           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
   28464           0 :                 return -1;
   28465             :         }
   28466             :         {
   28467           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   28468           0 :                 if (PyLong_Check(value)) {
   28469           0 :                         unsigned long long test_var;
   28470           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28471           0 :                         if (PyErr_Occurred() != NULL) {
   28472           0 :                                 return -1;
   28473             :                         }
   28474           0 :                         if (test_var > uint_max) {
   28475           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28476             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28477           0 :                                 return -1;
   28478             :                         }
   28479           0 :                         object->unknown2 = test_var;
   28480             :                 } else {
   28481           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28482             :                           PyLong_Type.tp_name);
   28483           0 :                         return -1;
   28484             :                 }
   28485             :         }
   28486           0 :         return 0;
   28487             : }
   28488             : 
   28489           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_unknown3(PyObject *obj, void *closure)
   28490             : {
   28491           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(obj);
   28492           0 :         PyObject *py_unknown3;
   28493           0 :         py_unknown3 = PyList_New(256);
   28494           0 :         if (py_unknown3 == NULL) {
   28495           0 :                 return NULL;
   28496             :         }
   28497             :         {
   28498             :                 int unknown3_cntr_0;
   28499           0 :                 for (unknown3_cntr_0 = 0; unknown3_cntr_0 < (256); unknown3_cntr_0++) {
   28500           0 :                         PyObject *py_unknown3_0;
   28501           0 :                         py_unknown3_0 = PyLong_FromLong((uint16_t)((object->unknown3)[unknown3_cntr_0]));
   28502           0 :                         PyList_SetItem(py_unknown3, unknown3_cntr_0, py_unknown3_0);
   28503             :                 }
   28504             :         }
   28505           0 :         return py_unknown3;
   28506             : }
   28507             : 
   28508           0 : static int py_srvsvc_NetTransportInfo3_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   28509             : {
   28510           0 :         struct srvsvc_NetTransportInfo3 *object = pytalloc_get_ptr(py_obj);
   28511           0 :         if (value == NULL) {
   28512           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
   28513           0 :                 return -1;
   28514             :         }
   28515           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   28516             :         {
   28517           0 :                 int unknown3_cntr_0;
   28518           0 :                 if (ARRAY_SIZE(object->unknown3) != PyList_GET_SIZE(value)) {
   28519           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));
   28520           0 :                         return -1;
   28521             :                 }
   28522           0 :                 for (unknown3_cntr_0 = 0; unknown3_cntr_0 < PyList_GET_SIZE(value); unknown3_cntr_0++) {
   28523           0 :                         if (PyList_GET_ITEM(value, unknown3_cntr_0) == NULL) {
   28524           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->unknown3)[unknown3_cntr_0]");
   28525           0 :                                 return -1;
   28526             :                         }
   28527             :                         {
   28528           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->unknown3)[unknown3_cntr_0]));
   28529           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, unknown3_cntr_0))) {
   28530           0 :                                         unsigned long long test_var;
   28531           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, unknown3_cntr_0));
   28532           0 :                                         if (PyErr_Occurred() != NULL) {
   28533           0 :                                                 return -1;
   28534             :                                         }
   28535           0 :                                         if (test_var > uint_max) {
   28536           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28537             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   28538           0 :                                                 return -1;
   28539             :                                         }
   28540           0 :                                         (object->unknown3)[unknown3_cntr_0] = test_var;
   28541             :                                 } else {
   28542           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28543             :                                           PyLong_Type.tp_name);
   28544           0 :                                         return -1;
   28545             :                                 }
   28546             :                         }
   28547             :                 }
   28548             :         }
   28549           0 :         return 0;
   28550             : }
   28551             : 
   28552             : static PyGetSetDef py_srvsvc_NetTransportInfo3_getsetters[] = {
   28553             :         {
   28554             :                 .name = discard_const_p(char, "vcs"),
   28555             :                 .get = py_srvsvc_NetTransportInfo3_get_vcs,
   28556             :                 .set = py_srvsvc_NetTransportInfo3_set_vcs,
   28557             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28558             :         },
   28559             :         {
   28560             :                 .name = discard_const_p(char, "name"),
   28561             :                 .get = py_srvsvc_NetTransportInfo3_get_name,
   28562             :                 .set = py_srvsvc_NetTransportInfo3_set_name,
   28563             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28564             :         },
   28565             :         {
   28566             :                 .name = discard_const_p(char, "addr"),
   28567             :                 .get = py_srvsvc_NetTransportInfo3_get_addr,
   28568             :                 .set = py_srvsvc_NetTransportInfo3_set_addr,
   28569             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   28570             :         },
   28571             :         {
   28572             :                 .name = discard_const_p(char, "addr_len"),
   28573             :                 .get = py_srvsvc_NetTransportInfo3_get_addr_len,
   28574             :                 .set = py_srvsvc_NetTransportInfo3_set_addr_len,
   28575             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28576             :         },
   28577             :         {
   28578             :                 .name = discard_const_p(char, "net_addr"),
   28579             :                 .get = py_srvsvc_NetTransportInfo3_get_net_addr,
   28580             :                 .set = py_srvsvc_NetTransportInfo3_set_net_addr,
   28581             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28582             :         },
   28583             :         {
   28584             :                 .name = discard_const_p(char, "domain"),
   28585             :                 .get = py_srvsvc_NetTransportInfo3_get_domain,
   28586             :                 .set = py_srvsvc_NetTransportInfo3_set_domain,
   28587             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28588             :         },
   28589             :         {
   28590             :                 .name = discard_const_p(char, "unknown1"),
   28591             :                 .get = py_srvsvc_NetTransportInfo3_get_unknown1,
   28592             :                 .set = py_srvsvc_NetTransportInfo3_set_unknown1,
   28593             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28594             :         },
   28595             :         {
   28596             :                 .name = discard_const_p(char, "unknown2"),
   28597             :                 .get = py_srvsvc_NetTransportInfo3_get_unknown2,
   28598             :                 .set = py_srvsvc_NetTransportInfo3_set_unknown2,
   28599             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28600             :         },
   28601             :         {
   28602             :                 .name = discard_const_p(char, "unknown3"),
   28603             :                 .get = py_srvsvc_NetTransportInfo3_get_unknown3,
   28604             :                 .set = py_srvsvc_NetTransportInfo3_set_unknown3,
   28605             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   28606             :         },
   28607             :         { .name = NULL }
   28608             : };
   28609             : 
   28610           0 : static PyObject *py_srvsvc_NetTransportInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28611             : {
   28612           0 :         return pytalloc_new(struct srvsvc_NetTransportInfo3, type);
   28613             : }
   28614             : 
   28615             : 
   28616             : static PyTypeObject srvsvc_NetTransportInfo3_Type = {
   28617             :         PyVarObject_HEAD_INIT(NULL, 0)
   28618             :         .tp_name = "srvsvc.NetTransportInfo3",
   28619             :         .tp_getset = py_srvsvc_NetTransportInfo3_getsetters,
   28620             :         .tp_methods = NULL,
   28621             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28622             :         .tp_new = py_srvsvc_NetTransportInfo3_new,
   28623             : };
   28624             : 
   28625             : 
   28626           0 : static PyObject *py_srvsvc_NetTransportCtr3_get_count(PyObject *obj, void *closure)
   28627             : {
   28628           0 :         struct srvsvc_NetTransportCtr3 *object = pytalloc_get_ptr(obj);
   28629           0 :         PyObject *py_count;
   28630           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   28631           0 :         return py_count;
   28632             : }
   28633             : 
   28634           0 : static int py_srvsvc_NetTransportCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
   28635             : {
   28636           0 :         struct srvsvc_NetTransportCtr3 *object = pytalloc_get_ptr(py_obj);
   28637           0 :         if (value == NULL) {
   28638           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
   28639           0 :                 return -1;
   28640             :         }
   28641             :         {
   28642           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   28643           0 :                 if (PyLong_Check(value)) {
   28644           0 :                         unsigned long long test_var;
   28645           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28646           0 :                         if (PyErr_Occurred() != NULL) {
   28647           0 :                                 return -1;
   28648             :                         }
   28649           0 :                         if (test_var > uint_max) {
   28650           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28651             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28652           0 :                                 return -1;
   28653             :                         }
   28654           0 :                         object->count = test_var;
   28655             :                 } else {
   28656           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28657             :                           PyLong_Type.tp_name);
   28658           0 :                         return -1;
   28659             :                 }
   28660             :         }
   28661           0 :         return 0;
   28662             : }
   28663             : 
   28664           0 : static PyObject *py_srvsvc_NetTransportCtr3_get_array(PyObject *obj, void *closure)
   28665             : {
   28666           0 :         struct srvsvc_NetTransportCtr3 *object = pytalloc_get_ptr(obj);
   28667           0 :         PyObject *py_array;
   28668           0 :         if (object->array == NULL) {
   28669           0 :                 Py_RETURN_NONE;
   28670             :         }
   28671           0 :         if (object->array == NULL) {
   28672           0 :                 py_array = Py_None;
   28673           0 :                 Py_INCREF(py_array);
   28674             :         } else {
   28675           0 :                 py_array = PyList_New(object->count);
   28676           0 :                 if (py_array == NULL) {
   28677           0 :                         return NULL;
   28678             :                 }
   28679             :                 {
   28680             :                         int array_cntr_1;
   28681           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   28682           0 :                                 PyObject *py_array_1;
   28683           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo3_Type, object->array, &(object->array)[array_cntr_1]);
   28684           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   28685             :                         }
   28686             :                 }
   28687             :         }
   28688           0 :         return py_array;
   28689             : }
   28690             : 
   28691           0 : static int py_srvsvc_NetTransportCtr3_set_array(PyObject *py_obj, PyObject *value, void *closure)
   28692             : {
   28693           0 :         struct srvsvc_NetTransportCtr3 *object = pytalloc_get_ptr(py_obj);
   28694           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   28695           0 :         if (value == NULL) {
   28696           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
   28697           0 :                 return -1;
   28698             :         }
   28699           0 :         if (value == Py_None) {
   28700           0 :                 object->array = NULL;
   28701             :         } else {
   28702           0 :                 object->array = NULL;
   28703           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   28704             :                 {
   28705           0 :                         int array_cntr_1;
   28706           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   28707           0 :                         if (!object->array) { return -1; }
   28708           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   28709           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   28710           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   28711           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
   28712           0 :                                         return -1;
   28713             :                                 }
   28714           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportInfo3_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   28715           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   28716           0 :                                         PyErr_NoMemory();
   28717           0 :                                         return -1;
   28718             :                                 }
   28719           0 :                                 (object->array)[array_cntr_1] = *(struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   28720             :                         }
   28721             :                 }
   28722             :         }
   28723           0 :         return 0;
   28724             : }
   28725             : 
   28726             : static PyGetSetDef py_srvsvc_NetTransportCtr3_getsetters[] = {
   28727             :         {
   28728             :                 .name = discard_const_p(char, "count"),
   28729             :                 .get = py_srvsvc_NetTransportCtr3_get_count,
   28730             :                 .set = py_srvsvc_NetTransportCtr3_set_count,
   28731             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28732             :         },
   28733             :         {
   28734             :                 .name = discard_const_p(char, "array"),
   28735             :                 .get = py_srvsvc_NetTransportCtr3_get_array,
   28736             :                 .set = py_srvsvc_NetTransportCtr3_set_array,
   28737             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo3")
   28738             :         },
   28739             :         { .name = NULL }
   28740             : };
   28741             : 
   28742           0 : static PyObject *py_srvsvc_NetTransportCtr3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28743             : {
   28744           0 :         return pytalloc_new(struct srvsvc_NetTransportCtr3, type);
   28745             : }
   28746             : 
   28747             : 
   28748             : static PyTypeObject srvsvc_NetTransportCtr3_Type = {
   28749             :         PyVarObject_HEAD_INIT(NULL, 0)
   28750             :         .tp_name = "srvsvc.NetTransportCtr3",
   28751             :         .tp_getset = py_srvsvc_NetTransportCtr3_getsetters,
   28752             :         .tp_methods = NULL,
   28753             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28754             :         .tp_new = py_srvsvc_NetTransportCtr3_new,
   28755             : };
   28756             : 
   28757           0 : static PyObject *py_import_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportCtr *in)
   28758             : {
   28759           0 :         PyObject *ret;
   28760             : 
   28761           0 :         switch (level) {
   28762           0 :                 case 0:
   28763           0 :                         if (in->ctr0 == NULL) {
   28764           0 :                                 ret = Py_None;
   28765           0 :                                 Py_INCREF(ret);
   28766             :                         } else {
   28767           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetTransportCtr0_Type, in->ctr0, in->ctr0);
   28768             :                         }
   28769           0 :                         return ret;
   28770             : 
   28771           0 :                 case 1:
   28772           0 :                         if (in->ctr1 == NULL) {
   28773           0 :                                 ret = Py_None;
   28774           0 :                                 Py_INCREF(ret);
   28775             :                         } else {
   28776           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetTransportCtr1_Type, in->ctr1, in->ctr1);
   28777             :                         }
   28778           0 :                         return ret;
   28779             : 
   28780           0 :                 case 2:
   28781           0 :                         if (in->ctr2 == NULL) {
   28782           0 :                                 ret = Py_None;
   28783           0 :                                 Py_INCREF(ret);
   28784             :                         } else {
   28785           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetTransportCtr2_Type, in->ctr2, in->ctr2);
   28786             :                         }
   28787           0 :                         return ret;
   28788             : 
   28789           0 :                 case 3:
   28790           0 :                         if (in->ctr3 == NULL) {
   28791           0 :                                 ret = Py_None;
   28792           0 :                                 Py_INCREF(ret);
   28793             :                         } else {
   28794           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetTransportCtr3_Type, in->ctr3, in->ctr3);
   28795             :                         }
   28796           0 :                         return ret;
   28797             : 
   28798           0 :                 default:
   28799           0 :                         ret = Py_None;
   28800           0 :                         Py_INCREF(ret);
   28801           0 :                         return ret;
   28802             : 
   28803             :         }
   28804             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   28805             :         return NULL;
   28806             : }
   28807             : 
   28808           0 : static union srvsvc_NetTransportCtr *py_export_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   28809             : {
   28810           0 :         union srvsvc_NetTransportCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetTransportCtr);
   28811           0 :         switch (level) {
   28812           0 :                 case 0:
   28813           0 :                         if (in == NULL) {
   28814           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr0");
   28815           0 :                                 talloc_free(ret); return NULL;
   28816             :                         }
   28817           0 :                         if (in == Py_None) {
   28818           0 :                                 ret->ctr0 = NULL;
   28819             :                         } else {
   28820           0 :                                 ret->ctr0 = NULL;
   28821           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportCtr0_Type, in, talloc_free(ret); return NULL;);
   28822           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   28823           0 :                                         PyErr_NoMemory();
   28824           0 :                                         talloc_free(ret); return NULL;
   28825             :                                 }
   28826           0 :                                 ret->ctr0 = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(in);
   28827             :                         }
   28828           0 :                         break;
   28829             : 
   28830           0 :                 case 1:
   28831           0 :                         if (in == NULL) {
   28832           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr1");
   28833           0 :                                 talloc_free(ret); return NULL;
   28834             :                         }
   28835           0 :                         if (in == Py_None) {
   28836           0 :                                 ret->ctr1 = NULL;
   28837             :                         } else {
   28838           0 :                                 ret->ctr1 = NULL;
   28839           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportCtr1_Type, in, talloc_free(ret); return NULL;);
   28840           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   28841           0 :                                         PyErr_NoMemory();
   28842           0 :                                         talloc_free(ret); return NULL;
   28843             :                                 }
   28844           0 :                                 ret->ctr1 = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(in);
   28845             :                         }
   28846           0 :                         break;
   28847             : 
   28848           0 :                 case 2:
   28849           0 :                         if (in == NULL) {
   28850           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr2");
   28851           0 :                                 talloc_free(ret); return NULL;
   28852             :                         }
   28853           0 :                         if (in == Py_None) {
   28854           0 :                                 ret->ctr2 = NULL;
   28855             :                         } else {
   28856           0 :                                 ret->ctr2 = NULL;
   28857           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportCtr2_Type, in, talloc_free(ret); return NULL;);
   28858           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   28859           0 :                                         PyErr_NoMemory();
   28860           0 :                                         talloc_free(ret); return NULL;
   28861             :                                 }
   28862           0 :                                 ret->ctr2 = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(in);
   28863             :                         }
   28864           0 :                         break;
   28865             : 
   28866           0 :                 case 3:
   28867           0 :                         if (in == NULL) {
   28868           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ctr3");
   28869           0 :                                 talloc_free(ret); return NULL;
   28870             :                         }
   28871           0 :                         if (in == Py_None) {
   28872           0 :                                 ret->ctr3 = NULL;
   28873             :                         } else {
   28874           0 :                                 ret->ctr3 = NULL;
   28875           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportCtr3_Type, in, talloc_free(ret); return NULL;);
   28876           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   28877           0 :                                         PyErr_NoMemory();
   28878           0 :                                         talloc_free(ret); return NULL;
   28879             :                                 }
   28880           0 :                                 ret->ctr3 = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(in);
   28881             :                         }
   28882           0 :                         break;
   28883             : 
   28884           0 :                 default:
   28885           0 :                         break;
   28886             : 
   28887             :         }
   28888             : 
   28889           0 :         return ret;
   28890             : }
   28891             : 
   28892           0 : static PyObject *py_srvsvc_NetTransportCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28893             : {
   28894           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   28895           0 :         PyObject *mem_ctx_obj = NULL;
   28896           0 :         TALLOC_CTX *mem_ctx = NULL;
   28897           0 :         int level = 0;
   28898           0 :         PyObject *in_obj = NULL;
   28899           0 :         union srvsvc_NetTransportCtr *in = NULL;
   28900             : 
   28901           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   28902             :                 discard_const_p(char *, kwnames),
   28903             :                 &mem_ctx_obj,
   28904             :                 &level,
   28905             :                 &in_obj)) {
   28906           0 :                 return NULL;
   28907             :         }
   28908           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   28909           0 :         if (mem_ctx == NULL) {
   28910           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   28911           0 :                 return NULL;
   28912             :         }
   28913           0 :         in = (union srvsvc_NetTransportCtr *)pytalloc_get_ptr(in_obj);
   28914           0 :         if (in == NULL) {
   28915           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetTransportCtr!");
   28916           0 :                 return NULL;
   28917             :         }
   28918             : 
   28919           0 :         return py_import_srvsvc_NetTransportCtr(mem_ctx, level, in);
   28920             : }
   28921             : 
   28922           0 : static PyObject *py_srvsvc_NetTransportCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28923             : {
   28924           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   28925           0 :         PyObject *mem_ctx_obj = NULL;
   28926           0 :         TALLOC_CTX *mem_ctx = NULL;
   28927           0 :         int level = 0;
   28928           0 :         PyObject *in = NULL;
   28929           0 :         union srvsvc_NetTransportCtr *out = NULL;
   28930             : 
   28931           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   28932             :                 discard_const_p(char *, kwnames),
   28933             :                 &mem_ctx_obj,
   28934             :                 &level,
   28935             :                 &in)) {
   28936           0 :                 return NULL;
   28937             :         }
   28938           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   28939           0 :         if (mem_ctx == NULL) {
   28940           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   28941           0 :                 return NULL;
   28942             :         }
   28943             : 
   28944           0 :         out = py_export_srvsvc_NetTransportCtr(mem_ctx, level, in);
   28945           0 :         if (out == NULL) {
   28946           0 :                 return NULL;
   28947             :         }
   28948             : 
   28949           0 :         return pytalloc_GenericObject_reference(out);
   28950             : }
   28951             : 
   28952             : static PyMethodDef py_srvsvc_NetTransportCtr_methods[] = {
   28953             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportCtr_import),
   28954             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   28955             :                 "T.__import__(mem_ctx, level, in) => ret." },
   28956             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportCtr_export),
   28957             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   28958             :                 "T.__export__(mem_ctx, level, in) => ret." },
   28959             :         { NULL, NULL, 0, NULL }
   28960             : };
   28961             : 
   28962           0 : static PyObject *py_srvsvc_NetTransportCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28963             : {
   28964           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   28965           0 :         return NULL;
   28966             : }
   28967             : 
   28968             : 
   28969             : static PyTypeObject srvsvc_NetTransportCtr_Type = {
   28970             :         PyVarObject_HEAD_INIT(NULL, 0)
   28971             :         .tp_name = "srvsvc.NetTransportCtr",
   28972             :         .tp_getset = NULL,
   28973             :         .tp_methods = py_srvsvc_NetTransportCtr_methods,
   28974             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28975             :         .tp_new = py_srvsvc_NetTransportCtr_new,
   28976             : };
   28977             : 
   28978             : 
   28979           0 : static PyObject *py_srvsvc_NetTransportInfoCtr_get_level(PyObject *obj, void *closure)
   28980             : {
   28981           0 :         struct srvsvc_NetTransportInfoCtr *object = pytalloc_get_ptr(obj);
   28982           0 :         PyObject *py_level;
   28983           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->level));
   28984           0 :         return py_level;
   28985             : }
   28986             : 
   28987           0 : static int py_srvsvc_NetTransportInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
   28988             : {
   28989           0 :         struct srvsvc_NetTransportInfoCtr *object = pytalloc_get_ptr(py_obj);
   28990           0 :         if (value == NULL) {
   28991           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->level");
   28992           0 :                 return -1;
   28993             :         }
   28994             :         {
   28995           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
   28996           0 :                 if (PyLong_Check(value)) {
   28997           0 :                         unsigned long long test_var;
   28998           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28999           0 :                         if (PyErr_Occurred() != NULL) {
   29000           0 :                                 return -1;
   29001             :                         }
   29002           0 :                         if (test_var > uint_max) {
   29003           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29004             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29005           0 :                                 return -1;
   29006             :                         }
   29007           0 :                         object->level = test_var;
   29008             :                 } else {
   29009           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29010             :                           PyLong_Type.tp_name);
   29011           0 :                         return -1;
   29012             :                 }
   29013             :         }
   29014           0 :         return 0;
   29015             : }
   29016             : 
   29017           0 : static PyObject *py_srvsvc_NetTransportInfoCtr_get_ctr(PyObject *obj, void *closure)
   29018             : {
   29019           0 :         struct srvsvc_NetTransportInfoCtr *object = pytalloc_get_ptr(obj);
   29020           0 :         PyObject *py_ctr;
   29021           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetTransportCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetTransportCtr");
   29022           0 :         if (py_ctr == NULL) {
   29023           0 :                 return NULL;
   29024             :         }
   29025           0 :         return py_ctr;
   29026             : }
   29027             : 
   29028           0 : static int py_srvsvc_NetTransportInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   29029             : {
   29030           0 :         struct srvsvc_NetTransportInfoCtr *object = pytalloc_get_ptr(py_obj);
   29031           0 :         if (value == NULL) {
   29032           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ctr");
   29033           0 :                 return -1;
   29034             :         }
   29035             :         {
   29036           0 :                 union srvsvc_NetTransportCtr *ctr_switch_0;
   29037           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");
   29038           0 :                 if (ctr_switch_0 == NULL) {
   29039           0 :                         return -1;
   29040             :                 }
   29041           0 :                 object->ctr = *ctr_switch_0;
   29042             :         }
   29043           0 :         return 0;
   29044             : }
   29045             : 
   29046             : static PyGetSetDef py_srvsvc_NetTransportInfoCtr_getsetters[] = {
   29047             :         {
   29048             :                 .name = discard_const_p(char, "level"),
   29049             :                 .get = py_srvsvc_NetTransportInfoCtr_get_level,
   29050             :                 .set = py_srvsvc_NetTransportInfoCtr_set_level,
   29051             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29052             :         },
   29053             :         {
   29054             :                 .name = discard_const_p(char, "ctr"),
   29055             :                 .get = py_srvsvc_NetTransportInfoCtr_get_ctr,
   29056             :                 .set = py_srvsvc_NetTransportInfoCtr_set_ctr,
   29057             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportCtr")
   29058             :         },
   29059             :         { .name = NULL }
   29060             : };
   29061             : 
   29062           0 : static PyObject *py_srvsvc_NetTransportInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29063             : {
   29064           0 :         return pytalloc_new(struct srvsvc_NetTransportInfoCtr, type);
   29065             : }
   29066             : 
   29067             : 
   29068             : static PyTypeObject srvsvc_NetTransportInfoCtr_Type = {
   29069             :         PyVarObject_HEAD_INIT(NULL, 0)
   29070             :         .tp_name = "srvsvc.NetTransportInfoCtr",
   29071             :         .tp_getset = py_srvsvc_NetTransportInfoCtr_getsetters,
   29072             :         .tp_methods = NULL,
   29073             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29074             :         .tp_new = py_srvsvc_NetTransportInfoCtr_new,
   29075             : };
   29076             : 
   29077             : 
   29078           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_elapsed(PyObject *obj, void *closure)
   29079             : {
   29080           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(obj);
   29081           0 :         PyObject *py_elapsed;
   29082           0 :         py_elapsed = PyLong_FromUnsignedLongLong((uint32_t)(object->elapsed));
   29083           0 :         return py_elapsed;
   29084             : }
   29085             : 
   29086           0 : static int py_srvsvc_NetRemoteTODInfo_set_elapsed(PyObject *py_obj, PyObject *value, void *closure)
   29087             : {
   29088           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(py_obj);
   29089           0 :         if (value == NULL) {
   29090           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->elapsed");
   29091           0 :                 return -1;
   29092             :         }
   29093             :         {
   29094           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->elapsed));
   29095           0 :                 if (PyLong_Check(value)) {
   29096           0 :                         unsigned long long test_var;
   29097           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29098           0 :                         if (PyErr_Occurred() != NULL) {
   29099           0 :                                 return -1;
   29100             :                         }
   29101           0 :                         if (test_var > uint_max) {
   29102           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29103             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29104           0 :                                 return -1;
   29105             :                         }
   29106           0 :                         object->elapsed = test_var;
   29107             :                 } else {
   29108           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29109             :                           PyLong_Type.tp_name);
   29110           0 :                         return -1;
   29111             :                 }
   29112             :         }
   29113           0 :         return 0;
   29114             : }
   29115             : 
   29116           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_msecs(PyObject *obj, void *closure)
   29117             : {
   29118           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(obj);
   29119           0 :         PyObject *py_msecs;
   29120           0 :         py_msecs = PyLong_FromUnsignedLongLong((uint32_t)(object->msecs));
   29121           0 :         return py_msecs;
   29122             : }
   29123             : 
   29124           0 : static int py_srvsvc_NetRemoteTODInfo_set_msecs(PyObject *py_obj, PyObject *value, void *closure)
   29125             : {
   29126           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(py_obj);
   29127           0 :         if (value == NULL) {
   29128           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->msecs");
   29129           0 :                 return -1;
   29130             :         }
   29131             :         {
   29132           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->msecs));
   29133           0 :                 if (PyLong_Check(value)) {
   29134           0 :                         unsigned long long test_var;
   29135           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29136           0 :                         if (PyErr_Occurred() != NULL) {
   29137           0 :                                 return -1;
   29138             :                         }
   29139           0 :                         if (test_var > uint_max) {
   29140           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29141             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29142           0 :                                 return -1;
   29143             :                         }
   29144           0 :                         object->msecs = test_var;
   29145             :                 } else {
   29146           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29147             :                           PyLong_Type.tp_name);
   29148           0 :                         return -1;
   29149             :                 }
   29150             :         }
   29151           0 :         return 0;
   29152             : }
   29153             : 
   29154           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_hours(PyObject *obj, void *closure)
   29155             : {
   29156           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(obj);
   29157           0 :         PyObject *py_hours;
   29158           0 :         py_hours = PyLong_FromUnsignedLongLong((uint32_t)(object->hours));
   29159           0 :         return py_hours;
   29160             : }
   29161             : 
   29162           0 : static int py_srvsvc_NetRemoteTODInfo_set_hours(PyObject *py_obj, PyObject *value, void *closure)
   29163             : {
   29164           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(py_obj);
   29165           0 :         if (value == NULL) {
   29166           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->hours");
   29167           0 :                 return -1;
   29168             :         }
   29169             :         {
   29170           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hours));
   29171           0 :                 if (PyLong_Check(value)) {
   29172           0 :                         unsigned long long test_var;
   29173           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29174           0 :                         if (PyErr_Occurred() != NULL) {
   29175           0 :                                 return -1;
   29176             :                         }
   29177           0 :                         if (test_var > uint_max) {
   29178           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29179             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29180           0 :                                 return -1;
   29181             :                         }
   29182           0 :                         object->hours = test_var;
   29183             :                 } else {
   29184           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29185             :                           PyLong_Type.tp_name);
   29186           0 :                         return -1;
   29187             :                 }
   29188             :         }
   29189           0 :         return 0;
   29190             : }
   29191             : 
   29192           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_mins(PyObject *obj, void *closure)
   29193             : {
   29194           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(obj);
   29195           0 :         PyObject *py_mins;
   29196           0 :         py_mins = PyLong_FromUnsignedLongLong((uint32_t)(object->mins));
   29197           0 :         return py_mins;
   29198             : }
   29199             : 
   29200           0 : static int py_srvsvc_NetRemoteTODInfo_set_mins(PyObject *py_obj, PyObject *value, void *closure)
   29201             : {
   29202           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(py_obj);
   29203           0 :         if (value == NULL) {
   29204           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->mins");
   29205           0 :                 return -1;
   29206             :         }
   29207             :         {
   29208           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->mins));
   29209           0 :                 if (PyLong_Check(value)) {
   29210           0 :                         unsigned long long test_var;
   29211           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29212           0 :                         if (PyErr_Occurred() != NULL) {
   29213           0 :                                 return -1;
   29214             :                         }
   29215           0 :                         if (test_var > uint_max) {
   29216           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29217             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29218           0 :                                 return -1;
   29219             :                         }
   29220           0 :                         object->mins = test_var;
   29221             :                 } else {
   29222           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29223             :                           PyLong_Type.tp_name);
   29224           0 :                         return -1;
   29225             :                 }
   29226             :         }
   29227           0 :         return 0;
   29228             : }
   29229             : 
   29230           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_secs(PyObject *obj, void *closure)
   29231             : {
   29232           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(obj);
   29233           0 :         PyObject *py_secs;
   29234           0 :         py_secs = PyLong_FromUnsignedLongLong((uint32_t)(object->secs));
   29235           0 :         return py_secs;
   29236             : }
   29237             : 
   29238           0 : static int py_srvsvc_NetRemoteTODInfo_set_secs(PyObject *py_obj, PyObject *value, void *closure)
   29239             : {
   29240           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(py_obj);
   29241           0 :         if (value == NULL) {
   29242           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->secs");
   29243           0 :                 return -1;
   29244             :         }
   29245             :         {
   29246           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->secs));
   29247           0 :                 if (PyLong_Check(value)) {
   29248           0 :                         unsigned long long test_var;
   29249           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29250           0 :                         if (PyErr_Occurred() != NULL) {
   29251           0 :                                 return -1;
   29252             :                         }
   29253           0 :                         if (test_var > uint_max) {
   29254           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29255             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29256           0 :                                 return -1;
   29257             :                         }
   29258           0 :                         object->secs = test_var;
   29259             :                 } else {
   29260           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29261             :                           PyLong_Type.tp_name);
   29262           0 :                         return -1;
   29263             :                 }
   29264             :         }
   29265           0 :         return 0;
   29266             : }
   29267             : 
   29268           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_hunds(PyObject *obj, void *closure)
   29269             : {
   29270           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(obj);
   29271           0 :         PyObject *py_hunds;
   29272           0 :         py_hunds = PyLong_FromUnsignedLongLong((uint32_t)(object->hunds));
   29273           0 :         return py_hunds;
   29274             : }
   29275             : 
   29276           0 : static int py_srvsvc_NetRemoteTODInfo_set_hunds(PyObject *py_obj, PyObject *value, void *closure)
   29277             : {
   29278           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(py_obj);
   29279           0 :         if (value == NULL) {
   29280           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->hunds");
   29281           0 :                 return -1;
   29282             :         }
   29283             :         {
   29284           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hunds));
   29285           0 :                 if (PyLong_Check(value)) {
   29286           0 :                         unsigned long long test_var;
   29287           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29288           0 :                         if (PyErr_Occurred() != NULL) {
   29289           0 :                                 return -1;
   29290             :                         }
   29291           0 :                         if (test_var > uint_max) {
   29292           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29293             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29294           0 :                                 return -1;
   29295             :                         }
   29296           0 :                         object->hunds = test_var;
   29297             :                 } else {
   29298           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29299             :                           PyLong_Type.tp_name);
   29300           0 :                         return -1;
   29301             :                 }
   29302             :         }
   29303           0 :         return 0;
   29304             : }
   29305             : 
   29306           4 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_timezone(PyObject *obj, void *closure)
   29307             : {
   29308           4 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(obj);
   29309           4 :         PyObject *py_timezone;
   29310           4 :         py_timezone = PyLong_FromLong(object->timezone);
   29311           4 :         return py_timezone;
   29312             : }
   29313             : 
   29314           9 : static int py_srvsvc_NetRemoteTODInfo_set_timezone(PyObject *py_obj, PyObject *value, void *closure)
   29315             : {
   29316           9 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(py_obj);
   29317           9 :         if (value == NULL) {
   29318           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timezone");
   29319           0 :                 return -1;
   29320             :         }
   29321             :         {
   29322           9 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->timezone));
   29323           9 :                 const long long int_min = -int_max - 1;
   29324           9 :                 if (PyLong_Check(value)) {
   29325           7 :                         long long test_var;
   29326           7 :                         test_var = PyLong_AsLongLong(value);
   29327           7 :                         if (PyErr_Occurred() != NULL) {
   29328           0 :                                 return -1;
   29329             :                         }
   29330           6 :                         if (test_var < int_min || test_var > int_max) {
   29331           2 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
   29332             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
   29333           2 :                                 return -1;
   29334             :                         }
   29335           4 :                         object->timezone = test_var;
   29336             :                 } else {
   29337           2 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29338             :                           PyLong_Type.tp_name);
   29339           2 :                         return -1;
   29340             :                 }
   29341             :         }
   29342           4 :         return 0;
   29343             : }
   29344             : 
   29345           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_tinterval(PyObject *obj, void *closure)
   29346             : {
   29347           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(obj);
   29348           0 :         PyObject *py_tinterval;
   29349           0 :         py_tinterval = PyLong_FromUnsignedLongLong((uint32_t)(object->tinterval));
   29350           0 :         return py_tinterval;
   29351             : }
   29352             : 
   29353           0 : static int py_srvsvc_NetRemoteTODInfo_set_tinterval(PyObject *py_obj, PyObject *value, void *closure)
   29354             : {
   29355           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(py_obj);
   29356           0 :         if (value == NULL) {
   29357           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->tinterval");
   29358           0 :                 return -1;
   29359             :         }
   29360             :         {
   29361           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->tinterval));
   29362           0 :                 if (PyLong_Check(value)) {
   29363           0 :                         unsigned long long test_var;
   29364           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29365           0 :                         if (PyErr_Occurred() != NULL) {
   29366           0 :                                 return -1;
   29367             :                         }
   29368           0 :                         if (test_var > uint_max) {
   29369           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29370             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29371           0 :                                 return -1;
   29372             :                         }
   29373           0 :                         object->tinterval = test_var;
   29374             :                 } else {
   29375           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29376             :                           PyLong_Type.tp_name);
   29377           0 :                         return -1;
   29378             :                 }
   29379             :         }
   29380           0 :         return 0;
   29381             : }
   29382             : 
   29383           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_day(PyObject *obj, void *closure)
   29384             : {
   29385           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(obj);
   29386           0 :         PyObject *py_day;
   29387           0 :         py_day = PyLong_FromUnsignedLongLong((uint32_t)(object->day));
   29388           0 :         return py_day;
   29389             : }
   29390             : 
   29391           0 : static int py_srvsvc_NetRemoteTODInfo_set_day(PyObject *py_obj, PyObject *value, void *closure)
   29392             : {
   29393           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(py_obj);
   29394           0 :         if (value == NULL) {
   29395           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->day");
   29396           0 :                 return -1;
   29397             :         }
   29398             :         {
   29399           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->day));
   29400           0 :                 if (PyLong_Check(value)) {
   29401           0 :                         unsigned long long test_var;
   29402           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29403           0 :                         if (PyErr_Occurred() != NULL) {
   29404           0 :                                 return -1;
   29405             :                         }
   29406           0 :                         if (test_var > uint_max) {
   29407           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29408             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29409           0 :                                 return -1;
   29410             :                         }
   29411           0 :                         object->day = test_var;
   29412             :                 } else {
   29413           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29414             :                           PyLong_Type.tp_name);
   29415           0 :                         return -1;
   29416             :                 }
   29417             :         }
   29418           0 :         return 0;
   29419             : }
   29420             : 
   29421           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_month(PyObject *obj, void *closure)
   29422             : {
   29423           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(obj);
   29424           0 :         PyObject *py_month;
   29425           0 :         py_month = PyLong_FromUnsignedLongLong((uint32_t)(object->month));
   29426           0 :         return py_month;
   29427             : }
   29428             : 
   29429           0 : static int py_srvsvc_NetRemoteTODInfo_set_month(PyObject *py_obj, PyObject *value, void *closure)
   29430             : {
   29431           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(py_obj);
   29432           0 :         if (value == NULL) {
   29433           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->month");
   29434           0 :                 return -1;
   29435             :         }
   29436             :         {
   29437           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->month));
   29438           0 :                 if (PyLong_Check(value)) {
   29439           0 :                         unsigned long long test_var;
   29440           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29441           0 :                         if (PyErr_Occurred() != NULL) {
   29442           0 :                                 return -1;
   29443             :                         }
   29444           0 :                         if (test_var > uint_max) {
   29445           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29446             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29447           0 :                                 return -1;
   29448             :                         }
   29449           0 :                         object->month = test_var;
   29450             :                 } else {
   29451           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29452             :                           PyLong_Type.tp_name);
   29453           0 :                         return -1;
   29454             :                 }
   29455             :         }
   29456           0 :         return 0;
   29457             : }
   29458             : 
   29459           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_year(PyObject *obj, void *closure)
   29460             : {
   29461           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(obj);
   29462           0 :         PyObject *py_year;
   29463           0 :         py_year = PyLong_FromUnsignedLongLong((uint32_t)(object->year));
   29464           0 :         return py_year;
   29465             : }
   29466             : 
   29467           0 : static int py_srvsvc_NetRemoteTODInfo_set_year(PyObject *py_obj, PyObject *value, void *closure)
   29468             : {
   29469           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(py_obj);
   29470           0 :         if (value == NULL) {
   29471           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->year");
   29472           0 :                 return -1;
   29473             :         }
   29474             :         {
   29475           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->year));
   29476           0 :                 if (PyLong_Check(value)) {
   29477           0 :                         unsigned long long test_var;
   29478           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29479           0 :                         if (PyErr_Occurred() != NULL) {
   29480           0 :                                 return -1;
   29481             :                         }
   29482           0 :                         if (test_var > uint_max) {
   29483           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29484             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29485           0 :                                 return -1;
   29486             :                         }
   29487           0 :                         object->year = test_var;
   29488             :                 } else {
   29489           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29490             :                           PyLong_Type.tp_name);
   29491           0 :                         return -1;
   29492             :                 }
   29493             :         }
   29494           0 :         return 0;
   29495             : }
   29496             : 
   29497           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_weekday(PyObject *obj, void *closure)
   29498             : {
   29499           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(obj);
   29500           0 :         PyObject *py_weekday;
   29501           0 :         py_weekday = PyLong_FromUnsignedLongLong((uint32_t)(object->weekday));
   29502           0 :         return py_weekday;
   29503             : }
   29504             : 
   29505           0 : static int py_srvsvc_NetRemoteTODInfo_set_weekday(PyObject *py_obj, PyObject *value, void *closure)
   29506             : {
   29507           0 :         struct srvsvc_NetRemoteTODInfo *object = pytalloc_get_ptr(py_obj);
   29508           0 :         if (value == NULL) {
   29509           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->weekday");
   29510           0 :                 return -1;
   29511             :         }
   29512             :         {
   29513           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->weekday));
   29514           0 :                 if (PyLong_Check(value)) {
   29515           0 :                         unsigned long long test_var;
   29516           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29517           0 :                         if (PyErr_Occurred() != NULL) {
   29518           0 :                                 return -1;
   29519             :                         }
   29520           0 :                         if (test_var > uint_max) {
   29521           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29522             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29523           0 :                                 return -1;
   29524             :                         }
   29525           0 :                         object->weekday = test_var;
   29526             :                 } else {
   29527           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29528             :                           PyLong_Type.tp_name);
   29529           0 :                         return -1;
   29530             :                 }
   29531             :         }
   29532           0 :         return 0;
   29533             : }
   29534             : 
   29535             : static PyGetSetDef py_srvsvc_NetRemoteTODInfo_getsetters[] = {
   29536             :         {
   29537             :                 .name = discard_const_p(char, "elapsed"),
   29538             :                 .get = py_srvsvc_NetRemoteTODInfo_get_elapsed,
   29539             :                 .set = py_srvsvc_NetRemoteTODInfo_set_elapsed,
   29540             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29541             :         },
   29542             :         {
   29543             :                 .name = discard_const_p(char, "msecs"),
   29544             :                 .get = py_srvsvc_NetRemoteTODInfo_get_msecs,
   29545             :                 .set = py_srvsvc_NetRemoteTODInfo_set_msecs,
   29546             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29547             :         },
   29548             :         {
   29549             :                 .name = discard_const_p(char, "hours"),
   29550             :                 .get = py_srvsvc_NetRemoteTODInfo_get_hours,
   29551             :                 .set = py_srvsvc_NetRemoteTODInfo_set_hours,
   29552             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29553             :         },
   29554             :         {
   29555             :                 .name = discard_const_p(char, "mins"),
   29556             :                 .get = py_srvsvc_NetRemoteTODInfo_get_mins,
   29557             :                 .set = py_srvsvc_NetRemoteTODInfo_set_mins,
   29558             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29559             :         },
   29560             :         {
   29561             :                 .name = discard_const_p(char, "secs"),
   29562             :                 .get = py_srvsvc_NetRemoteTODInfo_get_secs,
   29563             :                 .set = py_srvsvc_NetRemoteTODInfo_set_secs,
   29564             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29565             :         },
   29566             :         {
   29567             :                 .name = discard_const_p(char, "hunds"),
   29568             :                 .get = py_srvsvc_NetRemoteTODInfo_get_hunds,
   29569             :                 .set = py_srvsvc_NetRemoteTODInfo_set_hunds,
   29570             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29571             :         },
   29572             :         {
   29573             :                 .name = discard_const_p(char, "timezone"),
   29574             :                 .get = py_srvsvc_NetRemoteTODInfo_get_timezone,
   29575             :                 .set = py_srvsvc_NetRemoteTODInfo_set_timezone,
   29576             :                 .doc = discard_const_p(char, "PIDL-generated element of base type int32")
   29577             :         },
   29578             :         {
   29579             :                 .name = discard_const_p(char, "tinterval"),
   29580             :                 .get = py_srvsvc_NetRemoteTODInfo_get_tinterval,
   29581             :                 .set = py_srvsvc_NetRemoteTODInfo_set_tinterval,
   29582             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29583             :         },
   29584             :         {
   29585             :                 .name = discard_const_p(char, "day"),
   29586             :                 .get = py_srvsvc_NetRemoteTODInfo_get_day,
   29587             :                 .set = py_srvsvc_NetRemoteTODInfo_set_day,
   29588             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29589             :         },
   29590             :         {
   29591             :                 .name = discard_const_p(char, "month"),
   29592             :                 .get = py_srvsvc_NetRemoteTODInfo_get_month,
   29593             :                 .set = py_srvsvc_NetRemoteTODInfo_set_month,
   29594             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29595             :         },
   29596             :         {
   29597             :                 .name = discard_const_p(char, "year"),
   29598             :                 .get = py_srvsvc_NetRemoteTODInfo_get_year,
   29599             :                 .set = py_srvsvc_NetRemoteTODInfo_set_year,
   29600             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29601             :         },
   29602             :         {
   29603             :                 .name = discard_const_p(char, "weekday"),
   29604             :                 .get = py_srvsvc_NetRemoteTODInfo_get_weekday,
   29605             :                 .set = py_srvsvc_NetRemoteTODInfo_set_weekday,
   29606             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29607             :         },
   29608             :         { .name = NULL }
   29609             : };
   29610             : 
   29611           9 : static PyObject *py_srvsvc_NetRemoteTODInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29612             : {
   29613           9 :         return pytalloc_new(struct srvsvc_NetRemoteTODInfo, type);
   29614             : }
   29615             : 
   29616             : 
   29617             : static PyTypeObject srvsvc_NetRemoteTODInfo_Type = {
   29618             :         PyVarObject_HEAD_INIT(NULL, 0)
   29619             :         .tp_name = "srvsvc.NetRemoteTODInfo",
   29620             :         .tp_getset = py_srvsvc_NetRemoteTODInfo_getsetters,
   29621             :         .tp_methods = NULL,
   29622             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29623             :         .tp_new = py_srvsvc_NetRemoteTODInfo_new,
   29624             : };
   29625             : 
   29626           0 : static PyObject *py_import_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportInfo *in)
   29627             : {
   29628           0 :         PyObject *ret;
   29629             : 
   29630           0 :         switch (level) {
   29631           0 :                 case 0:
   29632           0 :                         ret = pytalloc_reference_ex(&srvsvc_NetTransportInfo0_Type, mem_ctx, &in->info0);
   29633           0 :                         return ret;
   29634             : 
   29635           0 :                 case 1:
   29636           0 :                         ret = pytalloc_reference_ex(&srvsvc_NetTransportInfo1_Type, mem_ctx, &in->info1);
   29637           0 :                         return ret;
   29638             : 
   29639           0 :                 case 2:
   29640           0 :                         ret = pytalloc_reference_ex(&srvsvc_NetTransportInfo2_Type, mem_ctx, &in->info2);
   29641           0 :                         return ret;
   29642             : 
   29643           0 :                 case 3:
   29644           0 :                         ret = pytalloc_reference_ex(&srvsvc_NetTransportInfo3_Type, mem_ctx, &in->info3);
   29645           0 :                         return ret;
   29646             : 
   29647             :         }
   29648           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   29649           0 :         return NULL;
   29650             : }
   29651             : 
   29652           0 : static union srvsvc_NetTransportInfo *py_export_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   29653             : {
   29654           0 :         union srvsvc_NetTransportInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetTransportInfo);
   29655           0 :         switch (level) {
   29656           0 :                 case 0:
   29657           0 :                         if (in == NULL) {
   29658           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info0");
   29659           0 :                                 talloc_free(ret); return NULL;
   29660             :                         }
   29661           0 :                         PY_CHECK_TYPE(&srvsvc_NetTransportInfo0_Type, in, talloc_free(ret); return NULL;);
   29662           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   29663           0 :                                 PyErr_NoMemory();
   29664           0 :                                 talloc_free(ret); return NULL;
   29665             :                         }
   29666           0 :                         ret->info0 = *(struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(in);
   29667           0 :                         break;
   29668             : 
   29669           0 :                 case 1:
   29670           0 :                         if (in == NULL) {
   29671           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1");
   29672           0 :                                 talloc_free(ret); return NULL;
   29673             :                         }
   29674           0 :                         PY_CHECK_TYPE(&srvsvc_NetTransportInfo1_Type, in, talloc_free(ret); return NULL;);
   29675           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   29676           0 :                                 PyErr_NoMemory();
   29677           0 :                                 talloc_free(ret); return NULL;
   29678             :                         }
   29679           0 :                         ret->info1 = *(struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(in);
   29680           0 :                         break;
   29681             : 
   29682           0 :                 case 2:
   29683           0 :                         if (in == NULL) {
   29684           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info2");
   29685           0 :                                 talloc_free(ret); return NULL;
   29686             :                         }
   29687           0 :                         PY_CHECK_TYPE(&srvsvc_NetTransportInfo2_Type, in, talloc_free(ret); return NULL;);
   29688           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   29689           0 :                                 PyErr_NoMemory();
   29690           0 :                                 talloc_free(ret); return NULL;
   29691             :                         }
   29692           0 :                         ret->info2 = *(struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(in);
   29693           0 :                         break;
   29694             : 
   29695           0 :                 case 3:
   29696           0 :                         if (in == NULL) {
   29697           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info3");
   29698           0 :                                 talloc_free(ret); return NULL;
   29699             :                         }
   29700           0 :                         PY_CHECK_TYPE(&srvsvc_NetTransportInfo3_Type, in, talloc_free(ret); return NULL;);
   29701           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   29702           0 :                                 PyErr_NoMemory();
   29703           0 :                                 talloc_free(ret); return NULL;
   29704             :                         }
   29705           0 :                         ret->info3 = *(struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(in);
   29706           0 :                         break;
   29707             : 
   29708           0 :                 default:
   29709           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   29710           0 :                         talloc_free(ret);
   29711           0 :                         ret = NULL;
   29712             :         }
   29713             : 
   29714           0 :         return ret;
   29715             : }
   29716             : 
   29717           0 : static PyObject *py_srvsvc_NetTransportInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29718             : {
   29719           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   29720           0 :         PyObject *mem_ctx_obj = NULL;
   29721           0 :         TALLOC_CTX *mem_ctx = NULL;
   29722           0 :         int level = 0;
   29723           0 :         PyObject *in_obj = NULL;
   29724           0 :         union srvsvc_NetTransportInfo *in = NULL;
   29725             : 
   29726           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   29727             :                 discard_const_p(char *, kwnames),
   29728             :                 &mem_ctx_obj,
   29729             :                 &level,
   29730             :                 &in_obj)) {
   29731           0 :                 return NULL;
   29732             :         }
   29733           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   29734           0 :         if (mem_ctx == NULL) {
   29735           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   29736           0 :                 return NULL;
   29737             :         }
   29738           0 :         in = (union srvsvc_NetTransportInfo *)pytalloc_get_ptr(in_obj);
   29739           0 :         if (in == NULL) {
   29740           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetTransportInfo!");
   29741           0 :                 return NULL;
   29742             :         }
   29743             : 
   29744           0 :         return py_import_srvsvc_NetTransportInfo(mem_ctx, level, in);
   29745             : }
   29746             : 
   29747           0 : static PyObject *py_srvsvc_NetTransportInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29748             : {
   29749           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   29750           0 :         PyObject *mem_ctx_obj = NULL;
   29751           0 :         TALLOC_CTX *mem_ctx = NULL;
   29752           0 :         int level = 0;
   29753           0 :         PyObject *in = NULL;
   29754           0 :         union srvsvc_NetTransportInfo *out = NULL;
   29755             : 
   29756           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   29757             :                 discard_const_p(char *, kwnames),
   29758             :                 &mem_ctx_obj,
   29759             :                 &level,
   29760             :                 &in)) {
   29761           0 :                 return NULL;
   29762             :         }
   29763           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   29764           0 :         if (mem_ctx == NULL) {
   29765           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   29766           0 :                 return NULL;
   29767             :         }
   29768             : 
   29769           0 :         out = py_export_srvsvc_NetTransportInfo(mem_ctx, level, in);
   29770           0 :         if (out == NULL) {
   29771           0 :                 return NULL;
   29772             :         }
   29773             : 
   29774           0 :         return pytalloc_GenericObject_reference(out);
   29775             : }
   29776             : 
   29777             : static PyMethodDef py_srvsvc_NetTransportInfo_methods[] = {
   29778             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportInfo_import),
   29779             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   29780             :                 "T.__import__(mem_ctx, level, in) => ret." },
   29781             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportInfo_export),
   29782             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   29783             :                 "T.__export__(mem_ctx, level, in) => ret." },
   29784             :         { NULL, NULL, 0, NULL }
   29785             : };
   29786             : 
   29787           0 : static PyObject *py_srvsvc_NetTransportInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29788             : {
   29789           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   29790           0 :         return NULL;
   29791             : }
   29792             : 
   29793             : 
   29794             : static PyTypeObject srvsvc_NetTransportInfo_Type = {
   29795             :         PyVarObject_HEAD_INIT(NULL, 0)
   29796             :         .tp_name = "srvsvc.NetTransportInfo",
   29797             :         .tp_getset = NULL,
   29798             :         .tp_methods = py_srvsvc_NetTransportInfo_methods,
   29799             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29800             :         .tp_new = py_srvsvc_NetTransportInfo_new,
   29801             : };
   29802             : 
   29803             : 
   29804             : 
   29805           0 : static PyObject *py_srvsvc_NetCharDevEnum_in_get_server_unc(PyObject *obj, void *closure)
   29806             : {
   29807           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(obj);
   29808           0 :         PyObject *py_server_unc;
   29809           0 :         if (object->in.server_unc == NULL) {
   29810           0 :                 Py_RETURN_NONE;
   29811             :         }
   29812           0 :         if (object->in.server_unc == NULL) {
   29813           0 :                 py_server_unc = Py_None;
   29814           0 :                 Py_INCREF(py_server_unc);
   29815             :         } else {
   29816           0 :                 if (object->in.server_unc == NULL) {
   29817           0 :                         py_server_unc = Py_None;
   29818           0 :                         Py_INCREF(py_server_unc);
   29819             :                 } else {
   29820           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   29821             :                 }
   29822             :         }
   29823           0 :         return py_server_unc;
   29824             : }
   29825             : 
   29826           0 : static int py_srvsvc_NetCharDevEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   29827             : {
   29828           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(py_obj);
   29829           0 :         if (value == NULL) {
   29830           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   29831           0 :                 return -1;
   29832             :         }
   29833           0 :         if (value == Py_None) {
   29834           0 :                 object->in.server_unc = NULL;
   29835             :         } else {
   29836           0 :                 object->in.server_unc = NULL;
   29837             :                 {
   29838           0 :                         const char *test_str;
   29839           0 :                         const char *talloc_str;
   29840           0 :                         PyObject *unicode = NULL;
   29841           0 :                         if (PyUnicode_Check(value)) {
   29842           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29843           0 :                                 if (unicode == NULL) {
   29844           0 :                                         return -1;
   29845             :                                 }
   29846           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29847           0 :                         } else if (PyBytes_Check(value)) {
   29848           0 :                                 test_str = PyBytes_AS_STRING(value);
   29849             :                         } else {
   29850           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29851           0 :                                 return -1;
   29852             :                         }
   29853           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29854           0 :                         if (unicode != NULL) {
   29855           0 :                                 Py_DECREF(unicode);
   29856             :                         }
   29857           0 :                         if (talloc_str == NULL) {
   29858           0 :                                 PyErr_NoMemory();
   29859           0 :                                 return -1;
   29860             :                         }
   29861           0 :                         object->in.server_unc = talloc_str;
   29862             :                 }
   29863             :         }
   29864           0 :         return 0;
   29865             : }
   29866             : 
   29867           0 : static PyObject *py_srvsvc_NetCharDevEnum_in_get_info_ctr(PyObject *obj, void *closure)
   29868             : {
   29869           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(obj);
   29870           0 :         PyObject *py_info_ctr;
   29871           0 :         if (object->in.info_ctr == NULL) {
   29872           0 :                 Py_RETURN_NONE;
   29873             :         }
   29874           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   29875           0 :         return py_info_ctr;
   29876             : }
   29877             : 
   29878           0 : static int py_srvsvc_NetCharDevEnum_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   29879             : {
   29880           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(py_obj);
   29881           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   29882           0 :         if (value == NULL) {
   29883           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info_ctr");
   29884           0 :                 return -1;
   29885             :         }
   29886           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   29887           0 :         if (object->in.info_ctr == NULL) {
   29888           0 :                 PyErr_NoMemory();
   29889           0 :                 return -1;
   29890             :         }
   29891           0 :         PY_CHECK_TYPE(&srvsvc_NetCharDevInfoCtr_Type, value, return -1;);
   29892           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   29893           0 :                 PyErr_NoMemory();
   29894           0 :                 return -1;
   29895             :         }
   29896           0 :         object->in.info_ctr = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(value);
   29897           0 :         return 0;
   29898             : }
   29899             : 
   29900           0 : static PyObject *py_srvsvc_NetCharDevEnum_out_get_info_ctr(PyObject *obj, void *closure)
   29901             : {
   29902           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(obj);
   29903           0 :         PyObject *py_info_ctr;
   29904           0 :         if (object->out.info_ctr == NULL) {
   29905           0 :                 Py_RETURN_NONE;
   29906             :         }
   29907           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   29908           0 :         return py_info_ctr;
   29909             : }
   29910             : 
   29911           0 : static int py_srvsvc_NetCharDevEnum_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   29912             : {
   29913           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(py_obj);
   29914           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   29915           0 :         if (value == NULL) {
   29916           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info_ctr");
   29917           0 :                 return -1;
   29918             :         }
   29919           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   29920           0 :         if (object->out.info_ctr == NULL) {
   29921           0 :                 PyErr_NoMemory();
   29922           0 :                 return -1;
   29923             :         }
   29924           0 :         PY_CHECK_TYPE(&srvsvc_NetCharDevInfoCtr_Type, value, return -1;);
   29925           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   29926           0 :                 PyErr_NoMemory();
   29927           0 :                 return -1;
   29928             :         }
   29929           0 :         object->out.info_ctr = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(value);
   29930           0 :         return 0;
   29931             : }
   29932             : 
   29933           0 : static PyObject *py_srvsvc_NetCharDevEnum_in_get_max_buffer(PyObject *obj, void *closure)
   29934             : {
   29935           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(obj);
   29936           0 :         PyObject *py_max_buffer;
   29937           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)(object->in.max_buffer));
   29938           0 :         return py_max_buffer;
   29939             : }
   29940             : 
   29941           0 : static int py_srvsvc_NetCharDevEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   29942             : {
   29943           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(py_obj);
   29944           0 :         if (value == NULL) {
   29945           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.max_buffer");
   29946           0 :                 return -1;
   29947             :         }
   29948             :         {
   29949           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   29950           0 :                 if (PyLong_Check(value)) {
   29951           0 :                         unsigned long long test_var;
   29952           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29953           0 :                         if (PyErr_Occurred() != NULL) {
   29954           0 :                                 return -1;
   29955             :                         }
   29956           0 :                         if (test_var > uint_max) {
   29957           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29958             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29959           0 :                                 return -1;
   29960             :                         }
   29961           0 :                         object->in.max_buffer = test_var;
   29962             :                 } else {
   29963           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29964             :                           PyLong_Type.tp_name);
   29965           0 :                         return -1;
   29966             :                 }
   29967             :         }
   29968           0 :         return 0;
   29969             : }
   29970             : 
   29971           0 : static PyObject *py_srvsvc_NetCharDevEnum_out_get_totalentries(PyObject *obj, void *closure)
   29972             : {
   29973           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(obj);
   29974           0 :         PyObject *py_totalentries;
   29975           0 :         if (object->out.totalentries == NULL) {
   29976           0 :                 Py_RETURN_NONE;
   29977             :         }
   29978           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.totalentries));
   29979           0 :         return py_totalentries;
   29980             : }
   29981             : 
   29982           0 : static int py_srvsvc_NetCharDevEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   29983             : {
   29984           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(py_obj);
   29985           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   29986           0 :         if (value == NULL) {
   29987           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.totalentries");
   29988           0 :                 return -1;
   29989             :         }
   29990           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   29991           0 :         if (object->out.totalentries == NULL) {
   29992           0 :                 PyErr_NoMemory();
   29993           0 :                 return -1;
   29994             :         }
   29995             :         {
   29996           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   29997           0 :                 if (PyLong_Check(value)) {
   29998           0 :                         unsigned long long test_var;
   29999           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30000           0 :                         if (PyErr_Occurred() != NULL) {
   30001           0 :                                 return -1;
   30002             :                         }
   30003           0 :                         if (test_var > uint_max) {
   30004           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30005             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30006           0 :                                 return -1;
   30007             :                         }
   30008           0 :                         *object->out.totalentries = test_var;
   30009             :                 } else {
   30010           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30011             :                           PyLong_Type.tp_name);
   30012           0 :                         return -1;
   30013             :                 }
   30014             :         }
   30015           0 :         return 0;
   30016             : }
   30017             : 
   30018           0 : static PyObject *py_srvsvc_NetCharDevEnum_in_get_resume_handle(PyObject *obj, void *closure)
   30019             : {
   30020           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(obj);
   30021           0 :         PyObject *py_resume_handle;
   30022           0 :         if (object->in.resume_handle == NULL) {
   30023           0 :                 Py_RETURN_NONE;
   30024             :         }
   30025           0 :         if (object->in.resume_handle == NULL) {
   30026           0 :                 py_resume_handle = Py_None;
   30027           0 :                 Py_INCREF(py_resume_handle);
   30028             :         } else {
   30029           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.resume_handle));
   30030             :         }
   30031           0 :         return py_resume_handle;
   30032             : }
   30033             : 
   30034           0 : static int py_srvsvc_NetCharDevEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   30035             : {
   30036           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(py_obj);
   30037           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   30038           0 :         if (value == NULL) {
   30039           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.resume_handle");
   30040           0 :                 return -1;
   30041             :         }
   30042           0 :         if (value == Py_None) {
   30043           0 :                 object->in.resume_handle = NULL;
   30044             :         } else {
   30045           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   30046           0 :                 if (object->in.resume_handle == NULL) {
   30047           0 :                         PyErr_NoMemory();
   30048           0 :                         return -1;
   30049             :                 }
   30050             :                 {
   30051           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   30052           0 :                         if (PyLong_Check(value)) {
   30053           0 :                                 unsigned long long test_var;
   30054           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   30055           0 :                                 if (PyErr_Occurred() != NULL) {
   30056           0 :                                         return -1;
   30057             :                                 }
   30058           0 :                                 if (test_var > uint_max) {
   30059           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30060             :                                           PyLong_Type.tp_name, uint_max, test_var);
   30061           0 :                                         return -1;
   30062             :                                 }
   30063           0 :                                 *object->in.resume_handle = test_var;
   30064             :                         } else {
   30065           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   30066             :                                   PyLong_Type.tp_name);
   30067           0 :                                 return -1;
   30068             :                         }
   30069             :                 }
   30070             :         }
   30071           0 :         return 0;
   30072             : }
   30073             : 
   30074           0 : static PyObject *py_srvsvc_NetCharDevEnum_out_get_resume_handle(PyObject *obj, void *closure)
   30075             : {
   30076           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(obj);
   30077           0 :         PyObject *py_resume_handle;
   30078           0 :         if (object->out.resume_handle == NULL) {
   30079           0 :                 Py_RETURN_NONE;
   30080             :         }
   30081           0 :         if (object->out.resume_handle == NULL) {
   30082           0 :                 py_resume_handle = Py_None;
   30083           0 :                 Py_INCREF(py_resume_handle);
   30084             :         } else {
   30085           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.resume_handle));
   30086             :         }
   30087           0 :         return py_resume_handle;
   30088             : }
   30089             : 
   30090           0 : static int py_srvsvc_NetCharDevEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   30091             : {
   30092           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(py_obj);
   30093           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   30094           0 :         if (value == NULL) {
   30095           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.resume_handle");
   30096           0 :                 return -1;
   30097             :         }
   30098           0 :         if (value == Py_None) {
   30099           0 :                 object->out.resume_handle = NULL;
   30100             :         } else {
   30101           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   30102           0 :                 if (object->out.resume_handle == NULL) {
   30103           0 :                         PyErr_NoMemory();
   30104           0 :                         return -1;
   30105             :                 }
   30106             :                 {
   30107           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   30108           0 :                         if (PyLong_Check(value)) {
   30109           0 :                                 unsigned long long test_var;
   30110           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   30111           0 :                                 if (PyErr_Occurred() != NULL) {
   30112           0 :                                         return -1;
   30113             :                                 }
   30114           0 :                                 if (test_var > uint_max) {
   30115           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30116             :                                           PyLong_Type.tp_name, uint_max, test_var);
   30117           0 :                                         return -1;
   30118             :                                 }
   30119           0 :                                 *object->out.resume_handle = test_var;
   30120             :                         } else {
   30121           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   30122             :                                   PyLong_Type.tp_name);
   30123           0 :                                 return -1;
   30124             :                         }
   30125             :                 }
   30126             :         }
   30127           0 :         return 0;
   30128             : }
   30129             : 
   30130           0 : static PyObject *py_srvsvc_NetCharDevEnum_get_result(PyObject *obj, void *closure)
   30131             : {
   30132           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(obj);
   30133           0 :         PyObject *py_result;
   30134           0 :         py_result = PyErr_FromWERROR(object->out.result);
   30135           0 :         return py_result;
   30136             : }
   30137             : 
   30138           0 : static int py_srvsvc_NetCharDevEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   30139             : {
   30140           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(py_obj);
   30141           0 :         if (value == NULL) {
   30142           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   30143           0 :                 return -1;
   30144             :         }
   30145           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   30146           0 :         return 0;
   30147             : }
   30148             : 
   30149             : static PyGetSetDef py_srvsvc_NetCharDevEnum_getsetters[] = {
   30150             :         {
   30151             :                 .name = discard_const_p(char, "in_server_unc"),
   30152             :                 .get = py_srvsvc_NetCharDevEnum_in_get_server_unc,
   30153             :                 .set = py_srvsvc_NetCharDevEnum_in_set_server_unc,
   30154             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30155             :         },
   30156             :         {
   30157             :                 .name = discard_const_p(char, "in_info_ctr"),
   30158             :                 .get = py_srvsvc_NetCharDevEnum_in_get_info_ctr,
   30159             :                 .set = py_srvsvc_NetCharDevEnum_in_set_info_ctr,
   30160             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevInfoCtr")
   30161             :         },
   30162             :         {
   30163             :                 .name = discard_const_p(char, "out_info_ctr"),
   30164             :                 .get = py_srvsvc_NetCharDevEnum_out_get_info_ctr,
   30165             :                 .set = py_srvsvc_NetCharDevEnum_out_set_info_ctr,
   30166             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevInfoCtr")
   30167             :         },
   30168             :         {
   30169             :                 .name = discard_const_p(char, "in_max_buffer"),
   30170             :                 .get = py_srvsvc_NetCharDevEnum_in_get_max_buffer,
   30171             :                 .set = py_srvsvc_NetCharDevEnum_in_set_max_buffer,
   30172             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30173             :         },
   30174             :         {
   30175             :                 .name = discard_const_p(char, "out_totalentries"),
   30176             :                 .get = py_srvsvc_NetCharDevEnum_out_get_totalentries,
   30177             :                 .set = py_srvsvc_NetCharDevEnum_out_set_totalentries,
   30178             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30179             :         },
   30180             :         {
   30181             :                 .name = discard_const_p(char, "in_resume_handle"),
   30182             :                 .get = py_srvsvc_NetCharDevEnum_in_get_resume_handle,
   30183             :                 .set = py_srvsvc_NetCharDevEnum_in_set_resume_handle,
   30184             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30185             :         },
   30186             :         {
   30187             :                 .name = discard_const_p(char, "out_resume_handle"),
   30188             :                 .get = py_srvsvc_NetCharDevEnum_out_get_resume_handle,
   30189             :                 .set = py_srvsvc_NetCharDevEnum_out_set_resume_handle,
   30190             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30191             :         },
   30192             :         {
   30193             :                 .name = discard_const_p(char, "result"),
   30194             :                 .get = py_srvsvc_NetCharDevEnum_get_result,
   30195             :                 .set = py_srvsvc_NetCharDevEnum_set_result,
   30196             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   30197             :         },
   30198             :         { .name = NULL }
   30199             : };
   30200             : 
   30201           0 : static PyObject *py_srvsvc_NetCharDevEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   30202             : {
   30203           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevEnum, type);
   30204           0 :         struct srvsvc_NetCharDevEnum *_self = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(self);
   30205           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   30206           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetCharDevInfoCtr);
   30207           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetCharDevInfoCtr);
   30208           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   30209           0 :         return self;
   30210             : }
   30211             : 
   30212           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   30213             : {
   30214             : 
   30215             : 
   30216           0 :         return PyLong_FromLong(0);
   30217             : }
   30218             : 
   30219           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   30220             : {
   30221           0 :         const struct ndr_interface_call *call = NULL;
   30222           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(py_obj);
   30223           0 :         PyObject *ret = NULL;
   30224           0 :         struct ndr_push *push = NULL;
   30225           0 :         DATA_BLOB blob;
   30226           0 :         enum ndr_err_code err;
   30227             : 
   30228           0 :         if (ndr_table_srvsvc.num_calls < 1) {
   30229           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevEnum_ndr_pack");
   30230           0 :                 return NULL;
   30231             :         }
   30232           0 :         call = &ndr_table_srvsvc.calls[0];
   30233             : 
   30234           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   30235           0 :         if (push == NULL) {
   30236           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30237           0 :                 return NULL;
   30238             :         }
   30239             : 
   30240           0 :         push->flags |= ndr_push_flags;
   30241             : 
   30242           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   30243           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30244           0 :                 TALLOC_FREE(push);
   30245           0 :                 PyErr_SetNdrError(err);
   30246           0 :                 return NULL;
   30247             :         }
   30248           0 :         blob = ndr_push_blob(push);
   30249           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   30250           0 :         TALLOC_FREE(push);
   30251           0 :         return ret;
   30252             : }
   30253             : 
   30254           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30255             : {
   30256           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30257           0 :         PyObject *bigendian_obj = NULL;
   30258           0 :         PyObject *ndr64_obj = NULL;
   30259           0 :         libndr_flags ndr_push_flags = 0;
   30260             : 
   30261           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   30262             :                 discard_const_p(char *, kwnames),
   30263             :                 &bigendian_obj,
   30264             :                 &ndr64_obj)) {
   30265           0 :                 return NULL;
   30266             :         }
   30267             : 
   30268           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30269           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   30270             :         }
   30271           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30272           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   30273             :         }
   30274             : 
   30275           0 :         return py_srvsvc_NetCharDevEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   30276             : }
   30277             : 
   30278           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30279             : {
   30280           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30281           0 :         PyObject *bigendian_obj = NULL;
   30282           0 :         PyObject *ndr64_obj = NULL;
   30283           0 :         libndr_flags ndr_push_flags = 0;
   30284             : 
   30285           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   30286             :                 discard_const_p(char *, kwnames),
   30287             :                 &bigendian_obj,
   30288             :                 &ndr64_obj)) {
   30289           0 :                 return NULL;
   30290             :         }
   30291             : 
   30292           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30293           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   30294             :         }
   30295           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30296           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   30297             :         }
   30298             : 
   30299           0 :         return py_srvsvc_NetCharDevEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   30300             : }
   30301             : 
   30302           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   30303             : {
   30304           0 :         const struct ndr_interface_call *call = NULL;
   30305           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(py_obj);
   30306           0 :         struct ndr_pull *pull = NULL;
   30307           0 :         enum ndr_err_code err;
   30308             : 
   30309           0 :         if (ndr_table_srvsvc.num_calls < 1) {
   30310           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevEnum_ndr_unpack");
   30311           0 :                 return NULL;
   30312             :         }
   30313           0 :         call = &ndr_table_srvsvc.calls[0];
   30314             : 
   30315           0 :         pull = ndr_pull_init_blob(blob, object);
   30316           0 :         if (pull == NULL) {
   30317           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30318           0 :                 return NULL;
   30319             :         }
   30320             : 
   30321           0 :         pull->flags |= ndr_pull_flags;
   30322             : 
   30323           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   30324           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30325           0 :                 TALLOC_FREE(pull);
   30326           0 :                 PyErr_SetNdrError(err);
   30327           0 :                 return NULL;
   30328             :         }
   30329           0 :         if (!allow_remaining) {
   30330           0 :                 uint32_t highest_ofs;
   30331             : 
   30332           0 :                 if (pull->offset > pull->relative_highest_offset) {
   30333           0 :                         highest_ofs = pull->offset;
   30334             :                 } else {
   30335           0 :                         highest_ofs = pull->relative_highest_offset;
   30336             :                 }
   30337           0 :                 if (highest_ofs < pull->data_size) {
   30338           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   30339             :                                 "not all bytes consumed ofs[%u] size[%u]",
   30340             :                                 highest_ofs, pull->data_size);
   30341           0 :                         TALLOC_FREE(pull);
   30342           0 :                         PyErr_SetNdrError(err);
   30343           0 :                         return NULL;
   30344             :                 }
   30345             :         }
   30346             : 
   30347           0 :         TALLOC_FREE(pull);
   30348           0 :         Py_RETURN_NONE;
   30349             : }
   30350             : 
   30351           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30352             : {
   30353           0 :         DATA_BLOB blob;
   30354           0 :         Py_ssize_t blob_length = 0;
   30355           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   30356           0 :         PyObject *bigendian_obj = NULL;
   30357           0 :         PyObject *ndr64_obj = NULL;
   30358           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   30359           0 :         PyObject *allow_remaining_obj = NULL;
   30360           0 :         bool allow_remaining = false;
   30361             : 
   30362           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   30363             :                 discard_const_p(char *, kwnames),
   30364             :                 &blob.data, &blob_length,
   30365             :                 &bigendian_obj,
   30366             :                 &ndr64_obj,
   30367             :                 &allow_remaining_obj)) {
   30368           0 :                 return NULL;
   30369             :         }
   30370           0 :         blob.length = blob_length;
   30371             : 
   30372           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30373           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   30374             :         }
   30375           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30376           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   30377             :         }
   30378             : 
   30379           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   30380           0 :                 allow_remaining = true;
   30381             :         }
   30382             : 
   30383           0 :         return py_srvsvc_NetCharDevEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   30384             : }
   30385             : 
   30386           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30387             : {
   30388           0 :         DATA_BLOB blob;
   30389           0 :         Py_ssize_t blob_length = 0;
   30390           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   30391           0 :         PyObject *bigendian_obj = NULL;
   30392           0 :         PyObject *ndr64_obj = NULL;
   30393           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   30394           0 :         PyObject *allow_remaining_obj = NULL;
   30395           0 :         bool allow_remaining = false;
   30396             : 
   30397           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   30398             :                 discard_const_p(char *, kwnames),
   30399             :                 &blob.data, &blob_length,
   30400             :                 &bigendian_obj,
   30401             :                 &ndr64_obj,
   30402             :                 &allow_remaining_obj)) {
   30403           0 :                 return NULL;
   30404             :         }
   30405           0 :         blob.length = blob_length;
   30406             : 
   30407           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30408           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   30409             :         }
   30410           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30411           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   30412             :         }
   30413             : 
   30414           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   30415           0 :                 allow_remaining = true;
   30416             :         }
   30417             : 
   30418           0 :         return py_srvsvc_NetCharDevEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   30419             : }
   30420             : 
   30421           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   30422             : {
   30423           0 :         const struct ndr_interface_call *call = NULL;
   30424           0 :         struct srvsvc_NetCharDevEnum *object = pytalloc_get_ptr(py_obj);
   30425           0 :         PyObject *ret;
   30426           0 :         char *retstr;
   30427             : 
   30428           0 :         if (ndr_table_srvsvc.num_calls < 1) {
   30429           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevEnum_ndr_print");
   30430           0 :                 return NULL;
   30431             :         }
   30432           0 :         call = &ndr_table_srvsvc.calls[0];
   30433             : 
   30434           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   30435           0 :         ret = PyUnicode_FromString(retstr);
   30436           0 :         TALLOC_FREE(retstr);
   30437             : 
   30438           0 :         return ret;
   30439             : }
   30440             : 
   30441           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30442             : {
   30443           0 :         return py_srvsvc_NetCharDevEnum_ndr_print(py_obj, "srvsvc_NetCharDevEnum_in", NDR_IN);
   30444             : }
   30445             : 
   30446           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30447             : {
   30448           0 :         return py_srvsvc_NetCharDevEnum_ndr_print(py_obj, "srvsvc_NetCharDevEnum_out", NDR_OUT);
   30449             : }
   30450             : 
   30451             : static PyMethodDef py_srvsvc_NetCharDevEnum_methods[] = {
   30452             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   30453             :                 "srvsvc.NetCharDevEnum.opnum() -> 0 (0x00) " },
   30454             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   30455             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   30456             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   30457             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   30458             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   30459             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   30460             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   30461             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   30462             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   30463             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   30464             :         { NULL, NULL, 0, NULL }
   30465             : };
   30466             : 
   30467             : 
   30468             : static PyTypeObject srvsvc_NetCharDevEnum_Type = {
   30469             :         PyVarObject_HEAD_INIT(NULL, 0)
   30470             :         .tp_name = "srvsvc.NetCharDevEnum",
   30471             :         .tp_getset = py_srvsvc_NetCharDevEnum_getsetters,
   30472             :         .tp_methods = py_srvsvc_NetCharDevEnum_methods,
   30473             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   30474             :         .tp_new = py_srvsvc_NetCharDevEnum_new,
   30475             : };
   30476             : 
   30477           0 : static bool pack_py_srvsvc_NetCharDevEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevEnum *r)
   30478             : {
   30479           0 :         PyObject *py_server_unc;
   30480           0 :         PyObject *py_info_ctr;
   30481           0 :         PyObject *py_max_buffer;
   30482           0 :         PyObject *py_resume_handle;
   30483           0 :         const char *kwnames[] = {
   30484             :                 "server_unc", "info_ctr", "max_buffer", "resume_handle", NULL
   30485             :         };
   30486             : 
   30487           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)) {
   30488           0 :                 return false;
   30489             :         }
   30490             : 
   30491           0 :         if (py_server_unc == NULL) {
   30492           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   30493           0 :                 return false;
   30494             :         }
   30495           0 :         if (py_server_unc == Py_None) {
   30496           0 :                 r->in.server_unc = NULL;
   30497             :         } else {
   30498           0 :                 r->in.server_unc = NULL;
   30499             :                 {
   30500           0 :                         const char *test_str;
   30501           0 :                         const char *talloc_str;
   30502           0 :                         PyObject *unicode = NULL;
   30503           0 :                         if (PyUnicode_Check(py_server_unc)) {
   30504           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   30505           0 :                                 if (unicode == NULL) {
   30506           0 :                                         return false;
   30507             :                                 }
   30508           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30509           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   30510           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   30511             :                         } else {
   30512           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   30513           0 :                                 return false;
   30514             :                         }
   30515           0 :                         talloc_str = talloc_strdup(r, test_str);
   30516           0 :                         if (unicode != NULL) {
   30517           0 :                                 Py_DECREF(unicode);
   30518             :                         }
   30519           0 :                         if (talloc_str == NULL) {
   30520           0 :                                 PyErr_NoMemory();
   30521           0 :                                 return false;
   30522             :                         }
   30523           0 :                         r->in.server_unc = talloc_str;
   30524             :                 }
   30525             :         }
   30526           0 :         if (py_info_ctr == NULL) {
   30527           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info_ctr");
   30528           0 :                 return false;
   30529             :         }
   30530           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   30531           0 :         if (r->in.info_ctr == NULL) {
   30532           0 :                 PyErr_NoMemory();
   30533           0 :                 return false;
   30534             :         }
   30535           0 :         PY_CHECK_TYPE(&srvsvc_NetCharDevInfoCtr_Type, py_info_ctr, return false;);
   30536           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   30537           0 :                 PyErr_NoMemory();
   30538           0 :                 return false;
   30539             :         }
   30540           0 :         r->in.info_ctr = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   30541           0 :         if (py_max_buffer == NULL) {
   30542           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.max_buffer");
   30543           0 :                 return false;
   30544             :         }
   30545             :         {
   30546           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   30547           0 :                 if (PyLong_Check(py_max_buffer)) {
   30548           0 :                         unsigned long long test_var;
   30549           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   30550           0 :                         if (PyErr_Occurred() != NULL) {
   30551           0 :                                 return false;
   30552             :                         }
   30553           0 :                         if (test_var > uint_max) {
   30554           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30555             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30556           0 :                                 return false;
   30557             :                         }
   30558           0 :                         r->in.max_buffer = test_var;
   30559             :                 } else {
   30560           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30561             :                           PyLong_Type.tp_name);
   30562           0 :                         return false;
   30563             :                 }
   30564             :         }
   30565           0 :         if (py_resume_handle == NULL) {
   30566           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.resume_handle");
   30567           0 :                 return false;
   30568             :         }
   30569           0 :         if (py_resume_handle == Py_None) {
   30570           0 :                 r->in.resume_handle = NULL;
   30571             :         } else {
   30572           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   30573           0 :                 if (r->in.resume_handle == NULL) {
   30574           0 :                         PyErr_NoMemory();
   30575           0 :                         return false;
   30576             :                 }
   30577             :                 {
   30578           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   30579           0 :                         if (PyLong_Check(py_resume_handle)) {
   30580           0 :                                 unsigned long long test_var;
   30581           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   30582           0 :                                 if (PyErr_Occurred() != NULL) {
   30583           0 :                                         return false;
   30584             :                                 }
   30585           0 :                                 if (test_var > uint_max) {
   30586           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30587             :                                           PyLong_Type.tp_name, uint_max, test_var);
   30588           0 :                                         return false;
   30589             :                                 }
   30590           0 :                                 *r->in.resume_handle = test_var;
   30591             :                         } else {
   30592           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   30593             :                                   PyLong_Type.tp_name);
   30594           0 :                                 return false;
   30595             :                         }
   30596             :                 }
   30597             :         }
   30598           0 :         return true;
   30599             : }
   30600             : 
   30601           0 : static PyObject *unpack_py_srvsvc_NetCharDevEnum_args_out(struct srvsvc_NetCharDevEnum *r)
   30602             : {
   30603           0 :         PyObject *result;
   30604           0 :         PyObject *py_info_ctr;
   30605           0 :         PyObject *py_totalentries;
   30606           0 :         PyObject *py_resume_handle;
   30607           0 :         result = PyTuple_New(3);
   30608           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   30609           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   30610           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.totalentries));
   30611           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   30612           0 :         if (r->out.resume_handle == NULL) {
   30613           0 :                 py_resume_handle = Py_None;
   30614           0 :                 Py_INCREF(py_resume_handle);
   30615             :         } else {
   30616           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.resume_handle));
   30617             :         }
   30618           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   30619           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   30620           0 :                 PyErr_SetWERROR(r->out.result);
   30621           0 :                 return NULL;
   30622             :         }
   30623             : 
   30624           0 :         return result;
   30625             : }
   30626             : 
   30627             : 
   30628           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_in_get_server_unc(PyObject *obj, void *closure)
   30629             : {
   30630           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(obj);
   30631           0 :         PyObject *py_server_unc;
   30632           0 :         if (object->in.server_unc == NULL) {
   30633           0 :                 Py_RETURN_NONE;
   30634             :         }
   30635           0 :         if (object->in.server_unc == NULL) {
   30636           0 :                 py_server_unc = Py_None;
   30637           0 :                 Py_INCREF(py_server_unc);
   30638             :         } else {
   30639           0 :                 if (object->in.server_unc == NULL) {
   30640           0 :                         py_server_unc = Py_None;
   30641           0 :                         Py_INCREF(py_server_unc);
   30642             :                 } else {
   30643           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   30644             :                 }
   30645             :         }
   30646           0 :         return py_server_unc;
   30647             : }
   30648             : 
   30649           0 : static int py_srvsvc_NetCharDevGetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   30650             : {
   30651           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(py_obj);
   30652           0 :         if (value == NULL) {
   30653           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   30654           0 :                 return -1;
   30655             :         }
   30656           0 :         if (value == Py_None) {
   30657           0 :                 object->in.server_unc = NULL;
   30658             :         } else {
   30659           0 :                 object->in.server_unc = NULL;
   30660             :                 {
   30661           0 :                         const char *test_str;
   30662           0 :                         const char *talloc_str;
   30663           0 :                         PyObject *unicode = NULL;
   30664           0 :                         if (PyUnicode_Check(value)) {
   30665           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30666           0 :                                 if (unicode == NULL) {
   30667           0 :                                         return -1;
   30668             :                                 }
   30669           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30670           0 :                         } else if (PyBytes_Check(value)) {
   30671           0 :                                 test_str = PyBytes_AS_STRING(value);
   30672             :                         } else {
   30673           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30674           0 :                                 return -1;
   30675             :                         }
   30676           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30677           0 :                         if (unicode != NULL) {
   30678           0 :                                 Py_DECREF(unicode);
   30679             :                         }
   30680           0 :                         if (talloc_str == NULL) {
   30681           0 :                                 PyErr_NoMemory();
   30682           0 :                                 return -1;
   30683             :                         }
   30684           0 :                         object->in.server_unc = talloc_str;
   30685             :                 }
   30686             :         }
   30687           0 :         return 0;
   30688             : }
   30689             : 
   30690           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_in_get_device_name(PyObject *obj, void *closure)
   30691             : {
   30692           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(obj);
   30693           0 :         PyObject *py_device_name;
   30694           0 :         if (object->in.device_name == NULL) {
   30695           0 :                 py_device_name = Py_None;
   30696           0 :                 Py_INCREF(py_device_name);
   30697             :         } else {
   30698           0 :                 py_device_name = PyUnicode_Decode(object->in.device_name, strlen(object->in.device_name), "utf-8", "ignore");
   30699             :         }
   30700           0 :         return py_device_name;
   30701             : }
   30702             : 
   30703           0 : static int py_srvsvc_NetCharDevGetInfo_in_set_device_name(PyObject *py_obj, PyObject *value, void *closure)
   30704             : {
   30705           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(py_obj);
   30706           0 :         if (value == NULL) {
   30707           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.device_name");
   30708           0 :                 return -1;
   30709             :         }
   30710             :         {
   30711           0 :                 const char *test_str;
   30712           0 :                 const char *talloc_str;
   30713           0 :                 PyObject *unicode = NULL;
   30714           0 :                 if (PyUnicode_Check(value)) {
   30715           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30716           0 :                         if (unicode == NULL) {
   30717           0 :                                 return -1;
   30718             :                         }
   30719           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30720           0 :                 } else if (PyBytes_Check(value)) {
   30721           0 :                         test_str = PyBytes_AS_STRING(value);
   30722             :                 } else {
   30723           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30724           0 :                         return -1;
   30725             :                 }
   30726           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30727           0 :                 if (unicode != NULL) {
   30728           0 :                         Py_DECREF(unicode);
   30729             :                 }
   30730           0 :                 if (talloc_str == NULL) {
   30731           0 :                         PyErr_NoMemory();
   30732           0 :                         return -1;
   30733             :                 }
   30734           0 :                 object->in.device_name = talloc_str;
   30735             :         }
   30736           0 :         return 0;
   30737             : }
   30738             : 
   30739           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_in_get_level(PyObject *obj, void *closure)
   30740             : {
   30741           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(obj);
   30742           0 :         PyObject *py_level;
   30743           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   30744           0 :         return py_level;
   30745             : }
   30746             : 
   30747           0 : static int py_srvsvc_NetCharDevGetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   30748             : {
   30749           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(py_obj);
   30750           0 :         if (value == NULL) {
   30751           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   30752           0 :                 return -1;
   30753             :         }
   30754             :         {
   30755           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   30756           0 :                 if (PyLong_Check(value)) {
   30757           0 :                         unsigned long long test_var;
   30758           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30759           0 :                         if (PyErr_Occurred() != NULL) {
   30760           0 :                                 return -1;
   30761             :                         }
   30762           0 :                         if (test_var > uint_max) {
   30763           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30764             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30765           0 :                                 return -1;
   30766             :                         }
   30767           0 :                         object->in.level = test_var;
   30768             :                 } else {
   30769           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30770             :                           PyLong_Type.tp_name);
   30771           0 :                         return -1;
   30772             :                 }
   30773             :         }
   30774           0 :         return 0;
   30775             : }
   30776             : 
   30777           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_out_get_info(PyObject *obj, void *closure)
   30778             : {
   30779           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(obj);
   30780           0 :         PyObject *py_info;
   30781           0 :         if (object->out.info == NULL) {
   30782           0 :                 Py_RETURN_NONE;
   30783             :         }
   30784           0 :         py_info = pyrpc_import_union(&srvsvc_NetCharDevInfo_Type, object->out.info, object->in.level, object->out.info, "union srvsvc_NetCharDevInfo");
   30785           0 :         if (py_info == NULL) {
   30786           0 :                 return NULL;
   30787             :         }
   30788           0 :         return py_info;
   30789             : }
   30790             : 
   30791           0 : static int py_srvsvc_NetCharDevGetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   30792             : {
   30793           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(py_obj);
   30794           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   30795           0 :         if (value == NULL) {
   30796           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   30797           0 :                 return -1;
   30798             :         }
   30799           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   30800           0 :         if (object->out.info == NULL) {
   30801           0 :                 PyErr_NoMemory();
   30802           0 :                 return -1;
   30803             :         }
   30804             :         {
   30805           0 :                 union srvsvc_NetCharDevInfo *info_switch_1;
   30806           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");
   30807           0 :                 if (info_switch_1 == NULL) {
   30808           0 :                         return -1;
   30809             :                 }
   30810           0 :                 object->out.info = info_switch_1;
   30811             :         }
   30812           0 :         return 0;
   30813             : }
   30814             : 
   30815           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_get_result(PyObject *obj, void *closure)
   30816             : {
   30817           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(obj);
   30818           0 :         PyObject *py_result;
   30819           0 :         py_result = PyErr_FromWERROR(object->out.result);
   30820           0 :         return py_result;
   30821             : }
   30822             : 
   30823           0 : static int py_srvsvc_NetCharDevGetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   30824             : {
   30825           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(py_obj);
   30826           0 :         if (value == NULL) {
   30827           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   30828           0 :                 return -1;
   30829             :         }
   30830           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   30831           0 :         return 0;
   30832             : }
   30833             : 
   30834             : static PyGetSetDef py_srvsvc_NetCharDevGetInfo_getsetters[] = {
   30835             :         {
   30836             :                 .name = discard_const_p(char, "in_server_unc"),
   30837             :                 .get = py_srvsvc_NetCharDevGetInfo_in_get_server_unc,
   30838             :                 .set = py_srvsvc_NetCharDevGetInfo_in_set_server_unc,
   30839             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30840             :         },
   30841             :         {
   30842             :                 .name = discard_const_p(char, "in_device_name"),
   30843             :                 .get = py_srvsvc_NetCharDevGetInfo_in_get_device_name,
   30844             :                 .set = py_srvsvc_NetCharDevGetInfo_in_set_device_name,
   30845             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30846             :         },
   30847             :         {
   30848             :                 .name = discard_const_p(char, "in_level"),
   30849             :                 .get = py_srvsvc_NetCharDevGetInfo_in_get_level,
   30850             :                 .set = py_srvsvc_NetCharDevGetInfo_in_set_level,
   30851             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30852             :         },
   30853             :         {
   30854             :                 .name = discard_const_p(char, "out_info"),
   30855             :                 .get = py_srvsvc_NetCharDevGetInfo_out_get_info,
   30856             :                 .set = py_srvsvc_NetCharDevGetInfo_out_set_info,
   30857             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevInfo")
   30858             :         },
   30859             :         {
   30860             :                 .name = discard_const_p(char, "result"),
   30861             :                 .get = py_srvsvc_NetCharDevGetInfo_get_result,
   30862             :                 .set = py_srvsvc_NetCharDevGetInfo_set_result,
   30863             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   30864             :         },
   30865             :         { .name = NULL }
   30866             : };
   30867             : 
   30868           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   30869             : {
   30870           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevGetInfo, type);
   30871           0 :         struct srvsvc_NetCharDevGetInfo *_self = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(self);
   30872           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   30873           0 :         _self->out.info = talloc_zero(mem_ctx, union srvsvc_NetCharDevInfo);
   30874           0 :         return self;
   30875             : }
   30876             : 
   30877           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   30878             : {
   30879             : 
   30880             : 
   30881           0 :         return PyLong_FromLong(1);
   30882             : }
   30883             : 
   30884           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   30885             : {
   30886           0 :         const struct ndr_interface_call *call = NULL;
   30887           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(py_obj);
   30888           0 :         PyObject *ret = NULL;
   30889           0 :         struct ndr_push *push = NULL;
   30890           0 :         DATA_BLOB blob;
   30891           0 :         enum ndr_err_code err;
   30892             : 
   30893           0 :         if (ndr_table_srvsvc.num_calls < 2) {
   30894           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevGetInfo_ndr_pack");
   30895           0 :                 return NULL;
   30896             :         }
   30897           0 :         call = &ndr_table_srvsvc.calls[1];
   30898             : 
   30899           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   30900           0 :         if (push == NULL) {
   30901           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30902           0 :                 return NULL;
   30903             :         }
   30904             : 
   30905           0 :         push->flags |= ndr_push_flags;
   30906             : 
   30907           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   30908           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30909           0 :                 TALLOC_FREE(push);
   30910           0 :                 PyErr_SetNdrError(err);
   30911           0 :                 return NULL;
   30912             :         }
   30913           0 :         blob = ndr_push_blob(push);
   30914           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   30915           0 :         TALLOC_FREE(push);
   30916           0 :         return ret;
   30917             : }
   30918             : 
   30919           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30920             : {
   30921           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30922           0 :         PyObject *bigendian_obj = NULL;
   30923           0 :         PyObject *ndr64_obj = NULL;
   30924           0 :         libndr_flags ndr_push_flags = 0;
   30925             : 
   30926           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   30927             :                 discard_const_p(char *, kwnames),
   30928             :                 &bigendian_obj,
   30929             :                 &ndr64_obj)) {
   30930           0 :                 return NULL;
   30931             :         }
   30932             : 
   30933           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30934           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   30935             :         }
   30936           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30937           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   30938             :         }
   30939             : 
   30940           0 :         return py_srvsvc_NetCharDevGetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   30941             : }
   30942             : 
   30943           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30944             : {
   30945           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30946           0 :         PyObject *bigendian_obj = NULL;
   30947           0 :         PyObject *ndr64_obj = NULL;
   30948           0 :         libndr_flags ndr_push_flags = 0;
   30949             : 
   30950           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   30951             :                 discard_const_p(char *, kwnames),
   30952             :                 &bigendian_obj,
   30953             :                 &ndr64_obj)) {
   30954           0 :                 return NULL;
   30955             :         }
   30956             : 
   30957           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30958           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   30959             :         }
   30960           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30961           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   30962             :         }
   30963             : 
   30964           0 :         return py_srvsvc_NetCharDevGetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   30965             : }
   30966             : 
   30967           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   30968             : {
   30969           0 :         const struct ndr_interface_call *call = NULL;
   30970           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(py_obj);
   30971           0 :         struct ndr_pull *pull = NULL;
   30972           0 :         enum ndr_err_code err;
   30973             : 
   30974           0 :         if (ndr_table_srvsvc.num_calls < 2) {
   30975           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevGetInfo_ndr_unpack");
   30976           0 :                 return NULL;
   30977             :         }
   30978           0 :         call = &ndr_table_srvsvc.calls[1];
   30979             : 
   30980           0 :         pull = ndr_pull_init_blob(blob, object);
   30981           0 :         if (pull == NULL) {
   30982           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30983           0 :                 return NULL;
   30984             :         }
   30985             : 
   30986           0 :         pull->flags |= ndr_pull_flags;
   30987             : 
   30988           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   30989           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30990           0 :                 TALLOC_FREE(pull);
   30991           0 :                 PyErr_SetNdrError(err);
   30992           0 :                 return NULL;
   30993             :         }
   30994           0 :         if (!allow_remaining) {
   30995           0 :                 uint32_t highest_ofs;
   30996             : 
   30997           0 :                 if (pull->offset > pull->relative_highest_offset) {
   30998           0 :                         highest_ofs = pull->offset;
   30999             :                 } else {
   31000           0 :                         highest_ofs = pull->relative_highest_offset;
   31001             :                 }
   31002           0 :                 if (highest_ofs < pull->data_size) {
   31003           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   31004             :                                 "not all bytes consumed ofs[%u] size[%u]",
   31005             :                                 highest_ofs, pull->data_size);
   31006           0 :                         TALLOC_FREE(pull);
   31007           0 :                         PyErr_SetNdrError(err);
   31008           0 :                         return NULL;
   31009             :                 }
   31010             :         }
   31011             : 
   31012           0 :         TALLOC_FREE(pull);
   31013           0 :         Py_RETURN_NONE;
   31014             : }
   31015             : 
   31016           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31017             : {
   31018           0 :         DATA_BLOB blob;
   31019           0 :         Py_ssize_t blob_length = 0;
   31020           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31021           0 :         PyObject *bigendian_obj = NULL;
   31022           0 :         PyObject *ndr64_obj = NULL;
   31023           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31024           0 :         PyObject *allow_remaining_obj = NULL;
   31025           0 :         bool allow_remaining = false;
   31026             : 
   31027           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   31028             :                 discard_const_p(char *, kwnames),
   31029             :                 &blob.data, &blob_length,
   31030             :                 &bigendian_obj,
   31031             :                 &ndr64_obj,
   31032             :                 &allow_remaining_obj)) {
   31033           0 :                 return NULL;
   31034             :         }
   31035           0 :         blob.length = blob_length;
   31036             : 
   31037           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31038           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31039             :         }
   31040           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31041           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31042             :         }
   31043             : 
   31044           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31045           0 :                 allow_remaining = true;
   31046             :         }
   31047             : 
   31048           0 :         return py_srvsvc_NetCharDevGetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   31049             : }
   31050             : 
   31051           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31052             : {
   31053           0 :         DATA_BLOB blob;
   31054           0 :         Py_ssize_t blob_length = 0;
   31055           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31056           0 :         PyObject *bigendian_obj = NULL;
   31057           0 :         PyObject *ndr64_obj = NULL;
   31058           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31059           0 :         PyObject *allow_remaining_obj = NULL;
   31060           0 :         bool allow_remaining = false;
   31061             : 
   31062           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   31063             :                 discard_const_p(char *, kwnames),
   31064             :                 &blob.data, &blob_length,
   31065             :                 &bigendian_obj,
   31066             :                 &ndr64_obj,
   31067             :                 &allow_remaining_obj)) {
   31068           0 :                 return NULL;
   31069             :         }
   31070           0 :         blob.length = blob_length;
   31071             : 
   31072           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31073           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31074             :         }
   31075           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31076           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31077             :         }
   31078             : 
   31079           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31080           0 :                 allow_remaining = true;
   31081             :         }
   31082             : 
   31083           0 :         return py_srvsvc_NetCharDevGetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   31084             : }
   31085             : 
   31086           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   31087             : {
   31088           0 :         const struct ndr_interface_call *call = NULL;
   31089           0 :         struct srvsvc_NetCharDevGetInfo *object = pytalloc_get_ptr(py_obj);
   31090           0 :         PyObject *ret;
   31091           0 :         char *retstr;
   31092             : 
   31093           0 :         if (ndr_table_srvsvc.num_calls < 2) {
   31094           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevGetInfo_ndr_print");
   31095           0 :                 return NULL;
   31096             :         }
   31097           0 :         call = &ndr_table_srvsvc.calls[1];
   31098             : 
   31099           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   31100           0 :         ret = PyUnicode_FromString(retstr);
   31101           0 :         TALLOC_FREE(retstr);
   31102             : 
   31103           0 :         return ret;
   31104             : }
   31105             : 
   31106           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31107             : {
   31108           0 :         return py_srvsvc_NetCharDevGetInfo_ndr_print(py_obj, "srvsvc_NetCharDevGetInfo_in", NDR_IN);
   31109             : }
   31110             : 
   31111           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31112             : {
   31113           0 :         return py_srvsvc_NetCharDevGetInfo_ndr_print(py_obj, "srvsvc_NetCharDevGetInfo_out", NDR_OUT);
   31114             : }
   31115             : 
   31116             : static PyMethodDef py_srvsvc_NetCharDevGetInfo_methods[] = {
   31117             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevGetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   31118             :                 "srvsvc.NetCharDevGetInfo.opnum() -> 1 (0x01) " },
   31119             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevGetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   31120             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   31121             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevGetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   31122             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   31123             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevGetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   31124             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   31125             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevGetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   31126             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   31127             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevGetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   31128             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevGetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   31129             :         { NULL, NULL, 0, NULL }
   31130             : };
   31131             : 
   31132             : 
   31133             : static PyTypeObject srvsvc_NetCharDevGetInfo_Type = {
   31134             :         PyVarObject_HEAD_INIT(NULL, 0)
   31135             :         .tp_name = "srvsvc.NetCharDevGetInfo",
   31136             :         .tp_getset = py_srvsvc_NetCharDevGetInfo_getsetters,
   31137             :         .tp_methods = py_srvsvc_NetCharDevGetInfo_methods,
   31138             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   31139             :         .tp_new = py_srvsvc_NetCharDevGetInfo_new,
   31140             : };
   31141             : 
   31142           0 : static bool pack_py_srvsvc_NetCharDevGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevGetInfo *r)
   31143             : {
   31144           0 :         PyObject *py_server_unc;
   31145           0 :         PyObject *py_device_name;
   31146           0 :         PyObject *py_level;
   31147           0 :         const char *kwnames[] = {
   31148             :                 "server_unc", "device_name", "level", NULL
   31149             :         };
   31150             : 
   31151           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetCharDevGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_device_name, &py_level)) {
   31152           0 :                 return false;
   31153             :         }
   31154             : 
   31155           0 :         if (py_server_unc == NULL) {
   31156           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   31157           0 :                 return false;
   31158             :         }
   31159           0 :         if (py_server_unc == Py_None) {
   31160           0 :                 r->in.server_unc = NULL;
   31161             :         } else {
   31162           0 :                 r->in.server_unc = NULL;
   31163             :                 {
   31164           0 :                         const char *test_str;
   31165           0 :                         const char *talloc_str;
   31166           0 :                         PyObject *unicode = NULL;
   31167           0 :                         if (PyUnicode_Check(py_server_unc)) {
   31168           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   31169           0 :                                 if (unicode == NULL) {
   31170           0 :                                         return false;
   31171             :                                 }
   31172           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31173           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   31174           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   31175             :                         } else {
   31176           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   31177           0 :                                 return false;
   31178             :                         }
   31179           0 :                         talloc_str = talloc_strdup(r, test_str);
   31180           0 :                         if (unicode != NULL) {
   31181           0 :                                 Py_DECREF(unicode);
   31182             :                         }
   31183           0 :                         if (talloc_str == NULL) {
   31184           0 :                                 PyErr_NoMemory();
   31185           0 :                                 return false;
   31186             :                         }
   31187           0 :                         r->in.server_unc = talloc_str;
   31188             :                 }
   31189             :         }
   31190           0 :         if (py_device_name == NULL) {
   31191           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.device_name");
   31192           0 :                 return false;
   31193             :         }
   31194             :         {
   31195           0 :                 const char *test_str;
   31196           0 :                 const char *talloc_str;
   31197           0 :                 PyObject *unicode = NULL;
   31198           0 :                 if (PyUnicode_Check(py_device_name)) {
   31199           0 :                         unicode = PyUnicode_AsEncodedString(py_device_name, "utf-8", "ignore");
   31200           0 :                         if (unicode == NULL) {
   31201           0 :                                 return false;
   31202             :                         }
   31203           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31204           0 :                 } else if (PyBytes_Check(py_device_name)) {
   31205           0 :                         test_str = PyBytes_AS_STRING(py_device_name);
   31206             :                 } else {
   31207           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_device_name)->tp_name);
   31208           0 :                         return false;
   31209             :                 }
   31210           0 :                 talloc_str = talloc_strdup(r, test_str);
   31211           0 :                 if (unicode != NULL) {
   31212           0 :                         Py_DECREF(unicode);
   31213             :                 }
   31214           0 :                 if (talloc_str == NULL) {
   31215           0 :                         PyErr_NoMemory();
   31216           0 :                         return false;
   31217             :                 }
   31218           0 :                 r->in.device_name = talloc_str;
   31219             :         }
   31220           0 :         if (py_level == NULL) {
   31221           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   31222           0 :                 return false;
   31223             :         }
   31224             :         {
   31225           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   31226           0 :                 if (PyLong_Check(py_level)) {
   31227           0 :                         unsigned long long test_var;
   31228           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   31229           0 :                         if (PyErr_Occurred() != NULL) {
   31230           0 :                                 return false;
   31231             :                         }
   31232           0 :                         if (test_var > uint_max) {
   31233           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31234             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31235           0 :                                 return false;
   31236             :                         }
   31237           0 :                         r->in.level = test_var;
   31238             :                 } else {
   31239           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31240             :                           PyLong_Type.tp_name);
   31241           0 :                         return false;
   31242             :                 }
   31243             :         }
   31244           0 :         return true;
   31245             : }
   31246             : 
   31247           0 : static PyObject *unpack_py_srvsvc_NetCharDevGetInfo_args_out(struct srvsvc_NetCharDevGetInfo *r)
   31248             : {
   31249           0 :         PyObject *result;
   31250           0 :         PyObject *py_info;
   31251           0 :         py_info = pyrpc_import_union(&srvsvc_NetCharDevInfo_Type, r->out.info, r->in.level, r->out.info, "union srvsvc_NetCharDevInfo");
   31252           0 :         if (py_info == NULL) {
   31253           0 :                 return NULL;
   31254             :         }
   31255           0 :         result = py_info;
   31256           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   31257           0 :                 PyErr_SetWERROR(r->out.result);
   31258           0 :                 return NULL;
   31259             :         }
   31260             : 
   31261           0 :         return result;
   31262             : }
   31263             : 
   31264             : 
   31265           0 : static PyObject *py_srvsvc_NetCharDevControl_in_get_server_unc(PyObject *obj, void *closure)
   31266             : {
   31267           0 :         struct srvsvc_NetCharDevControl *object = pytalloc_get_ptr(obj);
   31268           0 :         PyObject *py_server_unc;
   31269           0 :         if (object->in.server_unc == NULL) {
   31270           0 :                 Py_RETURN_NONE;
   31271             :         }
   31272           0 :         if (object->in.server_unc == NULL) {
   31273           0 :                 py_server_unc = Py_None;
   31274           0 :                 Py_INCREF(py_server_unc);
   31275             :         } else {
   31276           0 :                 if (object->in.server_unc == NULL) {
   31277           0 :                         py_server_unc = Py_None;
   31278           0 :                         Py_INCREF(py_server_unc);
   31279             :                 } else {
   31280           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   31281             :                 }
   31282             :         }
   31283           0 :         return py_server_unc;
   31284             : }
   31285             : 
   31286           0 : static int py_srvsvc_NetCharDevControl_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   31287             : {
   31288           0 :         struct srvsvc_NetCharDevControl *object = pytalloc_get_ptr(py_obj);
   31289           0 :         if (value == NULL) {
   31290           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   31291           0 :                 return -1;
   31292             :         }
   31293           0 :         if (value == Py_None) {
   31294           0 :                 object->in.server_unc = NULL;
   31295             :         } else {
   31296           0 :                 object->in.server_unc = NULL;
   31297             :                 {
   31298           0 :                         const char *test_str;
   31299           0 :                         const char *talloc_str;
   31300           0 :                         PyObject *unicode = NULL;
   31301           0 :                         if (PyUnicode_Check(value)) {
   31302           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31303           0 :                                 if (unicode == NULL) {
   31304           0 :                                         return -1;
   31305             :                                 }
   31306           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31307           0 :                         } else if (PyBytes_Check(value)) {
   31308           0 :                                 test_str = PyBytes_AS_STRING(value);
   31309             :                         } else {
   31310           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31311           0 :                                 return -1;
   31312             :                         }
   31313           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31314           0 :                         if (unicode != NULL) {
   31315           0 :                                 Py_DECREF(unicode);
   31316             :                         }
   31317           0 :                         if (talloc_str == NULL) {
   31318           0 :                                 PyErr_NoMemory();
   31319           0 :                                 return -1;
   31320             :                         }
   31321           0 :                         object->in.server_unc = talloc_str;
   31322             :                 }
   31323             :         }
   31324           0 :         return 0;
   31325             : }
   31326             : 
   31327           0 : static PyObject *py_srvsvc_NetCharDevControl_in_get_device_name(PyObject *obj, void *closure)
   31328             : {
   31329           0 :         struct srvsvc_NetCharDevControl *object = pytalloc_get_ptr(obj);
   31330           0 :         PyObject *py_device_name;
   31331           0 :         if (object->in.device_name == NULL) {
   31332           0 :                 py_device_name = Py_None;
   31333           0 :                 Py_INCREF(py_device_name);
   31334             :         } else {
   31335           0 :                 py_device_name = PyUnicode_Decode(object->in.device_name, strlen(object->in.device_name), "utf-8", "ignore");
   31336             :         }
   31337           0 :         return py_device_name;
   31338             : }
   31339             : 
   31340           0 : static int py_srvsvc_NetCharDevControl_in_set_device_name(PyObject *py_obj, PyObject *value, void *closure)
   31341             : {
   31342           0 :         struct srvsvc_NetCharDevControl *object = pytalloc_get_ptr(py_obj);
   31343           0 :         if (value == NULL) {
   31344           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.device_name");
   31345           0 :                 return -1;
   31346             :         }
   31347             :         {
   31348           0 :                 const char *test_str;
   31349           0 :                 const char *talloc_str;
   31350           0 :                 PyObject *unicode = NULL;
   31351           0 :                 if (PyUnicode_Check(value)) {
   31352           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31353           0 :                         if (unicode == NULL) {
   31354           0 :                                 return -1;
   31355             :                         }
   31356           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31357           0 :                 } else if (PyBytes_Check(value)) {
   31358           0 :                         test_str = PyBytes_AS_STRING(value);
   31359             :                 } else {
   31360           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31361           0 :                         return -1;
   31362             :                 }
   31363           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31364           0 :                 if (unicode != NULL) {
   31365           0 :                         Py_DECREF(unicode);
   31366             :                 }
   31367           0 :                 if (talloc_str == NULL) {
   31368           0 :                         PyErr_NoMemory();
   31369           0 :                         return -1;
   31370             :                 }
   31371           0 :                 object->in.device_name = talloc_str;
   31372             :         }
   31373           0 :         return 0;
   31374             : }
   31375             : 
   31376           0 : static PyObject *py_srvsvc_NetCharDevControl_in_get_opcode(PyObject *obj, void *closure)
   31377             : {
   31378           0 :         struct srvsvc_NetCharDevControl *object = pytalloc_get_ptr(obj);
   31379           0 :         PyObject *py_opcode;
   31380           0 :         py_opcode = PyLong_FromUnsignedLongLong((uint32_t)(object->in.opcode));
   31381           0 :         return py_opcode;
   31382             : }
   31383             : 
   31384           0 : static int py_srvsvc_NetCharDevControl_in_set_opcode(PyObject *py_obj, PyObject *value, void *closure)
   31385             : {
   31386           0 :         struct srvsvc_NetCharDevControl *object = pytalloc_get_ptr(py_obj);
   31387           0 :         if (value == NULL) {
   31388           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.opcode");
   31389           0 :                 return -1;
   31390             :         }
   31391             :         {
   31392           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.opcode));
   31393           0 :                 if (PyLong_Check(value)) {
   31394           0 :                         unsigned long long test_var;
   31395           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31396           0 :                         if (PyErr_Occurred() != NULL) {
   31397           0 :                                 return -1;
   31398             :                         }
   31399           0 :                         if (test_var > uint_max) {
   31400           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31401             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31402           0 :                                 return -1;
   31403             :                         }
   31404           0 :                         object->in.opcode = test_var;
   31405             :                 } else {
   31406           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31407             :                           PyLong_Type.tp_name);
   31408           0 :                         return -1;
   31409             :                 }
   31410             :         }
   31411           0 :         return 0;
   31412             : }
   31413             : 
   31414           0 : static PyObject *py_srvsvc_NetCharDevControl_get_result(PyObject *obj, void *closure)
   31415             : {
   31416           0 :         struct srvsvc_NetCharDevControl *object = pytalloc_get_ptr(obj);
   31417           0 :         PyObject *py_result;
   31418           0 :         py_result = PyErr_FromWERROR(object->out.result);
   31419           0 :         return py_result;
   31420             : }
   31421             : 
   31422           0 : static int py_srvsvc_NetCharDevControl_set_result(PyObject *py_obj, PyObject *value, void *closure)
   31423             : {
   31424           0 :         struct srvsvc_NetCharDevControl *object = pytalloc_get_ptr(py_obj);
   31425           0 :         if (value == NULL) {
   31426           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   31427           0 :                 return -1;
   31428             :         }
   31429           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   31430           0 :         return 0;
   31431             : }
   31432             : 
   31433             : static PyGetSetDef py_srvsvc_NetCharDevControl_getsetters[] = {
   31434             :         {
   31435             :                 .name = discard_const_p(char, "in_server_unc"),
   31436             :                 .get = py_srvsvc_NetCharDevControl_in_get_server_unc,
   31437             :                 .set = py_srvsvc_NetCharDevControl_in_set_server_unc,
   31438             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31439             :         },
   31440             :         {
   31441             :                 .name = discard_const_p(char, "in_device_name"),
   31442             :                 .get = py_srvsvc_NetCharDevControl_in_get_device_name,
   31443             :                 .set = py_srvsvc_NetCharDevControl_in_set_device_name,
   31444             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31445             :         },
   31446             :         {
   31447             :                 .name = discard_const_p(char, "in_opcode"),
   31448             :                 .get = py_srvsvc_NetCharDevControl_in_get_opcode,
   31449             :                 .set = py_srvsvc_NetCharDevControl_in_set_opcode,
   31450             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31451             :         },
   31452             :         {
   31453             :                 .name = discard_const_p(char, "result"),
   31454             :                 .get = py_srvsvc_NetCharDevControl_get_result,
   31455             :                 .set = py_srvsvc_NetCharDevControl_set_result,
   31456             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   31457             :         },
   31458             :         { .name = NULL }
   31459             : };
   31460             : 
   31461           0 : static PyObject *py_srvsvc_NetCharDevControl_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   31462             : {
   31463           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevControl, type);
   31464           0 :         return self;
   31465             : }
   31466             : 
   31467           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   31468             : {
   31469             : 
   31470             : 
   31471           0 :         return PyLong_FromLong(2);
   31472             : }
   31473             : 
   31474           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   31475             : {
   31476           0 :         const struct ndr_interface_call *call = NULL;
   31477           0 :         struct srvsvc_NetCharDevControl *object = pytalloc_get_ptr(py_obj);
   31478           0 :         PyObject *ret = NULL;
   31479           0 :         struct ndr_push *push = NULL;
   31480           0 :         DATA_BLOB blob;
   31481           0 :         enum ndr_err_code err;
   31482             : 
   31483           0 :         if (ndr_table_srvsvc.num_calls < 3) {
   31484           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevControl_ndr_pack");
   31485           0 :                 return NULL;
   31486             :         }
   31487           0 :         call = &ndr_table_srvsvc.calls[2];
   31488             : 
   31489           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   31490           0 :         if (push == NULL) {
   31491           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   31492           0 :                 return NULL;
   31493             :         }
   31494             : 
   31495           0 :         push->flags |= ndr_push_flags;
   31496             : 
   31497           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   31498           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   31499           0 :                 TALLOC_FREE(push);
   31500           0 :                 PyErr_SetNdrError(err);
   31501           0 :                 return NULL;
   31502             :         }
   31503           0 :         blob = ndr_push_blob(push);
   31504           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   31505           0 :         TALLOC_FREE(push);
   31506           0 :         return ret;
   31507             : }
   31508             : 
   31509           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31510             : {
   31511           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   31512           0 :         PyObject *bigendian_obj = NULL;
   31513           0 :         PyObject *ndr64_obj = NULL;
   31514           0 :         libndr_flags ndr_push_flags = 0;
   31515             : 
   31516           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   31517             :                 discard_const_p(char *, kwnames),
   31518             :                 &bigendian_obj,
   31519             :                 &ndr64_obj)) {
   31520           0 :                 return NULL;
   31521             :         }
   31522             : 
   31523           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31524           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   31525             :         }
   31526           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31527           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   31528             :         }
   31529             : 
   31530           0 :         return py_srvsvc_NetCharDevControl_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   31531             : }
   31532             : 
   31533           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31534             : {
   31535           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   31536           0 :         PyObject *bigendian_obj = NULL;
   31537           0 :         PyObject *ndr64_obj = NULL;
   31538           0 :         libndr_flags ndr_push_flags = 0;
   31539             : 
   31540           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   31541             :                 discard_const_p(char *, kwnames),
   31542             :                 &bigendian_obj,
   31543             :                 &ndr64_obj)) {
   31544           0 :                 return NULL;
   31545             :         }
   31546             : 
   31547           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31548           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   31549             :         }
   31550           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31551           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   31552             :         }
   31553             : 
   31554           0 :         return py_srvsvc_NetCharDevControl_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   31555             : }
   31556             : 
   31557           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   31558             : {
   31559           0 :         const struct ndr_interface_call *call = NULL;
   31560           0 :         struct srvsvc_NetCharDevControl *object = pytalloc_get_ptr(py_obj);
   31561           0 :         struct ndr_pull *pull = NULL;
   31562           0 :         enum ndr_err_code err;
   31563             : 
   31564           0 :         if (ndr_table_srvsvc.num_calls < 3) {
   31565           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevControl_ndr_unpack");
   31566           0 :                 return NULL;
   31567             :         }
   31568           0 :         call = &ndr_table_srvsvc.calls[2];
   31569             : 
   31570           0 :         pull = ndr_pull_init_blob(blob, object);
   31571           0 :         if (pull == NULL) {
   31572           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   31573           0 :                 return NULL;
   31574             :         }
   31575             : 
   31576           0 :         pull->flags |= ndr_pull_flags;
   31577             : 
   31578           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   31579           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   31580           0 :                 TALLOC_FREE(pull);
   31581           0 :                 PyErr_SetNdrError(err);
   31582           0 :                 return NULL;
   31583             :         }
   31584           0 :         if (!allow_remaining) {
   31585           0 :                 uint32_t highest_ofs;
   31586             : 
   31587           0 :                 if (pull->offset > pull->relative_highest_offset) {
   31588           0 :                         highest_ofs = pull->offset;
   31589             :                 } else {
   31590           0 :                         highest_ofs = pull->relative_highest_offset;
   31591             :                 }
   31592           0 :                 if (highest_ofs < pull->data_size) {
   31593           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   31594             :                                 "not all bytes consumed ofs[%u] size[%u]",
   31595             :                                 highest_ofs, pull->data_size);
   31596           0 :                         TALLOC_FREE(pull);
   31597           0 :                         PyErr_SetNdrError(err);
   31598           0 :                         return NULL;
   31599             :                 }
   31600             :         }
   31601             : 
   31602           0 :         TALLOC_FREE(pull);
   31603           0 :         Py_RETURN_NONE;
   31604             : }
   31605             : 
   31606           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31607             : {
   31608           0 :         DATA_BLOB blob;
   31609           0 :         Py_ssize_t blob_length = 0;
   31610           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31611           0 :         PyObject *bigendian_obj = NULL;
   31612           0 :         PyObject *ndr64_obj = NULL;
   31613           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31614           0 :         PyObject *allow_remaining_obj = NULL;
   31615           0 :         bool allow_remaining = false;
   31616             : 
   31617           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   31618             :                 discard_const_p(char *, kwnames),
   31619             :                 &blob.data, &blob_length,
   31620             :                 &bigendian_obj,
   31621             :                 &ndr64_obj,
   31622             :                 &allow_remaining_obj)) {
   31623           0 :                 return NULL;
   31624             :         }
   31625           0 :         blob.length = blob_length;
   31626             : 
   31627           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31628           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31629             :         }
   31630           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31631           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31632             :         }
   31633             : 
   31634           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31635           0 :                 allow_remaining = true;
   31636             :         }
   31637             : 
   31638           0 :         return py_srvsvc_NetCharDevControl_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   31639             : }
   31640             : 
   31641           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31642             : {
   31643           0 :         DATA_BLOB blob;
   31644           0 :         Py_ssize_t blob_length = 0;
   31645           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31646           0 :         PyObject *bigendian_obj = NULL;
   31647           0 :         PyObject *ndr64_obj = NULL;
   31648           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31649           0 :         PyObject *allow_remaining_obj = NULL;
   31650           0 :         bool allow_remaining = false;
   31651             : 
   31652           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   31653             :                 discard_const_p(char *, kwnames),
   31654             :                 &blob.data, &blob_length,
   31655             :                 &bigendian_obj,
   31656             :                 &ndr64_obj,
   31657             :                 &allow_remaining_obj)) {
   31658           0 :                 return NULL;
   31659             :         }
   31660           0 :         blob.length = blob_length;
   31661             : 
   31662           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31663           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31664             :         }
   31665           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31666           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31667             :         }
   31668             : 
   31669           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31670           0 :                 allow_remaining = true;
   31671             :         }
   31672             : 
   31673           0 :         return py_srvsvc_NetCharDevControl_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   31674             : }
   31675             : 
   31676           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   31677             : {
   31678           0 :         const struct ndr_interface_call *call = NULL;
   31679           0 :         struct srvsvc_NetCharDevControl *object = pytalloc_get_ptr(py_obj);
   31680           0 :         PyObject *ret;
   31681           0 :         char *retstr;
   31682             : 
   31683           0 :         if (ndr_table_srvsvc.num_calls < 3) {
   31684           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevControl_ndr_print");
   31685           0 :                 return NULL;
   31686             :         }
   31687           0 :         call = &ndr_table_srvsvc.calls[2];
   31688             : 
   31689           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   31690           0 :         ret = PyUnicode_FromString(retstr);
   31691           0 :         TALLOC_FREE(retstr);
   31692             : 
   31693           0 :         return ret;
   31694             : }
   31695             : 
   31696           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31697             : {
   31698           0 :         return py_srvsvc_NetCharDevControl_ndr_print(py_obj, "srvsvc_NetCharDevControl_in", NDR_IN);
   31699             : }
   31700             : 
   31701           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31702             : {
   31703           0 :         return py_srvsvc_NetCharDevControl_ndr_print(py_obj, "srvsvc_NetCharDevControl_out", NDR_OUT);
   31704             : }
   31705             : 
   31706             : static PyMethodDef py_srvsvc_NetCharDevControl_methods[] = {
   31707             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevControl_ndr_opnum, METH_NOARGS|METH_CLASS,
   31708             :                 "srvsvc.NetCharDevControl.opnum() -> 2 (0x02) " },
   31709             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevControl_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   31710             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   31711             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevControl_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   31712             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   31713             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevControl_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   31714             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   31715             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevControl_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   31716             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   31717             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevControl_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   31718             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevControl_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   31719             :         { NULL, NULL, 0, NULL }
   31720             : };
   31721             : 
   31722             : 
   31723             : static PyTypeObject srvsvc_NetCharDevControl_Type = {
   31724             :         PyVarObject_HEAD_INIT(NULL, 0)
   31725             :         .tp_name = "srvsvc.NetCharDevControl",
   31726             :         .tp_getset = py_srvsvc_NetCharDevControl_getsetters,
   31727             :         .tp_methods = py_srvsvc_NetCharDevControl_methods,
   31728             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   31729             :         .tp_new = py_srvsvc_NetCharDevControl_new,
   31730             : };
   31731             : 
   31732           0 : static bool pack_py_srvsvc_NetCharDevControl_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevControl *r)
   31733             : {
   31734           0 :         PyObject *py_server_unc;
   31735           0 :         PyObject *py_device_name;
   31736           0 :         PyObject *py_opcode;
   31737           0 :         const char *kwnames[] = {
   31738             :                 "server_unc", "device_name", "opcode", NULL
   31739             :         };
   31740             : 
   31741           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetCharDevControl", discard_const_p(char *, kwnames), &py_server_unc, &py_device_name, &py_opcode)) {
   31742           0 :                 return false;
   31743             :         }
   31744             : 
   31745           0 :         if (py_server_unc == NULL) {
   31746           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   31747           0 :                 return false;
   31748             :         }
   31749           0 :         if (py_server_unc == Py_None) {
   31750           0 :                 r->in.server_unc = NULL;
   31751             :         } else {
   31752           0 :                 r->in.server_unc = NULL;
   31753             :                 {
   31754           0 :                         const char *test_str;
   31755           0 :                         const char *talloc_str;
   31756           0 :                         PyObject *unicode = NULL;
   31757           0 :                         if (PyUnicode_Check(py_server_unc)) {
   31758           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   31759           0 :                                 if (unicode == NULL) {
   31760           0 :                                         return false;
   31761             :                                 }
   31762           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31763           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   31764           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   31765             :                         } else {
   31766           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   31767           0 :                                 return false;
   31768             :                         }
   31769           0 :                         talloc_str = talloc_strdup(r, test_str);
   31770           0 :                         if (unicode != NULL) {
   31771           0 :                                 Py_DECREF(unicode);
   31772             :                         }
   31773           0 :                         if (talloc_str == NULL) {
   31774           0 :                                 PyErr_NoMemory();
   31775           0 :                                 return false;
   31776             :                         }
   31777           0 :                         r->in.server_unc = talloc_str;
   31778             :                 }
   31779             :         }
   31780           0 :         if (py_device_name == NULL) {
   31781           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.device_name");
   31782           0 :                 return false;
   31783             :         }
   31784             :         {
   31785           0 :                 const char *test_str;
   31786           0 :                 const char *talloc_str;
   31787           0 :                 PyObject *unicode = NULL;
   31788           0 :                 if (PyUnicode_Check(py_device_name)) {
   31789           0 :                         unicode = PyUnicode_AsEncodedString(py_device_name, "utf-8", "ignore");
   31790           0 :                         if (unicode == NULL) {
   31791           0 :                                 return false;
   31792             :                         }
   31793           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31794           0 :                 } else if (PyBytes_Check(py_device_name)) {
   31795           0 :                         test_str = PyBytes_AS_STRING(py_device_name);
   31796             :                 } else {
   31797           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_device_name)->tp_name);
   31798           0 :                         return false;
   31799             :                 }
   31800           0 :                 talloc_str = talloc_strdup(r, test_str);
   31801           0 :                 if (unicode != NULL) {
   31802           0 :                         Py_DECREF(unicode);
   31803             :                 }
   31804           0 :                 if (talloc_str == NULL) {
   31805           0 :                         PyErr_NoMemory();
   31806           0 :                         return false;
   31807             :                 }
   31808           0 :                 r->in.device_name = talloc_str;
   31809             :         }
   31810           0 :         if (py_opcode == NULL) {
   31811           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.opcode");
   31812           0 :                 return false;
   31813             :         }
   31814             :         {
   31815           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.opcode));
   31816           0 :                 if (PyLong_Check(py_opcode)) {
   31817           0 :                         unsigned long long test_var;
   31818           0 :                         test_var = PyLong_AsUnsignedLongLong(py_opcode);
   31819           0 :                         if (PyErr_Occurred() != NULL) {
   31820           0 :                                 return false;
   31821             :                         }
   31822           0 :                         if (test_var > uint_max) {
   31823           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31824             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31825           0 :                                 return false;
   31826             :                         }
   31827           0 :                         r->in.opcode = test_var;
   31828             :                 } else {
   31829           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31830             :                           PyLong_Type.tp_name);
   31831           0 :                         return false;
   31832             :                 }
   31833             :         }
   31834           0 :         return true;
   31835             : }
   31836             : 
   31837           0 : static PyObject *unpack_py_srvsvc_NetCharDevControl_args_out(struct srvsvc_NetCharDevControl *r)
   31838             : {
   31839           0 :         PyObject *result;
   31840           0 :         result = Py_None;
   31841           0 :         Py_INCREF(result);
   31842           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   31843           0 :                 PyErr_SetWERROR(r->out.result);
   31844           0 :                 return NULL;
   31845             :         }
   31846             : 
   31847           0 :         return result;
   31848             : }
   31849             : 
   31850             : 
   31851           0 : static PyObject *py_srvsvc_NetCharDevQEnum_in_get_server_unc(PyObject *obj, void *closure)
   31852             : {
   31853           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(obj);
   31854           0 :         PyObject *py_server_unc;
   31855           0 :         if (object->in.server_unc == NULL) {
   31856           0 :                 Py_RETURN_NONE;
   31857             :         }
   31858           0 :         if (object->in.server_unc == NULL) {
   31859           0 :                 py_server_unc = Py_None;
   31860           0 :                 Py_INCREF(py_server_unc);
   31861             :         } else {
   31862           0 :                 if (object->in.server_unc == NULL) {
   31863           0 :                         py_server_unc = Py_None;
   31864           0 :                         Py_INCREF(py_server_unc);
   31865             :                 } else {
   31866           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   31867             :                 }
   31868             :         }
   31869           0 :         return py_server_unc;
   31870             : }
   31871             : 
   31872           0 : static int py_srvsvc_NetCharDevQEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   31873             : {
   31874           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(py_obj);
   31875           0 :         if (value == NULL) {
   31876           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   31877           0 :                 return -1;
   31878             :         }
   31879           0 :         if (value == Py_None) {
   31880           0 :                 object->in.server_unc = NULL;
   31881             :         } else {
   31882           0 :                 object->in.server_unc = NULL;
   31883             :                 {
   31884           0 :                         const char *test_str;
   31885           0 :                         const char *talloc_str;
   31886           0 :                         PyObject *unicode = NULL;
   31887           0 :                         if (PyUnicode_Check(value)) {
   31888           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31889           0 :                                 if (unicode == NULL) {
   31890           0 :                                         return -1;
   31891             :                                 }
   31892           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31893           0 :                         } else if (PyBytes_Check(value)) {
   31894           0 :                                 test_str = PyBytes_AS_STRING(value);
   31895             :                         } else {
   31896           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31897           0 :                                 return -1;
   31898             :                         }
   31899           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31900           0 :                         if (unicode != NULL) {
   31901           0 :                                 Py_DECREF(unicode);
   31902             :                         }
   31903           0 :                         if (talloc_str == NULL) {
   31904           0 :                                 PyErr_NoMemory();
   31905           0 :                                 return -1;
   31906             :                         }
   31907           0 :                         object->in.server_unc = talloc_str;
   31908             :                 }
   31909             :         }
   31910           0 :         return 0;
   31911             : }
   31912             : 
   31913           0 : static PyObject *py_srvsvc_NetCharDevQEnum_in_get_user(PyObject *obj, void *closure)
   31914             : {
   31915           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(obj);
   31916           0 :         PyObject *py_user;
   31917           0 :         if (object->in.user == NULL) {
   31918           0 :                 Py_RETURN_NONE;
   31919             :         }
   31920           0 :         if (object->in.user == NULL) {
   31921           0 :                 py_user = Py_None;
   31922           0 :                 Py_INCREF(py_user);
   31923             :         } else {
   31924           0 :                 if (object->in.user == NULL) {
   31925           0 :                         py_user = Py_None;
   31926           0 :                         Py_INCREF(py_user);
   31927             :                 } else {
   31928           0 :                         py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   31929             :                 }
   31930             :         }
   31931           0 :         return py_user;
   31932             : }
   31933             : 
   31934           0 : static int py_srvsvc_NetCharDevQEnum_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   31935             : {
   31936           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(py_obj);
   31937           0 :         if (value == NULL) {
   31938           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.user");
   31939           0 :                 return -1;
   31940             :         }
   31941           0 :         if (value == Py_None) {
   31942           0 :                 object->in.user = NULL;
   31943             :         } else {
   31944           0 :                 object->in.user = NULL;
   31945             :                 {
   31946           0 :                         const char *test_str;
   31947           0 :                         const char *talloc_str;
   31948           0 :                         PyObject *unicode = NULL;
   31949           0 :                         if (PyUnicode_Check(value)) {
   31950           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31951           0 :                                 if (unicode == NULL) {
   31952           0 :                                         return -1;
   31953             :                                 }
   31954           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31955           0 :                         } else if (PyBytes_Check(value)) {
   31956           0 :                                 test_str = PyBytes_AS_STRING(value);
   31957             :                         } else {
   31958           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31959           0 :                                 return -1;
   31960             :                         }
   31961           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31962           0 :                         if (unicode != NULL) {
   31963           0 :                                 Py_DECREF(unicode);
   31964             :                         }
   31965           0 :                         if (talloc_str == NULL) {
   31966           0 :                                 PyErr_NoMemory();
   31967           0 :                                 return -1;
   31968             :                         }
   31969           0 :                         object->in.user = talloc_str;
   31970             :                 }
   31971             :         }
   31972           0 :         return 0;
   31973             : }
   31974             : 
   31975           0 : static PyObject *py_srvsvc_NetCharDevQEnum_in_get_info_ctr(PyObject *obj, void *closure)
   31976             : {
   31977           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(obj);
   31978           0 :         PyObject *py_info_ctr;
   31979           0 :         if (object->in.info_ctr == NULL) {
   31980           0 :                 Py_RETURN_NONE;
   31981             :         }
   31982           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevQInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   31983           0 :         return py_info_ctr;
   31984             : }
   31985             : 
   31986           0 : static int py_srvsvc_NetCharDevQEnum_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   31987             : {
   31988           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(py_obj);
   31989           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   31990           0 :         if (value == NULL) {
   31991           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info_ctr");
   31992           0 :                 return -1;
   31993             :         }
   31994           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   31995           0 :         if (object->in.info_ctr == NULL) {
   31996           0 :                 PyErr_NoMemory();
   31997           0 :                 return -1;
   31998             :         }
   31999           0 :         PY_CHECK_TYPE(&srvsvc_NetCharDevQInfoCtr_Type, value, return -1;);
   32000           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32001           0 :                 PyErr_NoMemory();
   32002           0 :                 return -1;
   32003             :         }
   32004           0 :         object->in.info_ctr = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(value);
   32005           0 :         return 0;
   32006             : }
   32007             : 
   32008           0 : static PyObject *py_srvsvc_NetCharDevQEnum_out_get_info_ctr(PyObject *obj, void *closure)
   32009             : {
   32010           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(obj);
   32011           0 :         PyObject *py_info_ctr;
   32012           0 :         if (object->out.info_ctr == NULL) {
   32013           0 :                 Py_RETURN_NONE;
   32014             :         }
   32015           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevQInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   32016           0 :         return py_info_ctr;
   32017             : }
   32018             : 
   32019           0 : static int py_srvsvc_NetCharDevQEnum_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   32020             : {
   32021           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(py_obj);
   32022           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   32023           0 :         if (value == NULL) {
   32024           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info_ctr");
   32025           0 :                 return -1;
   32026             :         }
   32027           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   32028           0 :         if (object->out.info_ctr == NULL) {
   32029           0 :                 PyErr_NoMemory();
   32030           0 :                 return -1;
   32031             :         }
   32032           0 :         PY_CHECK_TYPE(&srvsvc_NetCharDevQInfoCtr_Type, value, return -1;);
   32033           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32034           0 :                 PyErr_NoMemory();
   32035           0 :                 return -1;
   32036             :         }
   32037           0 :         object->out.info_ctr = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(value);
   32038           0 :         return 0;
   32039             : }
   32040             : 
   32041           0 : static PyObject *py_srvsvc_NetCharDevQEnum_in_get_max_buffer(PyObject *obj, void *closure)
   32042             : {
   32043           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(obj);
   32044           0 :         PyObject *py_max_buffer;
   32045           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)(object->in.max_buffer));
   32046           0 :         return py_max_buffer;
   32047             : }
   32048             : 
   32049           0 : static int py_srvsvc_NetCharDevQEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   32050             : {
   32051           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(py_obj);
   32052           0 :         if (value == NULL) {
   32053           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.max_buffer");
   32054           0 :                 return -1;
   32055             :         }
   32056             :         {
   32057           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   32058           0 :                 if (PyLong_Check(value)) {
   32059           0 :                         unsigned long long test_var;
   32060           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32061           0 :                         if (PyErr_Occurred() != NULL) {
   32062           0 :                                 return -1;
   32063             :                         }
   32064           0 :                         if (test_var > uint_max) {
   32065           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32066             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32067           0 :                                 return -1;
   32068             :                         }
   32069           0 :                         object->in.max_buffer = test_var;
   32070             :                 } else {
   32071           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32072             :                           PyLong_Type.tp_name);
   32073           0 :                         return -1;
   32074             :                 }
   32075             :         }
   32076           0 :         return 0;
   32077             : }
   32078             : 
   32079           0 : static PyObject *py_srvsvc_NetCharDevQEnum_out_get_totalentries(PyObject *obj, void *closure)
   32080             : {
   32081           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(obj);
   32082           0 :         PyObject *py_totalentries;
   32083           0 :         if (object->out.totalentries == NULL) {
   32084           0 :                 Py_RETURN_NONE;
   32085             :         }
   32086           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.totalentries));
   32087           0 :         return py_totalentries;
   32088             : }
   32089             : 
   32090           0 : static int py_srvsvc_NetCharDevQEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   32091             : {
   32092           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(py_obj);
   32093           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   32094           0 :         if (value == NULL) {
   32095           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.totalentries");
   32096           0 :                 return -1;
   32097             :         }
   32098           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   32099           0 :         if (object->out.totalentries == NULL) {
   32100           0 :                 PyErr_NoMemory();
   32101           0 :                 return -1;
   32102             :         }
   32103             :         {
   32104           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   32105           0 :                 if (PyLong_Check(value)) {
   32106           0 :                         unsigned long long test_var;
   32107           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32108           0 :                         if (PyErr_Occurred() != NULL) {
   32109           0 :                                 return -1;
   32110             :                         }
   32111           0 :                         if (test_var > uint_max) {
   32112           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32113             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32114           0 :                                 return -1;
   32115             :                         }
   32116           0 :                         *object->out.totalentries = test_var;
   32117             :                 } else {
   32118           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32119             :                           PyLong_Type.tp_name);
   32120           0 :                         return -1;
   32121             :                 }
   32122             :         }
   32123           0 :         return 0;
   32124             : }
   32125             : 
   32126           0 : static PyObject *py_srvsvc_NetCharDevQEnum_in_get_resume_handle(PyObject *obj, void *closure)
   32127             : {
   32128           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(obj);
   32129           0 :         PyObject *py_resume_handle;
   32130           0 :         if (object->in.resume_handle == NULL) {
   32131           0 :                 Py_RETURN_NONE;
   32132             :         }
   32133           0 :         if (object->in.resume_handle == NULL) {
   32134           0 :                 py_resume_handle = Py_None;
   32135           0 :                 Py_INCREF(py_resume_handle);
   32136             :         } else {
   32137           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.resume_handle));
   32138             :         }
   32139           0 :         return py_resume_handle;
   32140             : }
   32141             : 
   32142           0 : static int py_srvsvc_NetCharDevQEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   32143             : {
   32144           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(py_obj);
   32145           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   32146           0 :         if (value == NULL) {
   32147           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.resume_handle");
   32148           0 :                 return -1;
   32149             :         }
   32150           0 :         if (value == Py_None) {
   32151           0 :                 object->in.resume_handle = NULL;
   32152             :         } else {
   32153           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   32154           0 :                 if (object->in.resume_handle == NULL) {
   32155           0 :                         PyErr_NoMemory();
   32156           0 :                         return -1;
   32157             :                 }
   32158             :                 {
   32159           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   32160           0 :                         if (PyLong_Check(value)) {
   32161           0 :                                 unsigned long long test_var;
   32162           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   32163           0 :                                 if (PyErr_Occurred() != NULL) {
   32164           0 :                                         return -1;
   32165             :                                 }
   32166           0 :                                 if (test_var > uint_max) {
   32167           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32168             :                                           PyLong_Type.tp_name, uint_max, test_var);
   32169           0 :                                         return -1;
   32170             :                                 }
   32171           0 :                                 *object->in.resume_handle = test_var;
   32172             :                         } else {
   32173           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   32174             :                                   PyLong_Type.tp_name);
   32175           0 :                                 return -1;
   32176             :                         }
   32177             :                 }
   32178             :         }
   32179           0 :         return 0;
   32180             : }
   32181             : 
   32182           0 : static PyObject *py_srvsvc_NetCharDevQEnum_out_get_resume_handle(PyObject *obj, void *closure)
   32183             : {
   32184           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(obj);
   32185           0 :         PyObject *py_resume_handle;
   32186           0 :         if (object->out.resume_handle == NULL) {
   32187           0 :                 Py_RETURN_NONE;
   32188             :         }
   32189           0 :         if (object->out.resume_handle == NULL) {
   32190           0 :                 py_resume_handle = Py_None;
   32191           0 :                 Py_INCREF(py_resume_handle);
   32192             :         } else {
   32193           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.resume_handle));
   32194             :         }
   32195           0 :         return py_resume_handle;
   32196             : }
   32197             : 
   32198           0 : static int py_srvsvc_NetCharDevQEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   32199             : {
   32200           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(py_obj);
   32201           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   32202           0 :         if (value == NULL) {
   32203           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.resume_handle");
   32204           0 :                 return -1;
   32205             :         }
   32206           0 :         if (value == Py_None) {
   32207           0 :                 object->out.resume_handle = NULL;
   32208             :         } else {
   32209           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   32210           0 :                 if (object->out.resume_handle == NULL) {
   32211           0 :                         PyErr_NoMemory();
   32212           0 :                         return -1;
   32213             :                 }
   32214             :                 {
   32215           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   32216           0 :                         if (PyLong_Check(value)) {
   32217           0 :                                 unsigned long long test_var;
   32218           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   32219           0 :                                 if (PyErr_Occurred() != NULL) {
   32220           0 :                                         return -1;
   32221             :                                 }
   32222           0 :                                 if (test_var > uint_max) {
   32223           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32224             :                                           PyLong_Type.tp_name, uint_max, test_var);
   32225           0 :                                         return -1;
   32226             :                                 }
   32227           0 :                                 *object->out.resume_handle = test_var;
   32228             :                         } else {
   32229           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   32230             :                                   PyLong_Type.tp_name);
   32231           0 :                                 return -1;
   32232             :                         }
   32233             :                 }
   32234             :         }
   32235           0 :         return 0;
   32236             : }
   32237             : 
   32238           0 : static PyObject *py_srvsvc_NetCharDevQEnum_get_result(PyObject *obj, void *closure)
   32239             : {
   32240           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(obj);
   32241           0 :         PyObject *py_result;
   32242           0 :         py_result = PyErr_FromWERROR(object->out.result);
   32243           0 :         return py_result;
   32244             : }
   32245             : 
   32246           0 : static int py_srvsvc_NetCharDevQEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   32247             : {
   32248           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(py_obj);
   32249           0 :         if (value == NULL) {
   32250           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   32251           0 :                 return -1;
   32252             :         }
   32253           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   32254           0 :         return 0;
   32255             : }
   32256             : 
   32257             : static PyGetSetDef py_srvsvc_NetCharDevQEnum_getsetters[] = {
   32258             :         {
   32259             :                 .name = discard_const_p(char, "in_server_unc"),
   32260             :                 .get = py_srvsvc_NetCharDevQEnum_in_get_server_unc,
   32261             :                 .set = py_srvsvc_NetCharDevQEnum_in_set_server_unc,
   32262             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   32263             :         },
   32264             :         {
   32265             :                 .name = discard_const_p(char, "in_user"),
   32266             :                 .get = py_srvsvc_NetCharDevQEnum_in_get_user,
   32267             :                 .set = py_srvsvc_NetCharDevQEnum_in_set_user,
   32268             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   32269             :         },
   32270             :         {
   32271             :                 .name = discard_const_p(char, "in_info_ctr"),
   32272             :                 .get = py_srvsvc_NetCharDevQEnum_in_get_info_ctr,
   32273             :                 .set = py_srvsvc_NetCharDevQEnum_in_set_info_ctr,
   32274             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQInfoCtr")
   32275             :         },
   32276             :         {
   32277             :                 .name = discard_const_p(char, "out_info_ctr"),
   32278             :                 .get = py_srvsvc_NetCharDevQEnum_out_get_info_ctr,
   32279             :                 .set = py_srvsvc_NetCharDevQEnum_out_set_info_ctr,
   32280             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQInfoCtr")
   32281             :         },
   32282             :         {
   32283             :                 .name = discard_const_p(char, "in_max_buffer"),
   32284             :                 .get = py_srvsvc_NetCharDevQEnum_in_get_max_buffer,
   32285             :                 .set = py_srvsvc_NetCharDevQEnum_in_set_max_buffer,
   32286             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32287             :         },
   32288             :         {
   32289             :                 .name = discard_const_p(char, "out_totalentries"),
   32290             :                 .get = py_srvsvc_NetCharDevQEnum_out_get_totalentries,
   32291             :                 .set = py_srvsvc_NetCharDevQEnum_out_set_totalentries,
   32292             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32293             :         },
   32294             :         {
   32295             :                 .name = discard_const_p(char, "in_resume_handle"),
   32296             :                 .get = py_srvsvc_NetCharDevQEnum_in_get_resume_handle,
   32297             :                 .set = py_srvsvc_NetCharDevQEnum_in_set_resume_handle,
   32298             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32299             :         },
   32300             :         {
   32301             :                 .name = discard_const_p(char, "out_resume_handle"),
   32302             :                 .get = py_srvsvc_NetCharDevQEnum_out_get_resume_handle,
   32303             :                 .set = py_srvsvc_NetCharDevQEnum_out_set_resume_handle,
   32304             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32305             :         },
   32306             :         {
   32307             :                 .name = discard_const_p(char, "result"),
   32308             :                 .get = py_srvsvc_NetCharDevQEnum_get_result,
   32309             :                 .set = py_srvsvc_NetCharDevQEnum_set_result,
   32310             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   32311             :         },
   32312             :         { .name = NULL }
   32313             : };
   32314             : 
   32315           0 : static PyObject *py_srvsvc_NetCharDevQEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32316             : {
   32317           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevQEnum, type);
   32318           0 :         struct srvsvc_NetCharDevQEnum *_self = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(self);
   32319           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   32320           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetCharDevQInfoCtr);
   32321           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetCharDevQInfoCtr);
   32322           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   32323           0 :         return self;
   32324             : }
   32325             : 
   32326           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   32327             : {
   32328             : 
   32329             : 
   32330           0 :         return PyLong_FromLong(3);
   32331             : }
   32332             : 
   32333           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   32334             : {
   32335           0 :         const struct ndr_interface_call *call = NULL;
   32336           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(py_obj);
   32337           0 :         PyObject *ret = NULL;
   32338           0 :         struct ndr_push *push = NULL;
   32339           0 :         DATA_BLOB blob;
   32340           0 :         enum ndr_err_code err;
   32341             : 
   32342           0 :         if (ndr_table_srvsvc.num_calls < 4) {
   32343           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQEnum_ndr_pack");
   32344           0 :                 return NULL;
   32345             :         }
   32346           0 :         call = &ndr_table_srvsvc.calls[3];
   32347             : 
   32348           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   32349           0 :         if (push == NULL) {
   32350           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   32351           0 :                 return NULL;
   32352             :         }
   32353             : 
   32354           0 :         push->flags |= ndr_push_flags;
   32355             : 
   32356           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   32357           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   32358           0 :                 TALLOC_FREE(push);
   32359           0 :                 PyErr_SetNdrError(err);
   32360           0 :                 return NULL;
   32361             :         }
   32362           0 :         blob = ndr_push_blob(push);
   32363           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   32364           0 :         TALLOC_FREE(push);
   32365           0 :         return ret;
   32366             : }
   32367             : 
   32368           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32369             : {
   32370           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   32371           0 :         PyObject *bigendian_obj = NULL;
   32372           0 :         PyObject *ndr64_obj = NULL;
   32373           0 :         libndr_flags ndr_push_flags = 0;
   32374             : 
   32375           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   32376             :                 discard_const_p(char *, kwnames),
   32377             :                 &bigendian_obj,
   32378             :                 &ndr64_obj)) {
   32379           0 :                 return NULL;
   32380             :         }
   32381             : 
   32382           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32383           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   32384             :         }
   32385           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32386           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   32387             :         }
   32388             : 
   32389           0 :         return py_srvsvc_NetCharDevQEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   32390             : }
   32391             : 
   32392           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32393             : {
   32394           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   32395           0 :         PyObject *bigendian_obj = NULL;
   32396           0 :         PyObject *ndr64_obj = NULL;
   32397           0 :         libndr_flags ndr_push_flags = 0;
   32398             : 
   32399           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   32400             :                 discard_const_p(char *, kwnames),
   32401             :                 &bigendian_obj,
   32402             :                 &ndr64_obj)) {
   32403           0 :                 return NULL;
   32404             :         }
   32405             : 
   32406           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32407           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   32408             :         }
   32409           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32410           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   32411             :         }
   32412             : 
   32413           0 :         return py_srvsvc_NetCharDevQEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   32414             : }
   32415             : 
   32416           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   32417             : {
   32418           0 :         const struct ndr_interface_call *call = NULL;
   32419           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(py_obj);
   32420           0 :         struct ndr_pull *pull = NULL;
   32421           0 :         enum ndr_err_code err;
   32422             : 
   32423           0 :         if (ndr_table_srvsvc.num_calls < 4) {
   32424           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQEnum_ndr_unpack");
   32425           0 :                 return NULL;
   32426             :         }
   32427           0 :         call = &ndr_table_srvsvc.calls[3];
   32428             : 
   32429           0 :         pull = ndr_pull_init_blob(blob, object);
   32430           0 :         if (pull == NULL) {
   32431           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   32432           0 :                 return NULL;
   32433             :         }
   32434             : 
   32435           0 :         pull->flags |= ndr_pull_flags;
   32436             : 
   32437           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   32438           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   32439           0 :                 TALLOC_FREE(pull);
   32440           0 :                 PyErr_SetNdrError(err);
   32441           0 :                 return NULL;
   32442             :         }
   32443           0 :         if (!allow_remaining) {
   32444           0 :                 uint32_t highest_ofs;
   32445             : 
   32446           0 :                 if (pull->offset > pull->relative_highest_offset) {
   32447           0 :                         highest_ofs = pull->offset;
   32448             :                 } else {
   32449           0 :                         highest_ofs = pull->relative_highest_offset;
   32450             :                 }
   32451           0 :                 if (highest_ofs < pull->data_size) {
   32452           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   32453             :                                 "not all bytes consumed ofs[%u] size[%u]",
   32454             :                                 highest_ofs, pull->data_size);
   32455           0 :                         TALLOC_FREE(pull);
   32456           0 :                         PyErr_SetNdrError(err);
   32457           0 :                         return NULL;
   32458             :                 }
   32459             :         }
   32460             : 
   32461           0 :         TALLOC_FREE(pull);
   32462           0 :         Py_RETURN_NONE;
   32463             : }
   32464             : 
   32465           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32466             : {
   32467           0 :         DATA_BLOB blob;
   32468           0 :         Py_ssize_t blob_length = 0;
   32469           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   32470           0 :         PyObject *bigendian_obj = NULL;
   32471           0 :         PyObject *ndr64_obj = NULL;
   32472           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   32473           0 :         PyObject *allow_remaining_obj = NULL;
   32474           0 :         bool allow_remaining = false;
   32475             : 
   32476           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   32477             :                 discard_const_p(char *, kwnames),
   32478             :                 &blob.data, &blob_length,
   32479             :                 &bigendian_obj,
   32480             :                 &ndr64_obj,
   32481             :                 &allow_remaining_obj)) {
   32482           0 :                 return NULL;
   32483             :         }
   32484           0 :         blob.length = blob_length;
   32485             : 
   32486           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32487           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   32488             :         }
   32489           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32490           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   32491             :         }
   32492             : 
   32493           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   32494           0 :                 allow_remaining = true;
   32495             :         }
   32496             : 
   32497           0 :         return py_srvsvc_NetCharDevQEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   32498             : }
   32499             : 
   32500           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32501             : {
   32502           0 :         DATA_BLOB blob;
   32503           0 :         Py_ssize_t blob_length = 0;
   32504           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   32505           0 :         PyObject *bigendian_obj = NULL;
   32506           0 :         PyObject *ndr64_obj = NULL;
   32507           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   32508           0 :         PyObject *allow_remaining_obj = NULL;
   32509           0 :         bool allow_remaining = false;
   32510             : 
   32511           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   32512             :                 discard_const_p(char *, kwnames),
   32513             :                 &blob.data, &blob_length,
   32514             :                 &bigendian_obj,
   32515             :                 &ndr64_obj,
   32516             :                 &allow_remaining_obj)) {
   32517           0 :                 return NULL;
   32518             :         }
   32519           0 :         blob.length = blob_length;
   32520             : 
   32521           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32522           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   32523             :         }
   32524           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32525           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   32526             :         }
   32527             : 
   32528           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   32529           0 :                 allow_remaining = true;
   32530             :         }
   32531             : 
   32532           0 :         return py_srvsvc_NetCharDevQEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   32533             : }
   32534             : 
   32535           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   32536             : {
   32537           0 :         const struct ndr_interface_call *call = NULL;
   32538           0 :         struct srvsvc_NetCharDevQEnum *object = pytalloc_get_ptr(py_obj);
   32539           0 :         PyObject *ret;
   32540           0 :         char *retstr;
   32541             : 
   32542           0 :         if (ndr_table_srvsvc.num_calls < 4) {
   32543           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQEnum_ndr_print");
   32544           0 :                 return NULL;
   32545             :         }
   32546           0 :         call = &ndr_table_srvsvc.calls[3];
   32547             : 
   32548           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   32549           0 :         ret = PyUnicode_FromString(retstr);
   32550           0 :         TALLOC_FREE(retstr);
   32551             : 
   32552           0 :         return ret;
   32553             : }
   32554             : 
   32555           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   32556             : {
   32557           0 :         return py_srvsvc_NetCharDevQEnum_ndr_print(py_obj, "srvsvc_NetCharDevQEnum_in", NDR_IN);
   32558             : }
   32559             : 
   32560           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   32561             : {
   32562           0 :         return py_srvsvc_NetCharDevQEnum_ndr_print(py_obj, "srvsvc_NetCharDevQEnum_out", NDR_OUT);
   32563             : }
   32564             : 
   32565             : static PyMethodDef py_srvsvc_NetCharDevQEnum_methods[] = {
   32566             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevQEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   32567             :                 "srvsvc.NetCharDevQEnum.opnum() -> 3 (0x03) " },
   32568             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   32569             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   32570             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   32571             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   32572             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   32573             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   32574             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   32575             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   32576             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevQEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   32577             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevQEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   32578             :         { NULL, NULL, 0, NULL }
   32579             : };
   32580             : 
   32581             : 
   32582             : static PyTypeObject srvsvc_NetCharDevQEnum_Type = {
   32583             :         PyVarObject_HEAD_INIT(NULL, 0)
   32584             :         .tp_name = "srvsvc.NetCharDevQEnum",
   32585             :         .tp_getset = py_srvsvc_NetCharDevQEnum_getsetters,
   32586             :         .tp_methods = py_srvsvc_NetCharDevQEnum_methods,
   32587             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   32588             :         .tp_new = py_srvsvc_NetCharDevQEnum_new,
   32589             : };
   32590             : 
   32591           0 : static bool pack_py_srvsvc_NetCharDevQEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQEnum *r)
   32592             : {
   32593           0 :         PyObject *py_server_unc;
   32594           0 :         PyObject *py_user;
   32595           0 :         PyObject *py_info_ctr;
   32596           0 :         PyObject *py_max_buffer;
   32597           0 :         PyObject *py_resume_handle;
   32598           0 :         const char *kwnames[] = {
   32599             :                 "server_unc", "user", "info_ctr", "max_buffer", "resume_handle", NULL
   32600             :         };
   32601             : 
   32602           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)) {
   32603           0 :                 return false;
   32604             :         }
   32605             : 
   32606           0 :         if (py_server_unc == NULL) {
   32607           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   32608           0 :                 return false;
   32609             :         }
   32610           0 :         if (py_server_unc == Py_None) {
   32611           0 :                 r->in.server_unc = NULL;
   32612             :         } else {
   32613           0 :                 r->in.server_unc = NULL;
   32614             :                 {
   32615           0 :                         const char *test_str;
   32616           0 :                         const char *talloc_str;
   32617           0 :                         PyObject *unicode = NULL;
   32618           0 :                         if (PyUnicode_Check(py_server_unc)) {
   32619           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   32620           0 :                                 if (unicode == NULL) {
   32621           0 :                                         return false;
   32622             :                                 }
   32623           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   32624           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   32625           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   32626             :                         } else {
   32627           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   32628           0 :                                 return false;
   32629             :                         }
   32630           0 :                         talloc_str = talloc_strdup(r, test_str);
   32631           0 :                         if (unicode != NULL) {
   32632           0 :                                 Py_DECREF(unicode);
   32633             :                         }
   32634           0 :                         if (talloc_str == NULL) {
   32635           0 :                                 PyErr_NoMemory();
   32636           0 :                                 return false;
   32637             :                         }
   32638           0 :                         r->in.server_unc = talloc_str;
   32639             :                 }
   32640             :         }
   32641           0 :         if (py_user == NULL) {
   32642           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.user");
   32643           0 :                 return false;
   32644             :         }
   32645           0 :         if (py_user == Py_None) {
   32646           0 :                 r->in.user = NULL;
   32647             :         } else {
   32648           0 :                 r->in.user = NULL;
   32649             :                 {
   32650           0 :                         const char *test_str;
   32651           0 :                         const char *talloc_str;
   32652           0 :                         PyObject *unicode = NULL;
   32653           0 :                         if (PyUnicode_Check(py_user)) {
   32654           0 :                                 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   32655           0 :                                 if (unicode == NULL) {
   32656           0 :                                         return false;
   32657             :                                 }
   32658           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   32659           0 :                         } else if (PyBytes_Check(py_user)) {
   32660           0 :                                 test_str = PyBytes_AS_STRING(py_user);
   32661             :                         } else {
   32662           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   32663           0 :                                 return false;
   32664             :                         }
   32665           0 :                         talloc_str = talloc_strdup(r, test_str);
   32666           0 :                         if (unicode != NULL) {
   32667           0 :                                 Py_DECREF(unicode);
   32668             :                         }
   32669           0 :                         if (talloc_str == NULL) {
   32670           0 :                                 PyErr_NoMemory();
   32671           0 :                                 return false;
   32672             :                         }
   32673           0 :                         r->in.user = talloc_str;
   32674             :                 }
   32675             :         }
   32676           0 :         if (py_info_ctr == NULL) {
   32677           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info_ctr");
   32678           0 :                 return false;
   32679             :         }
   32680           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   32681           0 :         if (r->in.info_ctr == NULL) {
   32682           0 :                 PyErr_NoMemory();
   32683           0 :                 return false;
   32684             :         }
   32685           0 :         PY_CHECK_TYPE(&srvsvc_NetCharDevQInfoCtr_Type, py_info_ctr, return false;);
   32686           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   32687           0 :                 PyErr_NoMemory();
   32688           0 :                 return false;
   32689             :         }
   32690           0 :         r->in.info_ctr = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   32691           0 :         if (py_max_buffer == NULL) {
   32692           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.max_buffer");
   32693           0 :                 return false;
   32694             :         }
   32695             :         {
   32696           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   32697           0 :                 if (PyLong_Check(py_max_buffer)) {
   32698           0 :                         unsigned long long test_var;
   32699           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   32700           0 :                         if (PyErr_Occurred() != NULL) {
   32701           0 :                                 return false;
   32702             :                         }
   32703           0 :                         if (test_var > uint_max) {
   32704           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32705             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32706           0 :                                 return false;
   32707             :                         }
   32708           0 :                         r->in.max_buffer = test_var;
   32709             :                 } else {
   32710           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32711             :                           PyLong_Type.tp_name);
   32712           0 :                         return false;
   32713             :                 }
   32714             :         }
   32715           0 :         if (py_resume_handle == NULL) {
   32716           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.resume_handle");
   32717           0 :                 return false;
   32718             :         }
   32719           0 :         if (py_resume_handle == Py_None) {
   32720           0 :                 r->in.resume_handle = NULL;
   32721             :         } else {
   32722           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   32723           0 :                 if (r->in.resume_handle == NULL) {
   32724           0 :                         PyErr_NoMemory();
   32725           0 :                         return false;
   32726             :                 }
   32727             :                 {
   32728           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   32729           0 :                         if (PyLong_Check(py_resume_handle)) {
   32730           0 :                                 unsigned long long test_var;
   32731           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   32732           0 :                                 if (PyErr_Occurred() != NULL) {
   32733           0 :                                         return false;
   32734             :                                 }
   32735           0 :                                 if (test_var > uint_max) {
   32736           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32737             :                                           PyLong_Type.tp_name, uint_max, test_var);
   32738           0 :                                         return false;
   32739             :                                 }
   32740           0 :                                 *r->in.resume_handle = test_var;
   32741             :                         } else {
   32742           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   32743             :                                   PyLong_Type.tp_name);
   32744           0 :                                 return false;
   32745             :                         }
   32746             :                 }
   32747             :         }
   32748           0 :         return true;
   32749             : }
   32750             : 
   32751           0 : static PyObject *unpack_py_srvsvc_NetCharDevQEnum_args_out(struct srvsvc_NetCharDevQEnum *r)
   32752             : {
   32753           0 :         PyObject *result;
   32754           0 :         PyObject *py_info_ctr;
   32755           0 :         PyObject *py_totalentries;
   32756           0 :         PyObject *py_resume_handle;
   32757           0 :         result = PyTuple_New(3);
   32758           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevQInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   32759           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   32760           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.totalentries));
   32761           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   32762           0 :         if (r->out.resume_handle == NULL) {
   32763           0 :                 py_resume_handle = Py_None;
   32764           0 :                 Py_INCREF(py_resume_handle);
   32765             :         } else {
   32766           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.resume_handle));
   32767             :         }
   32768           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   32769           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   32770           0 :                 PyErr_SetWERROR(r->out.result);
   32771           0 :                 return NULL;
   32772             :         }
   32773             : 
   32774           0 :         return result;
   32775             : }
   32776             : 
   32777             : 
   32778           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_in_get_server_unc(PyObject *obj, void *closure)
   32779             : {
   32780           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(obj);
   32781           0 :         PyObject *py_server_unc;
   32782           0 :         if (object->in.server_unc == NULL) {
   32783           0 :                 Py_RETURN_NONE;
   32784             :         }
   32785           0 :         if (object->in.server_unc == NULL) {
   32786           0 :                 py_server_unc = Py_None;
   32787           0 :                 Py_INCREF(py_server_unc);
   32788             :         } else {
   32789           0 :                 if (object->in.server_unc == NULL) {
   32790           0 :                         py_server_unc = Py_None;
   32791           0 :                         Py_INCREF(py_server_unc);
   32792             :                 } else {
   32793           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   32794             :                 }
   32795             :         }
   32796           0 :         return py_server_unc;
   32797             : }
   32798             : 
   32799           0 : static int py_srvsvc_NetCharDevQGetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   32800             : {
   32801           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(py_obj);
   32802           0 :         if (value == NULL) {
   32803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   32804           0 :                 return -1;
   32805             :         }
   32806           0 :         if (value == Py_None) {
   32807           0 :                 object->in.server_unc = NULL;
   32808             :         } else {
   32809           0 :                 object->in.server_unc = NULL;
   32810             :                 {
   32811           0 :                         const char *test_str;
   32812           0 :                         const char *talloc_str;
   32813           0 :                         PyObject *unicode = NULL;
   32814           0 :                         if (PyUnicode_Check(value)) {
   32815           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   32816           0 :                                 if (unicode == NULL) {
   32817           0 :                                         return -1;
   32818             :                                 }
   32819           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   32820           0 :                         } else if (PyBytes_Check(value)) {
   32821           0 :                                 test_str = PyBytes_AS_STRING(value);
   32822             :                         } else {
   32823           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   32824           0 :                                 return -1;
   32825             :                         }
   32826           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   32827           0 :                         if (unicode != NULL) {
   32828           0 :                                 Py_DECREF(unicode);
   32829             :                         }
   32830           0 :                         if (talloc_str == NULL) {
   32831           0 :                                 PyErr_NoMemory();
   32832           0 :                                 return -1;
   32833             :                         }
   32834           0 :                         object->in.server_unc = talloc_str;
   32835             :                 }
   32836             :         }
   32837           0 :         return 0;
   32838             : }
   32839             : 
   32840           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_in_get_queue_name(PyObject *obj, void *closure)
   32841             : {
   32842           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(obj);
   32843           0 :         PyObject *py_queue_name;
   32844           0 :         if (object->in.queue_name == NULL) {
   32845           0 :                 py_queue_name = Py_None;
   32846           0 :                 Py_INCREF(py_queue_name);
   32847             :         } else {
   32848           0 :                 py_queue_name = PyUnicode_Decode(object->in.queue_name, strlen(object->in.queue_name), "utf-8", "ignore");
   32849             :         }
   32850           0 :         return py_queue_name;
   32851             : }
   32852             : 
   32853           0 : static int py_srvsvc_NetCharDevQGetInfo_in_set_queue_name(PyObject *py_obj, PyObject *value, void *closure)
   32854             : {
   32855           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(py_obj);
   32856           0 :         if (value == NULL) {
   32857           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.queue_name");
   32858           0 :                 return -1;
   32859             :         }
   32860             :         {
   32861           0 :                 const char *test_str;
   32862           0 :                 const char *talloc_str;
   32863           0 :                 PyObject *unicode = NULL;
   32864           0 :                 if (PyUnicode_Check(value)) {
   32865           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   32866           0 :                         if (unicode == NULL) {
   32867           0 :                                 return -1;
   32868             :                         }
   32869           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32870           0 :                 } else if (PyBytes_Check(value)) {
   32871           0 :                         test_str = PyBytes_AS_STRING(value);
   32872             :                 } else {
   32873           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   32874           0 :                         return -1;
   32875             :                 }
   32876           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   32877           0 :                 if (unicode != NULL) {
   32878           0 :                         Py_DECREF(unicode);
   32879             :                 }
   32880           0 :                 if (talloc_str == NULL) {
   32881           0 :                         PyErr_NoMemory();
   32882           0 :                         return -1;
   32883             :                 }
   32884           0 :                 object->in.queue_name = talloc_str;
   32885             :         }
   32886           0 :         return 0;
   32887             : }
   32888             : 
   32889           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_in_get_user(PyObject *obj, void *closure)
   32890             : {
   32891           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(obj);
   32892           0 :         PyObject *py_user;
   32893           0 :         if (object->in.user == NULL) {
   32894           0 :                 py_user = Py_None;
   32895           0 :                 Py_INCREF(py_user);
   32896             :         } else {
   32897           0 :                 py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   32898             :         }
   32899           0 :         return py_user;
   32900             : }
   32901             : 
   32902           0 : static int py_srvsvc_NetCharDevQGetInfo_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   32903             : {
   32904           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(py_obj);
   32905           0 :         if (value == NULL) {
   32906           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.user");
   32907           0 :                 return -1;
   32908             :         }
   32909             :         {
   32910           0 :                 const char *test_str;
   32911           0 :                 const char *talloc_str;
   32912           0 :                 PyObject *unicode = NULL;
   32913           0 :                 if (PyUnicode_Check(value)) {
   32914           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   32915           0 :                         if (unicode == NULL) {
   32916           0 :                                 return -1;
   32917             :                         }
   32918           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32919           0 :                 } else if (PyBytes_Check(value)) {
   32920           0 :                         test_str = PyBytes_AS_STRING(value);
   32921             :                 } else {
   32922           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   32923           0 :                         return -1;
   32924             :                 }
   32925           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   32926           0 :                 if (unicode != NULL) {
   32927           0 :                         Py_DECREF(unicode);
   32928             :                 }
   32929           0 :                 if (talloc_str == NULL) {
   32930           0 :                         PyErr_NoMemory();
   32931           0 :                         return -1;
   32932             :                 }
   32933           0 :                 object->in.user = talloc_str;
   32934             :         }
   32935           0 :         return 0;
   32936             : }
   32937             : 
   32938           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_in_get_level(PyObject *obj, void *closure)
   32939             : {
   32940           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(obj);
   32941           0 :         PyObject *py_level;
   32942           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   32943           0 :         return py_level;
   32944             : }
   32945             : 
   32946           0 : static int py_srvsvc_NetCharDevQGetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   32947             : {
   32948           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(py_obj);
   32949           0 :         if (value == NULL) {
   32950           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   32951           0 :                 return -1;
   32952             :         }
   32953             :         {
   32954           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   32955           0 :                 if (PyLong_Check(value)) {
   32956           0 :                         unsigned long long test_var;
   32957           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32958           0 :                         if (PyErr_Occurred() != NULL) {
   32959           0 :                                 return -1;
   32960             :                         }
   32961           0 :                         if (test_var > uint_max) {
   32962           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32963             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32964           0 :                                 return -1;
   32965             :                         }
   32966           0 :                         object->in.level = test_var;
   32967             :                 } else {
   32968           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32969             :                           PyLong_Type.tp_name);
   32970           0 :                         return -1;
   32971             :                 }
   32972             :         }
   32973           0 :         return 0;
   32974             : }
   32975             : 
   32976           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_out_get_info(PyObject *obj, void *closure)
   32977             : {
   32978           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(obj);
   32979           0 :         PyObject *py_info;
   32980           0 :         if (object->out.info == NULL) {
   32981           0 :                 Py_RETURN_NONE;
   32982             :         }
   32983           0 :         py_info = pyrpc_import_union(&srvsvc_NetCharDevQInfo_Type, object->out.info, object->in.level, object->out.info, "union srvsvc_NetCharDevQInfo");
   32984           0 :         if (py_info == NULL) {
   32985           0 :                 return NULL;
   32986             :         }
   32987           0 :         return py_info;
   32988             : }
   32989             : 
   32990           0 : static int py_srvsvc_NetCharDevQGetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   32991             : {
   32992           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(py_obj);
   32993           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   32994           0 :         if (value == NULL) {
   32995           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   32996           0 :                 return -1;
   32997             :         }
   32998           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   32999           0 :         if (object->out.info == NULL) {
   33000           0 :                 PyErr_NoMemory();
   33001           0 :                 return -1;
   33002             :         }
   33003             :         {
   33004           0 :                 union srvsvc_NetCharDevQInfo *info_switch_1;
   33005           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");
   33006           0 :                 if (info_switch_1 == NULL) {
   33007           0 :                         return -1;
   33008             :                 }
   33009           0 :                 object->out.info = info_switch_1;
   33010             :         }
   33011           0 :         return 0;
   33012             : }
   33013             : 
   33014           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_get_result(PyObject *obj, void *closure)
   33015             : {
   33016           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(obj);
   33017           0 :         PyObject *py_result;
   33018           0 :         py_result = PyErr_FromWERROR(object->out.result);
   33019           0 :         return py_result;
   33020             : }
   33021             : 
   33022           0 : static int py_srvsvc_NetCharDevQGetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   33023             : {
   33024           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(py_obj);
   33025           0 :         if (value == NULL) {
   33026           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   33027           0 :                 return -1;
   33028             :         }
   33029           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   33030           0 :         return 0;
   33031             : }
   33032             : 
   33033             : static PyGetSetDef py_srvsvc_NetCharDevQGetInfo_getsetters[] = {
   33034             :         {
   33035             :                 .name = discard_const_p(char, "in_server_unc"),
   33036             :                 .get = py_srvsvc_NetCharDevQGetInfo_in_get_server_unc,
   33037             :                 .set = py_srvsvc_NetCharDevQGetInfo_in_set_server_unc,
   33038             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33039             :         },
   33040             :         {
   33041             :                 .name = discard_const_p(char, "in_queue_name"),
   33042             :                 .get = py_srvsvc_NetCharDevQGetInfo_in_get_queue_name,
   33043             :                 .set = py_srvsvc_NetCharDevQGetInfo_in_set_queue_name,
   33044             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33045             :         },
   33046             :         {
   33047             :                 .name = discard_const_p(char, "in_user"),
   33048             :                 .get = py_srvsvc_NetCharDevQGetInfo_in_get_user,
   33049             :                 .set = py_srvsvc_NetCharDevQGetInfo_in_set_user,
   33050             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33051             :         },
   33052             :         {
   33053             :                 .name = discard_const_p(char, "in_level"),
   33054             :                 .get = py_srvsvc_NetCharDevQGetInfo_in_get_level,
   33055             :                 .set = py_srvsvc_NetCharDevQGetInfo_in_set_level,
   33056             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33057             :         },
   33058             :         {
   33059             :                 .name = discard_const_p(char, "out_info"),
   33060             :                 .get = py_srvsvc_NetCharDevQGetInfo_out_get_info,
   33061             :                 .set = py_srvsvc_NetCharDevQGetInfo_out_set_info,
   33062             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQInfo")
   33063             :         },
   33064             :         {
   33065             :                 .name = discard_const_p(char, "result"),
   33066             :                 .get = py_srvsvc_NetCharDevQGetInfo_get_result,
   33067             :                 .set = py_srvsvc_NetCharDevQGetInfo_set_result,
   33068             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   33069             :         },
   33070             :         { .name = NULL }
   33071             : };
   33072             : 
   33073           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33074             : {
   33075           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevQGetInfo, type);
   33076           0 :         struct srvsvc_NetCharDevQGetInfo *_self = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(self);
   33077           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   33078           0 :         _self->out.info = talloc_zero(mem_ctx, union srvsvc_NetCharDevQInfo);
   33079           0 :         return self;
   33080             : }
   33081             : 
   33082           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   33083             : {
   33084             : 
   33085             : 
   33086           0 :         return PyLong_FromLong(4);
   33087             : }
   33088             : 
   33089           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   33090             : {
   33091           0 :         const struct ndr_interface_call *call = NULL;
   33092           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(py_obj);
   33093           0 :         PyObject *ret = NULL;
   33094           0 :         struct ndr_push *push = NULL;
   33095           0 :         DATA_BLOB blob;
   33096           0 :         enum ndr_err_code err;
   33097             : 
   33098           0 :         if (ndr_table_srvsvc.num_calls < 5) {
   33099           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQGetInfo_ndr_pack");
   33100           0 :                 return NULL;
   33101             :         }
   33102           0 :         call = &ndr_table_srvsvc.calls[4];
   33103             : 
   33104           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   33105           0 :         if (push == NULL) {
   33106           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33107           0 :                 return NULL;
   33108             :         }
   33109             : 
   33110           0 :         push->flags |= ndr_push_flags;
   33111             : 
   33112           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   33113           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33114           0 :                 TALLOC_FREE(push);
   33115           0 :                 PyErr_SetNdrError(err);
   33116           0 :                 return NULL;
   33117             :         }
   33118           0 :         blob = ndr_push_blob(push);
   33119           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   33120           0 :         TALLOC_FREE(push);
   33121           0 :         return ret;
   33122             : }
   33123             : 
   33124           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33125             : {
   33126           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33127           0 :         PyObject *bigendian_obj = NULL;
   33128           0 :         PyObject *ndr64_obj = NULL;
   33129           0 :         libndr_flags ndr_push_flags = 0;
   33130             : 
   33131           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   33132             :                 discard_const_p(char *, kwnames),
   33133             :                 &bigendian_obj,
   33134             :                 &ndr64_obj)) {
   33135           0 :                 return NULL;
   33136             :         }
   33137             : 
   33138           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33139           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   33140             :         }
   33141           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33142           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   33143             :         }
   33144             : 
   33145           0 :         return py_srvsvc_NetCharDevQGetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   33146             : }
   33147             : 
   33148           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33149             : {
   33150           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33151           0 :         PyObject *bigendian_obj = NULL;
   33152           0 :         PyObject *ndr64_obj = NULL;
   33153           0 :         libndr_flags ndr_push_flags = 0;
   33154             : 
   33155           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   33156             :                 discard_const_p(char *, kwnames),
   33157             :                 &bigendian_obj,
   33158             :                 &ndr64_obj)) {
   33159           0 :                 return NULL;
   33160             :         }
   33161             : 
   33162           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33163           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   33164             :         }
   33165           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33166           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   33167             :         }
   33168             : 
   33169           0 :         return py_srvsvc_NetCharDevQGetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   33170             : }
   33171             : 
   33172           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   33173             : {
   33174           0 :         const struct ndr_interface_call *call = NULL;
   33175           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(py_obj);
   33176           0 :         struct ndr_pull *pull = NULL;
   33177           0 :         enum ndr_err_code err;
   33178             : 
   33179           0 :         if (ndr_table_srvsvc.num_calls < 5) {
   33180           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQGetInfo_ndr_unpack");
   33181           0 :                 return NULL;
   33182             :         }
   33183           0 :         call = &ndr_table_srvsvc.calls[4];
   33184             : 
   33185           0 :         pull = ndr_pull_init_blob(blob, object);
   33186           0 :         if (pull == NULL) {
   33187           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33188           0 :                 return NULL;
   33189             :         }
   33190             : 
   33191           0 :         pull->flags |= ndr_pull_flags;
   33192             : 
   33193           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   33194           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33195           0 :                 TALLOC_FREE(pull);
   33196           0 :                 PyErr_SetNdrError(err);
   33197           0 :                 return NULL;
   33198             :         }
   33199           0 :         if (!allow_remaining) {
   33200           0 :                 uint32_t highest_ofs;
   33201             : 
   33202           0 :                 if (pull->offset > pull->relative_highest_offset) {
   33203           0 :                         highest_ofs = pull->offset;
   33204             :                 } else {
   33205           0 :                         highest_ofs = pull->relative_highest_offset;
   33206             :                 }
   33207           0 :                 if (highest_ofs < pull->data_size) {
   33208           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   33209             :                                 "not all bytes consumed ofs[%u] size[%u]",
   33210             :                                 highest_ofs, pull->data_size);
   33211           0 :                         TALLOC_FREE(pull);
   33212           0 :                         PyErr_SetNdrError(err);
   33213           0 :                         return NULL;
   33214             :                 }
   33215             :         }
   33216             : 
   33217           0 :         TALLOC_FREE(pull);
   33218           0 :         Py_RETURN_NONE;
   33219             : }
   33220             : 
   33221           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33222             : {
   33223           0 :         DATA_BLOB blob;
   33224           0 :         Py_ssize_t blob_length = 0;
   33225           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   33226           0 :         PyObject *bigendian_obj = NULL;
   33227           0 :         PyObject *ndr64_obj = NULL;
   33228           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   33229           0 :         PyObject *allow_remaining_obj = NULL;
   33230           0 :         bool allow_remaining = false;
   33231             : 
   33232           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   33233             :                 discard_const_p(char *, kwnames),
   33234             :                 &blob.data, &blob_length,
   33235             :                 &bigendian_obj,
   33236             :                 &ndr64_obj,
   33237             :                 &allow_remaining_obj)) {
   33238           0 :                 return NULL;
   33239             :         }
   33240           0 :         blob.length = blob_length;
   33241             : 
   33242           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33243           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   33244             :         }
   33245           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33246           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   33247             :         }
   33248             : 
   33249           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   33250           0 :                 allow_remaining = true;
   33251             :         }
   33252             : 
   33253           0 :         return py_srvsvc_NetCharDevQGetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   33254             : }
   33255             : 
   33256           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33257             : {
   33258           0 :         DATA_BLOB blob;
   33259           0 :         Py_ssize_t blob_length = 0;
   33260           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   33261           0 :         PyObject *bigendian_obj = NULL;
   33262           0 :         PyObject *ndr64_obj = NULL;
   33263           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   33264           0 :         PyObject *allow_remaining_obj = NULL;
   33265           0 :         bool allow_remaining = false;
   33266             : 
   33267           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   33268             :                 discard_const_p(char *, kwnames),
   33269             :                 &blob.data, &blob_length,
   33270             :                 &bigendian_obj,
   33271             :                 &ndr64_obj,
   33272             :                 &allow_remaining_obj)) {
   33273           0 :                 return NULL;
   33274             :         }
   33275           0 :         blob.length = blob_length;
   33276             : 
   33277           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33278           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   33279             :         }
   33280           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33281           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   33282             :         }
   33283             : 
   33284           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   33285           0 :                 allow_remaining = true;
   33286             :         }
   33287             : 
   33288           0 :         return py_srvsvc_NetCharDevQGetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   33289             : }
   33290             : 
   33291           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   33292             : {
   33293           0 :         const struct ndr_interface_call *call = NULL;
   33294           0 :         struct srvsvc_NetCharDevQGetInfo *object = pytalloc_get_ptr(py_obj);
   33295           0 :         PyObject *ret;
   33296           0 :         char *retstr;
   33297             : 
   33298           0 :         if (ndr_table_srvsvc.num_calls < 5) {
   33299           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQGetInfo_ndr_print");
   33300           0 :                 return NULL;
   33301             :         }
   33302           0 :         call = &ndr_table_srvsvc.calls[4];
   33303             : 
   33304           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   33305           0 :         ret = PyUnicode_FromString(retstr);
   33306           0 :         TALLOC_FREE(retstr);
   33307             : 
   33308           0 :         return ret;
   33309             : }
   33310             : 
   33311           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   33312             : {
   33313           0 :         return py_srvsvc_NetCharDevQGetInfo_ndr_print(py_obj, "srvsvc_NetCharDevQGetInfo_in", NDR_IN);
   33314             : }
   33315             : 
   33316           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   33317             : {
   33318           0 :         return py_srvsvc_NetCharDevQGetInfo_ndr_print(py_obj, "srvsvc_NetCharDevQGetInfo_out", NDR_OUT);
   33319             : }
   33320             : 
   33321             : static PyMethodDef py_srvsvc_NetCharDevQGetInfo_methods[] = {
   33322             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevQGetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   33323             :                 "srvsvc.NetCharDevQGetInfo.opnum() -> 4 (0x04) " },
   33324             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQGetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   33325             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   33326             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQGetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   33327             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   33328             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQGetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   33329             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   33330             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQGetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   33331             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   33332             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevQGetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   33333             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevQGetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   33334             :         { NULL, NULL, 0, NULL }
   33335             : };
   33336             : 
   33337             : 
   33338             : static PyTypeObject srvsvc_NetCharDevQGetInfo_Type = {
   33339             :         PyVarObject_HEAD_INIT(NULL, 0)
   33340             :         .tp_name = "srvsvc.NetCharDevQGetInfo",
   33341             :         .tp_getset = py_srvsvc_NetCharDevQGetInfo_getsetters,
   33342             :         .tp_methods = py_srvsvc_NetCharDevQGetInfo_methods,
   33343             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   33344             :         .tp_new = py_srvsvc_NetCharDevQGetInfo_new,
   33345             : };
   33346             : 
   33347           0 : static bool pack_py_srvsvc_NetCharDevQGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQGetInfo *r)
   33348             : {
   33349           0 :         PyObject *py_server_unc;
   33350           0 :         PyObject *py_queue_name;
   33351           0 :         PyObject *py_user;
   33352           0 :         PyObject *py_level;
   33353           0 :         const char *kwnames[] = {
   33354             :                 "server_unc", "queue_name", "user", "level", NULL
   33355             :         };
   33356             : 
   33357           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetCharDevQGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_queue_name, &py_user, &py_level)) {
   33358           0 :                 return false;
   33359             :         }
   33360             : 
   33361           0 :         if (py_server_unc == NULL) {
   33362           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   33363           0 :                 return false;
   33364             :         }
   33365           0 :         if (py_server_unc == Py_None) {
   33366           0 :                 r->in.server_unc = NULL;
   33367             :         } else {
   33368           0 :                 r->in.server_unc = NULL;
   33369             :                 {
   33370           0 :                         const char *test_str;
   33371           0 :                         const char *talloc_str;
   33372           0 :                         PyObject *unicode = NULL;
   33373           0 :                         if (PyUnicode_Check(py_server_unc)) {
   33374           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   33375           0 :                                 if (unicode == NULL) {
   33376           0 :                                         return false;
   33377             :                                 }
   33378           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   33379           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   33380           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   33381             :                         } else {
   33382           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   33383           0 :                                 return false;
   33384             :                         }
   33385           0 :                         talloc_str = talloc_strdup(r, test_str);
   33386           0 :                         if (unicode != NULL) {
   33387           0 :                                 Py_DECREF(unicode);
   33388             :                         }
   33389           0 :                         if (talloc_str == NULL) {
   33390           0 :                                 PyErr_NoMemory();
   33391           0 :                                 return false;
   33392             :                         }
   33393           0 :                         r->in.server_unc = talloc_str;
   33394             :                 }
   33395             :         }
   33396           0 :         if (py_queue_name == NULL) {
   33397           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.queue_name");
   33398           0 :                 return false;
   33399             :         }
   33400             :         {
   33401           0 :                 const char *test_str;
   33402           0 :                 const char *talloc_str;
   33403           0 :                 PyObject *unicode = NULL;
   33404           0 :                 if (PyUnicode_Check(py_queue_name)) {
   33405           0 :                         unicode = PyUnicode_AsEncodedString(py_queue_name, "utf-8", "ignore");
   33406           0 :                         if (unicode == NULL) {
   33407           0 :                                 return false;
   33408             :                         }
   33409           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33410           0 :                 } else if (PyBytes_Check(py_queue_name)) {
   33411           0 :                         test_str = PyBytes_AS_STRING(py_queue_name);
   33412             :                 } else {
   33413           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
   33414           0 :                         return false;
   33415             :                 }
   33416           0 :                 talloc_str = talloc_strdup(r, test_str);
   33417           0 :                 if (unicode != NULL) {
   33418           0 :                         Py_DECREF(unicode);
   33419             :                 }
   33420           0 :                 if (talloc_str == NULL) {
   33421           0 :                         PyErr_NoMemory();
   33422           0 :                         return false;
   33423             :                 }
   33424           0 :                 r->in.queue_name = talloc_str;
   33425             :         }
   33426           0 :         if (py_user == NULL) {
   33427           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.user");
   33428           0 :                 return false;
   33429             :         }
   33430             :         {
   33431           0 :                 const char *test_str;
   33432           0 :                 const char *talloc_str;
   33433           0 :                 PyObject *unicode = NULL;
   33434           0 :                 if (PyUnicode_Check(py_user)) {
   33435           0 :                         unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   33436           0 :                         if (unicode == NULL) {
   33437           0 :                                 return false;
   33438             :                         }
   33439           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33440           0 :                 } else if (PyBytes_Check(py_user)) {
   33441           0 :                         test_str = PyBytes_AS_STRING(py_user);
   33442             :                 } else {
   33443           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   33444           0 :                         return false;
   33445             :                 }
   33446           0 :                 talloc_str = talloc_strdup(r, test_str);
   33447           0 :                 if (unicode != NULL) {
   33448           0 :                         Py_DECREF(unicode);
   33449             :                 }
   33450           0 :                 if (talloc_str == NULL) {
   33451           0 :                         PyErr_NoMemory();
   33452           0 :                         return false;
   33453             :                 }
   33454           0 :                 r->in.user = talloc_str;
   33455             :         }
   33456           0 :         if (py_level == NULL) {
   33457           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   33458           0 :                 return false;
   33459             :         }
   33460             :         {
   33461           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   33462           0 :                 if (PyLong_Check(py_level)) {
   33463           0 :                         unsigned long long test_var;
   33464           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   33465           0 :                         if (PyErr_Occurred() != NULL) {
   33466           0 :                                 return false;
   33467             :                         }
   33468           0 :                         if (test_var > uint_max) {
   33469           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33470             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33471           0 :                                 return false;
   33472             :                         }
   33473           0 :                         r->in.level = test_var;
   33474             :                 } else {
   33475           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33476             :                           PyLong_Type.tp_name);
   33477           0 :                         return false;
   33478             :                 }
   33479             :         }
   33480           0 :         return true;
   33481             : }
   33482             : 
   33483           0 : static PyObject *unpack_py_srvsvc_NetCharDevQGetInfo_args_out(struct srvsvc_NetCharDevQGetInfo *r)
   33484             : {
   33485           0 :         PyObject *result;
   33486           0 :         PyObject *py_info;
   33487           0 :         py_info = pyrpc_import_union(&srvsvc_NetCharDevQInfo_Type, r->out.info, r->in.level, r->out.info, "union srvsvc_NetCharDevQInfo");
   33488           0 :         if (py_info == NULL) {
   33489           0 :                 return NULL;
   33490             :         }
   33491           0 :         result = py_info;
   33492           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   33493           0 :                 PyErr_SetWERROR(r->out.result);
   33494           0 :                 return NULL;
   33495             :         }
   33496             : 
   33497           0 :         return result;
   33498             : }
   33499             : 
   33500             : 
   33501           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_in_get_server_unc(PyObject *obj, void *closure)
   33502             : {
   33503           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(obj);
   33504           0 :         PyObject *py_server_unc;
   33505           0 :         if (object->in.server_unc == NULL) {
   33506           0 :                 Py_RETURN_NONE;
   33507             :         }
   33508           0 :         if (object->in.server_unc == NULL) {
   33509           0 :                 py_server_unc = Py_None;
   33510           0 :                 Py_INCREF(py_server_unc);
   33511             :         } else {
   33512           0 :                 if (object->in.server_unc == NULL) {
   33513           0 :                         py_server_unc = Py_None;
   33514           0 :                         Py_INCREF(py_server_unc);
   33515             :                 } else {
   33516           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   33517             :                 }
   33518             :         }
   33519           0 :         return py_server_unc;
   33520             : }
   33521             : 
   33522           0 : static int py_srvsvc_NetCharDevQSetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   33523             : {
   33524           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(py_obj);
   33525           0 :         if (value == NULL) {
   33526           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   33527           0 :                 return -1;
   33528             :         }
   33529           0 :         if (value == Py_None) {
   33530           0 :                 object->in.server_unc = NULL;
   33531             :         } else {
   33532           0 :                 object->in.server_unc = NULL;
   33533             :                 {
   33534           0 :                         const char *test_str;
   33535           0 :                         const char *talloc_str;
   33536           0 :                         PyObject *unicode = NULL;
   33537           0 :                         if (PyUnicode_Check(value)) {
   33538           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   33539           0 :                                 if (unicode == NULL) {
   33540           0 :                                         return -1;
   33541             :                                 }
   33542           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   33543           0 :                         } else if (PyBytes_Check(value)) {
   33544           0 :                                 test_str = PyBytes_AS_STRING(value);
   33545             :                         } else {
   33546           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   33547           0 :                                 return -1;
   33548             :                         }
   33549           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   33550           0 :                         if (unicode != NULL) {
   33551           0 :                                 Py_DECREF(unicode);
   33552             :                         }
   33553           0 :                         if (talloc_str == NULL) {
   33554           0 :                                 PyErr_NoMemory();
   33555           0 :                                 return -1;
   33556             :                         }
   33557           0 :                         object->in.server_unc = talloc_str;
   33558             :                 }
   33559             :         }
   33560           0 :         return 0;
   33561             : }
   33562             : 
   33563           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_in_get_queue_name(PyObject *obj, void *closure)
   33564             : {
   33565           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(obj);
   33566           0 :         PyObject *py_queue_name;
   33567           0 :         if (object->in.queue_name == NULL) {
   33568           0 :                 py_queue_name = Py_None;
   33569           0 :                 Py_INCREF(py_queue_name);
   33570             :         } else {
   33571           0 :                 py_queue_name = PyUnicode_Decode(object->in.queue_name, strlen(object->in.queue_name), "utf-8", "ignore");
   33572             :         }
   33573           0 :         return py_queue_name;
   33574             : }
   33575             : 
   33576           0 : static int py_srvsvc_NetCharDevQSetInfo_in_set_queue_name(PyObject *py_obj, PyObject *value, void *closure)
   33577             : {
   33578           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(py_obj);
   33579           0 :         if (value == NULL) {
   33580           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.queue_name");
   33581           0 :                 return -1;
   33582             :         }
   33583             :         {
   33584           0 :                 const char *test_str;
   33585           0 :                 const char *talloc_str;
   33586           0 :                 PyObject *unicode = NULL;
   33587           0 :                 if (PyUnicode_Check(value)) {
   33588           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   33589           0 :                         if (unicode == NULL) {
   33590           0 :                                 return -1;
   33591             :                         }
   33592           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33593           0 :                 } else if (PyBytes_Check(value)) {
   33594           0 :                         test_str = PyBytes_AS_STRING(value);
   33595             :                 } else {
   33596           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   33597           0 :                         return -1;
   33598             :                 }
   33599           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   33600           0 :                 if (unicode != NULL) {
   33601           0 :                         Py_DECREF(unicode);
   33602             :                 }
   33603           0 :                 if (talloc_str == NULL) {
   33604           0 :                         PyErr_NoMemory();
   33605           0 :                         return -1;
   33606             :                 }
   33607           0 :                 object->in.queue_name = talloc_str;
   33608             :         }
   33609           0 :         return 0;
   33610             : }
   33611             : 
   33612           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_in_get_level(PyObject *obj, void *closure)
   33613             : {
   33614           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(obj);
   33615           0 :         PyObject *py_level;
   33616           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   33617           0 :         return py_level;
   33618             : }
   33619             : 
   33620           0 : static int py_srvsvc_NetCharDevQSetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   33621             : {
   33622           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(py_obj);
   33623           0 :         if (value == NULL) {
   33624           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   33625           0 :                 return -1;
   33626             :         }
   33627             :         {
   33628           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   33629           0 :                 if (PyLong_Check(value)) {
   33630           0 :                         unsigned long long test_var;
   33631           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33632           0 :                         if (PyErr_Occurred() != NULL) {
   33633           0 :                                 return -1;
   33634             :                         }
   33635           0 :                         if (test_var > uint_max) {
   33636           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33637             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33638           0 :                                 return -1;
   33639             :                         }
   33640           0 :                         object->in.level = test_var;
   33641             :                 } else {
   33642           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33643             :                           PyLong_Type.tp_name);
   33644           0 :                         return -1;
   33645             :                 }
   33646             :         }
   33647           0 :         return 0;
   33648             : }
   33649             : 
   33650           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_in_get_info(PyObject *obj, void *closure)
   33651             : {
   33652           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(obj);
   33653           0 :         PyObject *py_info;
   33654           0 :         py_info = pyrpc_import_union(&srvsvc_NetCharDevQInfo_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.info, "union srvsvc_NetCharDevQInfo");
   33655           0 :         if (py_info == NULL) {
   33656           0 :                 return NULL;
   33657             :         }
   33658           0 :         return py_info;
   33659             : }
   33660             : 
   33661           0 : static int py_srvsvc_NetCharDevQSetInfo_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   33662             : {
   33663           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(py_obj);
   33664           0 :         if (value == NULL) {
   33665           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info");
   33666           0 :                 return -1;
   33667             :         }
   33668             :         {
   33669           0 :                 union srvsvc_NetCharDevQInfo *info_switch_0;
   33670           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");
   33671           0 :                 if (info_switch_0 == NULL) {
   33672           0 :                         return -1;
   33673             :                 }
   33674           0 :                 object->in.info = *info_switch_0;
   33675             :         }
   33676           0 :         return 0;
   33677             : }
   33678             : 
   33679           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_in_get_parm_error(PyObject *obj, void *closure)
   33680             : {
   33681           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(obj);
   33682           0 :         PyObject *py_parm_error;
   33683           0 :         if (object->in.parm_error == NULL) {
   33684           0 :                 Py_RETURN_NONE;
   33685             :         }
   33686           0 :         if (object->in.parm_error == NULL) {
   33687           0 :                 py_parm_error = Py_None;
   33688           0 :                 Py_INCREF(py_parm_error);
   33689             :         } else {
   33690           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.parm_error));
   33691             :         }
   33692           0 :         return py_parm_error;
   33693             : }
   33694             : 
   33695           0 : static int py_srvsvc_NetCharDevQSetInfo_in_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   33696             : {
   33697           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(py_obj);
   33698           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.parm_error));
   33699           0 :         if (value == NULL) {
   33700           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.parm_error");
   33701           0 :                 return -1;
   33702             :         }
   33703           0 :         if (value == Py_None) {
   33704           0 :                 object->in.parm_error = NULL;
   33705             :         } else {
   33706           0 :                 object->in.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.parm_error);
   33707           0 :                 if (object->in.parm_error == NULL) {
   33708           0 :                         PyErr_NoMemory();
   33709           0 :                         return -1;
   33710             :                 }
   33711             :                 {
   33712           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.parm_error));
   33713           0 :                         if (PyLong_Check(value)) {
   33714           0 :                                 unsigned long long test_var;
   33715           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   33716           0 :                                 if (PyErr_Occurred() != NULL) {
   33717           0 :                                         return -1;
   33718             :                                 }
   33719           0 :                                 if (test_var > uint_max) {
   33720           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33721             :                                           PyLong_Type.tp_name, uint_max, test_var);
   33722           0 :                                         return -1;
   33723             :                                 }
   33724           0 :                                 *object->in.parm_error = test_var;
   33725             :                         } else {
   33726           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   33727             :                                   PyLong_Type.tp_name);
   33728           0 :                                 return -1;
   33729             :                         }
   33730             :                 }
   33731             :         }
   33732           0 :         return 0;
   33733             : }
   33734             : 
   33735           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_out_get_parm_error(PyObject *obj, void *closure)
   33736             : {
   33737           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(obj);
   33738           0 :         PyObject *py_parm_error;
   33739           0 :         if (object->out.parm_error == NULL) {
   33740           0 :                 Py_RETURN_NONE;
   33741             :         }
   33742           0 :         if (object->out.parm_error == NULL) {
   33743           0 :                 py_parm_error = Py_None;
   33744           0 :                 Py_INCREF(py_parm_error);
   33745             :         } else {
   33746           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.parm_error));
   33747             :         }
   33748           0 :         return py_parm_error;
   33749             : }
   33750             : 
   33751           0 : static int py_srvsvc_NetCharDevQSetInfo_out_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   33752             : {
   33753           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(py_obj);
   33754           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.parm_error));
   33755           0 :         if (value == NULL) {
   33756           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.parm_error");
   33757           0 :                 return -1;
   33758             :         }
   33759           0 :         if (value == Py_None) {
   33760           0 :                 object->out.parm_error = NULL;
   33761             :         } else {
   33762           0 :                 object->out.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.parm_error);
   33763           0 :                 if (object->out.parm_error == NULL) {
   33764           0 :                         PyErr_NoMemory();
   33765           0 :                         return -1;
   33766             :                 }
   33767             :                 {
   33768           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.parm_error));
   33769           0 :                         if (PyLong_Check(value)) {
   33770           0 :                                 unsigned long long test_var;
   33771           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   33772           0 :                                 if (PyErr_Occurred() != NULL) {
   33773           0 :                                         return -1;
   33774             :                                 }
   33775           0 :                                 if (test_var > uint_max) {
   33776           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33777             :                                           PyLong_Type.tp_name, uint_max, test_var);
   33778           0 :                                         return -1;
   33779             :                                 }
   33780           0 :                                 *object->out.parm_error = test_var;
   33781             :                         } else {
   33782           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   33783             :                                   PyLong_Type.tp_name);
   33784           0 :                                 return -1;
   33785             :                         }
   33786             :                 }
   33787             :         }
   33788           0 :         return 0;
   33789             : }
   33790             : 
   33791           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_get_result(PyObject *obj, void *closure)
   33792             : {
   33793           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(obj);
   33794           0 :         PyObject *py_result;
   33795           0 :         py_result = PyErr_FromWERROR(object->out.result);
   33796           0 :         return py_result;
   33797             : }
   33798             : 
   33799           0 : static int py_srvsvc_NetCharDevQSetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   33800             : {
   33801           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(py_obj);
   33802           0 :         if (value == NULL) {
   33803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   33804           0 :                 return -1;
   33805             :         }
   33806           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   33807           0 :         return 0;
   33808             : }
   33809             : 
   33810             : static PyGetSetDef py_srvsvc_NetCharDevQSetInfo_getsetters[] = {
   33811             :         {
   33812             :                 .name = discard_const_p(char, "in_server_unc"),
   33813             :                 .get = py_srvsvc_NetCharDevQSetInfo_in_get_server_unc,
   33814             :                 .set = py_srvsvc_NetCharDevQSetInfo_in_set_server_unc,
   33815             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33816             :         },
   33817             :         {
   33818             :                 .name = discard_const_p(char, "in_queue_name"),
   33819             :                 .get = py_srvsvc_NetCharDevQSetInfo_in_get_queue_name,
   33820             :                 .set = py_srvsvc_NetCharDevQSetInfo_in_set_queue_name,
   33821             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33822             :         },
   33823             :         {
   33824             :                 .name = discard_const_p(char, "in_level"),
   33825             :                 .get = py_srvsvc_NetCharDevQSetInfo_in_get_level,
   33826             :                 .set = py_srvsvc_NetCharDevQSetInfo_in_set_level,
   33827             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33828             :         },
   33829             :         {
   33830             :                 .name = discard_const_p(char, "in_info"),
   33831             :                 .get = py_srvsvc_NetCharDevQSetInfo_in_get_info,
   33832             :                 .set = py_srvsvc_NetCharDevQSetInfo_in_set_info,
   33833             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQInfo")
   33834             :         },
   33835             :         {
   33836             :                 .name = discard_const_p(char, "in_parm_error"),
   33837             :                 .get = py_srvsvc_NetCharDevQSetInfo_in_get_parm_error,
   33838             :                 .set = py_srvsvc_NetCharDevQSetInfo_in_set_parm_error,
   33839             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33840             :         },
   33841             :         {
   33842             :                 .name = discard_const_p(char, "out_parm_error"),
   33843             :                 .get = py_srvsvc_NetCharDevQSetInfo_out_get_parm_error,
   33844             :                 .set = py_srvsvc_NetCharDevQSetInfo_out_set_parm_error,
   33845             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33846             :         },
   33847             :         {
   33848             :                 .name = discard_const_p(char, "result"),
   33849             :                 .get = py_srvsvc_NetCharDevQSetInfo_get_result,
   33850             :                 .set = py_srvsvc_NetCharDevQSetInfo_set_result,
   33851             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   33852             :         },
   33853             :         { .name = NULL }
   33854             : };
   33855             : 
   33856           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33857             : {
   33858           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevQSetInfo, type);
   33859           0 :         return self;
   33860             : }
   33861             : 
   33862           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   33863             : {
   33864             : 
   33865             : 
   33866           0 :         return PyLong_FromLong(5);
   33867             : }
   33868             : 
   33869           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   33870             : {
   33871           0 :         const struct ndr_interface_call *call = NULL;
   33872           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(py_obj);
   33873           0 :         PyObject *ret = NULL;
   33874           0 :         struct ndr_push *push = NULL;
   33875           0 :         DATA_BLOB blob;
   33876           0 :         enum ndr_err_code err;
   33877             : 
   33878           0 :         if (ndr_table_srvsvc.num_calls < 6) {
   33879           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQSetInfo_ndr_pack");
   33880           0 :                 return NULL;
   33881             :         }
   33882           0 :         call = &ndr_table_srvsvc.calls[5];
   33883             : 
   33884           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   33885           0 :         if (push == NULL) {
   33886           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33887           0 :                 return NULL;
   33888             :         }
   33889             : 
   33890           0 :         push->flags |= ndr_push_flags;
   33891             : 
   33892           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   33893           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33894           0 :                 TALLOC_FREE(push);
   33895           0 :                 PyErr_SetNdrError(err);
   33896           0 :                 return NULL;
   33897             :         }
   33898           0 :         blob = ndr_push_blob(push);
   33899           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   33900           0 :         TALLOC_FREE(push);
   33901           0 :         return ret;
   33902             : }
   33903             : 
   33904           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33905             : {
   33906           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33907           0 :         PyObject *bigendian_obj = NULL;
   33908           0 :         PyObject *ndr64_obj = NULL;
   33909           0 :         libndr_flags ndr_push_flags = 0;
   33910             : 
   33911           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   33912             :                 discard_const_p(char *, kwnames),
   33913             :                 &bigendian_obj,
   33914             :                 &ndr64_obj)) {
   33915           0 :                 return NULL;
   33916             :         }
   33917             : 
   33918           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33919           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   33920             :         }
   33921           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33922           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   33923             :         }
   33924             : 
   33925           0 :         return py_srvsvc_NetCharDevQSetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   33926             : }
   33927             : 
   33928           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33929             : {
   33930           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33931           0 :         PyObject *bigendian_obj = NULL;
   33932           0 :         PyObject *ndr64_obj = NULL;
   33933           0 :         libndr_flags ndr_push_flags = 0;
   33934             : 
   33935           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   33936             :                 discard_const_p(char *, kwnames),
   33937             :                 &bigendian_obj,
   33938             :                 &ndr64_obj)) {
   33939           0 :                 return NULL;
   33940             :         }
   33941             : 
   33942           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33943           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   33944             :         }
   33945           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33946           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   33947             :         }
   33948             : 
   33949           0 :         return py_srvsvc_NetCharDevQSetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   33950             : }
   33951             : 
   33952           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   33953             : {
   33954           0 :         const struct ndr_interface_call *call = NULL;
   33955           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(py_obj);
   33956           0 :         struct ndr_pull *pull = NULL;
   33957           0 :         enum ndr_err_code err;
   33958             : 
   33959           0 :         if (ndr_table_srvsvc.num_calls < 6) {
   33960           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQSetInfo_ndr_unpack");
   33961           0 :                 return NULL;
   33962             :         }
   33963           0 :         call = &ndr_table_srvsvc.calls[5];
   33964             : 
   33965           0 :         pull = ndr_pull_init_blob(blob, object);
   33966           0 :         if (pull == NULL) {
   33967           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33968           0 :                 return NULL;
   33969             :         }
   33970             : 
   33971           0 :         pull->flags |= ndr_pull_flags;
   33972             : 
   33973           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   33974           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33975           0 :                 TALLOC_FREE(pull);
   33976           0 :                 PyErr_SetNdrError(err);
   33977           0 :                 return NULL;
   33978             :         }
   33979           0 :         if (!allow_remaining) {
   33980           0 :                 uint32_t highest_ofs;
   33981             : 
   33982           0 :                 if (pull->offset > pull->relative_highest_offset) {
   33983           0 :                         highest_ofs = pull->offset;
   33984             :                 } else {
   33985           0 :                         highest_ofs = pull->relative_highest_offset;
   33986             :                 }
   33987           0 :                 if (highest_ofs < pull->data_size) {
   33988           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   33989             :                                 "not all bytes consumed ofs[%u] size[%u]",
   33990             :                                 highest_ofs, pull->data_size);
   33991           0 :                         TALLOC_FREE(pull);
   33992           0 :                         PyErr_SetNdrError(err);
   33993           0 :                         return NULL;
   33994             :                 }
   33995             :         }
   33996             : 
   33997           0 :         TALLOC_FREE(pull);
   33998           0 :         Py_RETURN_NONE;
   33999             : }
   34000             : 
   34001           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34002             : {
   34003           0 :         DATA_BLOB blob;
   34004           0 :         Py_ssize_t blob_length = 0;
   34005           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34006           0 :         PyObject *bigendian_obj = NULL;
   34007           0 :         PyObject *ndr64_obj = NULL;
   34008           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34009           0 :         PyObject *allow_remaining_obj = NULL;
   34010           0 :         bool allow_remaining = false;
   34011             : 
   34012           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   34013             :                 discard_const_p(char *, kwnames),
   34014             :                 &blob.data, &blob_length,
   34015             :                 &bigendian_obj,
   34016             :                 &ndr64_obj,
   34017             :                 &allow_remaining_obj)) {
   34018           0 :                 return NULL;
   34019             :         }
   34020           0 :         blob.length = blob_length;
   34021             : 
   34022           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34023           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34024             :         }
   34025           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34026           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34027             :         }
   34028             : 
   34029           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34030           0 :                 allow_remaining = true;
   34031             :         }
   34032             : 
   34033           0 :         return py_srvsvc_NetCharDevQSetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   34034             : }
   34035             : 
   34036           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34037             : {
   34038           0 :         DATA_BLOB blob;
   34039           0 :         Py_ssize_t blob_length = 0;
   34040           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34041           0 :         PyObject *bigendian_obj = NULL;
   34042           0 :         PyObject *ndr64_obj = NULL;
   34043           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34044           0 :         PyObject *allow_remaining_obj = NULL;
   34045           0 :         bool allow_remaining = false;
   34046             : 
   34047           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   34048             :                 discard_const_p(char *, kwnames),
   34049             :                 &blob.data, &blob_length,
   34050             :                 &bigendian_obj,
   34051             :                 &ndr64_obj,
   34052             :                 &allow_remaining_obj)) {
   34053           0 :                 return NULL;
   34054             :         }
   34055           0 :         blob.length = blob_length;
   34056             : 
   34057           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34058           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34059             :         }
   34060           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34061           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34062             :         }
   34063             : 
   34064           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34065           0 :                 allow_remaining = true;
   34066             :         }
   34067             : 
   34068           0 :         return py_srvsvc_NetCharDevQSetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   34069             : }
   34070             : 
   34071           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   34072             : {
   34073           0 :         const struct ndr_interface_call *call = NULL;
   34074           0 :         struct srvsvc_NetCharDevQSetInfo *object = pytalloc_get_ptr(py_obj);
   34075           0 :         PyObject *ret;
   34076           0 :         char *retstr;
   34077             : 
   34078           0 :         if (ndr_table_srvsvc.num_calls < 6) {
   34079           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQSetInfo_ndr_print");
   34080           0 :                 return NULL;
   34081             :         }
   34082           0 :         call = &ndr_table_srvsvc.calls[5];
   34083             : 
   34084           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   34085           0 :         ret = PyUnicode_FromString(retstr);
   34086           0 :         TALLOC_FREE(retstr);
   34087             : 
   34088           0 :         return ret;
   34089             : }
   34090             : 
   34091           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34092             : {
   34093           0 :         return py_srvsvc_NetCharDevQSetInfo_ndr_print(py_obj, "srvsvc_NetCharDevQSetInfo_in", NDR_IN);
   34094             : }
   34095             : 
   34096           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34097             : {
   34098           0 :         return py_srvsvc_NetCharDevQSetInfo_ndr_print(py_obj, "srvsvc_NetCharDevQSetInfo_out", NDR_OUT);
   34099             : }
   34100             : 
   34101             : static PyMethodDef py_srvsvc_NetCharDevQSetInfo_methods[] = {
   34102             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevQSetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   34103             :                 "srvsvc.NetCharDevQSetInfo.opnum() -> 5 (0x05) " },
   34104             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQSetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   34105             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   34106             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQSetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   34107             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   34108             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQSetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   34109             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   34110             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQSetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   34111             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   34112             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevQSetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   34113             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevQSetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   34114             :         { NULL, NULL, 0, NULL }
   34115             : };
   34116             : 
   34117             : 
   34118             : static PyTypeObject srvsvc_NetCharDevQSetInfo_Type = {
   34119             :         PyVarObject_HEAD_INIT(NULL, 0)
   34120             :         .tp_name = "srvsvc.NetCharDevQSetInfo",
   34121             :         .tp_getset = py_srvsvc_NetCharDevQSetInfo_getsetters,
   34122             :         .tp_methods = py_srvsvc_NetCharDevQSetInfo_methods,
   34123             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   34124             :         .tp_new = py_srvsvc_NetCharDevQSetInfo_new,
   34125             : };
   34126             : 
   34127           0 : static bool pack_py_srvsvc_NetCharDevQSetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQSetInfo *r)
   34128             : {
   34129           0 :         PyObject *py_server_unc;
   34130           0 :         PyObject *py_queue_name;
   34131           0 :         PyObject *py_level;
   34132           0 :         PyObject *py_info;
   34133           0 :         PyObject *py_parm_error;
   34134           0 :         const char *kwnames[] = {
   34135             :                 "server_unc", "queue_name", "level", "info", "parm_error", NULL
   34136             :         };
   34137             : 
   34138           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)) {
   34139           0 :                 return false;
   34140             :         }
   34141             : 
   34142           0 :         if (py_server_unc == NULL) {
   34143           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   34144           0 :                 return false;
   34145             :         }
   34146           0 :         if (py_server_unc == Py_None) {
   34147           0 :                 r->in.server_unc = NULL;
   34148             :         } else {
   34149           0 :                 r->in.server_unc = NULL;
   34150             :                 {
   34151           0 :                         const char *test_str;
   34152           0 :                         const char *talloc_str;
   34153           0 :                         PyObject *unicode = NULL;
   34154           0 :                         if (PyUnicode_Check(py_server_unc)) {
   34155           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   34156           0 :                                 if (unicode == NULL) {
   34157           0 :                                         return false;
   34158             :                                 }
   34159           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   34160           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   34161           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   34162             :                         } else {
   34163           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   34164           0 :                                 return false;
   34165             :                         }
   34166           0 :                         talloc_str = talloc_strdup(r, test_str);
   34167           0 :                         if (unicode != NULL) {
   34168           0 :                                 Py_DECREF(unicode);
   34169             :                         }
   34170           0 :                         if (talloc_str == NULL) {
   34171           0 :                                 PyErr_NoMemory();
   34172           0 :                                 return false;
   34173             :                         }
   34174           0 :                         r->in.server_unc = talloc_str;
   34175             :                 }
   34176             :         }
   34177           0 :         if (py_queue_name == NULL) {
   34178           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.queue_name");
   34179           0 :                 return false;
   34180             :         }
   34181             :         {
   34182           0 :                 const char *test_str;
   34183           0 :                 const char *talloc_str;
   34184           0 :                 PyObject *unicode = NULL;
   34185           0 :                 if (PyUnicode_Check(py_queue_name)) {
   34186           0 :                         unicode = PyUnicode_AsEncodedString(py_queue_name, "utf-8", "ignore");
   34187           0 :                         if (unicode == NULL) {
   34188           0 :                                 return false;
   34189             :                         }
   34190           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34191           0 :                 } else if (PyBytes_Check(py_queue_name)) {
   34192           0 :                         test_str = PyBytes_AS_STRING(py_queue_name);
   34193             :                 } else {
   34194           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
   34195           0 :                         return false;
   34196             :                 }
   34197           0 :                 talloc_str = talloc_strdup(r, test_str);
   34198           0 :                 if (unicode != NULL) {
   34199           0 :                         Py_DECREF(unicode);
   34200             :                 }
   34201           0 :                 if (talloc_str == NULL) {
   34202           0 :                         PyErr_NoMemory();
   34203           0 :                         return false;
   34204             :                 }
   34205           0 :                 r->in.queue_name = talloc_str;
   34206             :         }
   34207           0 :         if (py_level == NULL) {
   34208           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   34209           0 :                 return false;
   34210             :         }
   34211             :         {
   34212           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   34213           0 :                 if (PyLong_Check(py_level)) {
   34214           0 :                         unsigned long long test_var;
   34215           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   34216           0 :                         if (PyErr_Occurred() != NULL) {
   34217           0 :                                 return false;
   34218             :                         }
   34219           0 :                         if (test_var > uint_max) {
   34220           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34221             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34222           0 :                                 return false;
   34223             :                         }
   34224           0 :                         r->in.level = test_var;
   34225             :                 } else {
   34226           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34227             :                           PyLong_Type.tp_name);
   34228           0 :                         return false;
   34229             :                 }
   34230             :         }
   34231           0 :         if (py_info == NULL) {
   34232           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info");
   34233           0 :                 return false;
   34234             :         }
   34235             :         {
   34236           0 :                 union srvsvc_NetCharDevQInfo *info_switch_0;
   34237           0 :                 info_switch_0 = (union srvsvc_NetCharDevQInfo *)pyrpc_export_union(&srvsvc_NetCharDevQInfo_Type, r, r->in.level, py_info, "union srvsvc_NetCharDevQInfo");
   34238           0 :                 if (info_switch_0 == NULL) {
   34239           0 :                         return false;
   34240             :                 }
   34241           0 :                 r->in.info = *info_switch_0;
   34242             :         }
   34243           0 :         if (py_parm_error == NULL) {
   34244           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.parm_error");
   34245           0 :                 return false;
   34246             :         }
   34247           0 :         if (py_parm_error == Py_None) {
   34248           0 :                 r->in.parm_error = NULL;
   34249             :         } else {
   34250           0 :                 r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
   34251           0 :                 if (r->in.parm_error == NULL) {
   34252           0 :                         PyErr_NoMemory();
   34253           0 :                         return false;
   34254             :                 }
   34255             :                 {
   34256           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
   34257           0 :                         if (PyLong_Check(py_parm_error)) {
   34258           0 :                                 unsigned long long test_var;
   34259           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_parm_error);
   34260           0 :                                 if (PyErr_Occurred() != NULL) {
   34261           0 :                                         return false;
   34262             :                                 }
   34263           0 :                                 if (test_var > uint_max) {
   34264           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34265             :                                           PyLong_Type.tp_name, uint_max, test_var);
   34266           0 :                                         return false;
   34267             :                                 }
   34268           0 :                                 *r->in.parm_error = test_var;
   34269             :                         } else {
   34270           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   34271             :                                   PyLong_Type.tp_name);
   34272           0 :                                 return false;
   34273             :                         }
   34274             :                 }
   34275             :         }
   34276           0 :         return true;
   34277             : }
   34278             : 
   34279           0 : static PyObject *unpack_py_srvsvc_NetCharDevQSetInfo_args_out(struct srvsvc_NetCharDevQSetInfo *r)
   34280             : {
   34281           0 :         PyObject *result;
   34282           0 :         PyObject *py_parm_error;
   34283           0 :         if (r->out.parm_error == NULL) {
   34284           0 :                 py_parm_error = Py_None;
   34285           0 :                 Py_INCREF(py_parm_error);
   34286             :         } else {
   34287           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.parm_error));
   34288             :         }
   34289           0 :         result = py_parm_error;
   34290           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   34291           0 :                 PyErr_SetWERROR(r->out.result);
   34292           0 :                 return NULL;
   34293             :         }
   34294             : 
   34295           0 :         return result;
   34296             : }
   34297             : 
   34298             : 
   34299           0 : static PyObject *py_srvsvc_NetCharDevQPurge_in_get_server_unc(PyObject *obj, void *closure)
   34300             : {
   34301           0 :         struct srvsvc_NetCharDevQPurge *object = pytalloc_get_ptr(obj);
   34302           0 :         PyObject *py_server_unc;
   34303           0 :         if (object->in.server_unc == NULL) {
   34304           0 :                 Py_RETURN_NONE;
   34305             :         }
   34306           0 :         if (object->in.server_unc == NULL) {
   34307           0 :                 py_server_unc = Py_None;
   34308           0 :                 Py_INCREF(py_server_unc);
   34309             :         } else {
   34310           0 :                 if (object->in.server_unc == NULL) {
   34311           0 :                         py_server_unc = Py_None;
   34312           0 :                         Py_INCREF(py_server_unc);
   34313             :                 } else {
   34314           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   34315             :                 }
   34316             :         }
   34317           0 :         return py_server_unc;
   34318             : }
   34319             : 
   34320           0 : static int py_srvsvc_NetCharDevQPurge_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   34321             : {
   34322           0 :         struct srvsvc_NetCharDevQPurge *object = pytalloc_get_ptr(py_obj);
   34323           0 :         if (value == NULL) {
   34324           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   34325           0 :                 return -1;
   34326             :         }
   34327           0 :         if (value == Py_None) {
   34328           0 :                 object->in.server_unc = NULL;
   34329             :         } else {
   34330           0 :                 object->in.server_unc = NULL;
   34331             :                 {
   34332           0 :                         const char *test_str;
   34333           0 :                         const char *talloc_str;
   34334           0 :                         PyObject *unicode = NULL;
   34335           0 :                         if (PyUnicode_Check(value)) {
   34336           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   34337           0 :                                 if (unicode == NULL) {
   34338           0 :                                         return -1;
   34339             :                                 }
   34340           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   34341           0 :                         } else if (PyBytes_Check(value)) {
   34342           0 :                                 test_str = PyBytes_AS_STRING(value);
   34343             :                         } else {
   34344           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   34345           0 :                                 return -1;
   34346             :                         }
   34347           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   34348           0 :                         if (unicode != NULL) {
   34349           0 :                                 Py_DECREF(unicode);
   34350             :                         }
   34351           0 :                         if (talloc_str == NULL) {
   34352           0 :                                 PyErr_NoMemory();
   34353           0 :                                 return -1;
   34354             :                         }
   34355           0 :                         object->in.server_unc = talloc_str;
   34356             :                 }
   34357             :         }
   34358           0 :         return 0;
   34359             : }
   34360             : 
   34361           0 : static PyObject *py_srvsvc_NetCharDevQPurge_in_get_queue_name(PyObject *obj, void *closure)
   34362             : {
   34363           0 :         struct srvsvc_NetCharDevQPurge *object = pytalloc_get_ptr(obj);
   34364           0 :         PyObject *py_queue_name;
   34365           0 :         if (object->in.queue_name == NULL) {
   34366           0 :                 py_queue_name = Py_None;
   34367           0 :                 Py_INCREF(py_queue_name);
   34368             :         } else {
   34369           0 :                 py_queue_name = PyUnicode_Decode(object->in.queue_name, strlen(object->in.queue_name), "utf-8", "ignore");
   34370             :         }
   34371           0 :         return py_queue_name;
   34372             : }
   34373             : 
   34374           0 : static int py_srvsvc_NetCharDevQPurge_in_set_queue_name(PyObject *py_obj, PyObject *value, void *closure)
   34375             : {
   34376           0 :         struct srvsvc_NetCharDevQPurge *object = pytalloc_get_ptr(py_obj);
   34377           0 :         if (value == NULL) {
   34378           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.queue_name");
   34379           0 :                 return -1;
   34380             :         }
   34381             :         {
   34382           0 :                 const char *test_str;
   34383           0 :                 const char *talloc_str;
   34384           0 :                 PyObject *unicode = NULL;
   34385           0 :                 if (PyUnicode_Check(value)) {
   34386           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   34387           0 :                         if (unicode == NULL) {
   34388           0 :                                 return -1;
   34389             :                         }
   34390           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34391           0 :                 } else if (PyBytes_Check(value)) {
   34392           0 :                         test_str = PyBytes_AS_STRING(value);
   34393             :                 } else {
   34394           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   34395           0 :                         return -1;
   34396             :                 }
   34397           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   34398           0 :                 if (unicode != NULL) {
   34399           0 :                         Py_DECREF(unicode);
   34400             :                 }
   34401           0 :                 if (talloc_str == NULL) {
   34402           0 :                         PyErr_NoMemory();
   34403           0 :                         return -1;
   34404             :                 }
   34405           0 :                 object->in.queue_name = talloc_str;
   34406             :         }
   34407           0 :         return 0;
   34408             : }
   34409             : 
   34410           0 : static PyObject *py_srvsvc_NetCharDevQPurge_get_result(PyObject *obj, void *closure)
   34411             : {
   34412           0 :         struct srvsvc_NetCharDevQPurge *object = pytalloc_get_ptr(obj);
   34413           0 :         PyObject *py_result;
   34414           0 :         py_result = PyErr_FromWERROR(object->out.result);
   34415           0 :         return py_result;
   34416             : }
   34417             : 
   34418           0 : static int py_srvsvc_NetCharDevQPurge_set_result(PyObject *py_obj, PyObject *value, void *closure)
   34419             : {
   34420           0 :         struct srvsvc_NetCharDevQPurge *object = pytalloc_get_ptr(py_obj);
   34421           0 :         if (value == NULL) {
   34422           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   34423           0 :                 return -1;
   34424             :         }
   34425           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   34426           0 :         return 0;
   34427             : }
   34428             : 
   34429             : static PyGetSetDef py_srvsvc_NetCharDevQPurge_getsetters[] = {
   34430             :         {
   34431             :                 .name = discard_const_p(char, "in_server_unc"),
   34432             :                 .get = py_srvsvc_NetCharDevQPurge_in_get_server_unc,
   34433             :                 .set = py_srvsvc_NetCharDevQPurge_in_set_server_unc,
   34434             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   34435             :         },
   34436             :         {
   34437             :                 .name = discard_const_p(char, "in_queue_name"),
   34438             :                 .get = py_srvsvc_NetCharDevQPurge_in_get_queue_name,
   34439             :                 .set = py_srvsvc_NetCharDevQPurge_in_set_queue_name,
   34440             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   34441             :         },
   34442             :         {
   34443             :                 .name = discard_const_p(char, "result"),
   34444             :                 .get = py_srvsvc_NetCharDevQPurge_get_result,
   34445             :                 .set = py_srvsvc_NetCharDevQPurge_set_result,
   34446             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   34447             :         },
   34448             :         { .name = NULL }
   34449             : };
   34450             : 
   34451           0 : static PyObject *py_srvsvc_NetCharDevQPurge_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   34452             : {
   34453           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevQPurge, type);
   34454           0 :         return self;
   34455             : }
   34456             : 
   34457           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   34458             : {
   34459             : 
   34460             : 
   34461           0 :         return PyLong_FromLong(6);
   34462             : }
   34463             : 
   34464           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   34465             : {
   34466           0 :         const struct ndr_interface_call *call = NULL;
   34467           0 :         struct srvsvc_NetCharDevQPurge *object = pytalloc_get_ptr(py_obj);
   34468           0 :         PyObject *ret = NULL;
   34469           0 :         struct ndr_push *push = NULL;
   34470           0 :         DATA_BLOB blob;
   34471           0 :         enum ndr_err_code err;
   34472             : 
   34473           0 :         if (ndr_table_srvsvc.num_calls < 7) {
   34474           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQPurge_ndr_pack");
   34475           0 :                 return NULL;
   34476             :         }
   34477           0 :         call = &ndr_table_srvsvc.calls[6];
   34478             : 
   34479           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   34480           0 :         if (push == NULL) {
   34481           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34482           0 :                 return NULL;
   34483             :         }
   34484             : 
   34485           0 :         push->flags |= ndr_push_flags;
   34486             : 
   34487           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   34488           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34489           0 :                 TALLOC_FREE(push);
   34490           0 :                 PyErr_SetNdrError(err);
   34491           0 :                 return NULL;
   34492             :         }
   34493           0 :         blob = ndr_push_blob(push);
   34494           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   34495           0 :         TALLOC_FREE(push);
   34496           0 :         return ret;
   34497             : }
   34498             : 
   34499           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34500             : {
   34501           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34502           0 :         PyObject *bigendian_obj = NULL;
   34503           0 :         PyObject *ndr64_obj = NULL;
   34504           0 :         libndr_flags ndr_push_flags = 0;
   34505             : 
   34506           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   34507             :                 discard_const_p(char *, kwnames),
   34508             :                 &bigendian_obj,
   34509             :                 &ndr64_obj)) {
   34510           0 :                 return NULL;
   34511             :         }
   34512             : 
   34513           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34514           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34515             :         }
   34516           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34517           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34518             :         }
   34519             : 
   34520           0 :         return py_srvsvc_NetCharDevQPurge_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   34521             : }
   34522             : 
   34523           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34524             : {
   34525           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34526           0 :         PyObject *bigendian_obj = NULL;
   34527           0 :         PyObject *ndr64_obj = NULL;
   34528           0 :         libndr_flags ndr_push_flags = 0;
   34529             : 
   34530           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   34531             :                 discard_const_p(char *, kwnames),
   34532             :                 &bigendian_obj,
   34533             :                 &ndr64_obj)) {
   34534           0 :                 return NULL;
   34535             :         }
   34536             : 
   34537           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34538           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34539             :         }
   34540           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34541           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34542             :         }
   34543             : 
   34544           0 :         return py_srvsvc_NetCharDevQPurge_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   34545             : }
   34546             : 
   34547           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   34548             : {
   34549           0 :         const struct ndr_interface_call *call = NULL;
   34550           0 :         struct srvsvc_NetCharDevQPurge *object = pytalloc_get_ptr(py_obj);
   34551           0 :         struct ndr_pull *pull = NULL;
   34552           0 :         enum ndr_err_code err;
   34553             : 
   34554           0 :         if (ndr_table_srvsvc.num_calls < 7) {
   34555           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQPurge_ndr_unpack");
   34556           0 :                 return NULL;
   34557             :         }
   34558           0 :         call = &ndr_table_srvsvc.calls[6];
   34559             : 
   34560           0 :         pull = ndr_pull_init_blob(blob, object);
   34561           0 :         if (pull == NULL) {
   34562           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34563           0 :                 return NULL;
   34564             :         }
   34565             : 
   34566           0 :         pull->flags |= ndr_pull_flags;
   34567             : 
   34568           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   34569           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34570           0 :                 TALLOC_FREE(pull);
   34571           0 :                 PyErr_SetNdrError(err);
   34572           0 :                 return NULL;
   34573             :         }
   34574           0 :         if (!allow_remaining) {
   34575           0 :                 uint32_t highest_ofs;
   34576             : 
   34577           0 :                 if (pull->offset > pull->relative_highest_offset) {
   34578           0 :                         highest_ofs = pull->offset;
   34579             :                 } else {
   34580           0 :                         highest_ofs = pull->relative_highest_offset;
   34581             :                 }
   34582           0 :                 if (highest_ofs < pull->data_size) {
   34583           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   34584             :                                 "not all bytes consumed ofs[%u] size[%u]",
   34585             :                                 highest_ofs, pull->data_size);
   34586           0 :                         TALLOC_FREE(pull);
   34587           0 :                         PyErr_SetNdrError(err);
   34588           0 :                         return NULL;
   34589             :                 }
   34590             :         }
   34591             : 
   34592           0 :         TALLOC_FREE(pull);
   34593           0 :         Py_RETURN_NONE;
   34594             : }
   34595             : 
   34596           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34597             : {
   34598           0 :         DATA_BLOB blob;
   34599           0 :         Py_ssize_t blob_length = 0;
   34600           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34601           0 :         PyObject *bigendian_obj = NULL;
   34602           0 :         PyObject *ndr64_obj = NULL;
   34603           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34604           0 :         PyObject *allow_remaining_obj = NULL;
   34605           0 :         bool allow_remaining = false;
   34606             : 
   34607           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   34608             :                 discard_const_p(char *, kwnames),
   34609             :                 &blob.data, &blob_length,
   34610             :                 &bigendian_obj,
   34611             :                 &ndr64_obj,
   34612             :                 &allow_remaining_obj)) {
   34613           0 :                 return NULL;
   34614             :         }
   34615           0 :         blob.length = blob_length;
   34616             : 
   34617           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34618           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34619             :         }
   34620           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34621           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34622             :         }
   34623             : 
   34624           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34625           0 :                 allow_remaining = true;
   34626             :         }
   34627             : 
   34628           0 :         return py_srvsvc_NetCharDevQPurge_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   34629             : }
   34630             : 
   34631           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34632             : {
   34633           0 :         DATA_BLOB blob;
   34634           0 :         Py_ssize_t blob_length = 0;
   34635           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34636           0 :         PyObject *bigendian_obj = NULL;
   34637           0 :         PyObject *ndr64_obj = NULL;
   34638           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34639           0 :         PyObject *allow_remaining_obj = NULL;
   34640           0 :         bool allow_remaining = false;
   34641             : 
   34642           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   34643             :                 discard_const_p(char *, kwnames),
   34644             :                 &blob.data, &blob_length,
   34645             :                 &bigendian_obj,
   34646             :                 &ndr64_obj,
   34647             :                 &allow_remaining_obj)) {
   34648           0 :                 return NULL;
   34649             :         }
   34650           0 :         blob.length = blob_length;
   34651             : 
   34652           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34653           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34654             :         }
   34655           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34656           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34657             :         }
   34658             : 
   34659           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34660           0 :                 allow_remaining = true;
   34661             :         }
   34662             : 
   34663           0 :         return py_srvsvc_NetCharDevQPurge_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   34664             : }
   34665             : 
   34666           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   34667             : {
   34668           0 :         const struct ndr_interface_call *call = NULL;
   34669           0 :         struct srvsvc_NetCharDevQPurge *object = pytalloc_get_ptr(py_obj);
   34670           0 :         PyObject *ret;
   34671           0 :         char *retstr;
   34672             : 
   34673           0 :         if (ndr_table_srvsvc.num_calls < 7) {
   34674           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQPurge_ndr_print");
   34675           0 :                 return NULL;
   34676             :         }
   34677           0 :         call = &ndr_table_srvsvc.calls[6];
   34678             : 
   34679           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   34680           0 :         ret = PyUnicode_FromString(retstr);
   34681           0 :         TALLOC_FREE(retstr);
   34682             : 
   34683           0 :         return ret;
   34684             : }
   34685             : 
   34686           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34687             : {
   34688           0 :         return py_srvsvc_NetCharDevQPurge_ndr_print(py_obj, "srvsvc_NetCharDevQPurge_in", NDR_IN);
   34689             : }
   34690             : 
   34691           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34692             : {
   34693           0 :         return py_srvsvc_NetCharDevQPurge_ndr_print(py_obj, "srvsvc_NetCharDevQPurge_out", NDR_OUT);
   34694             : }
   34695             : 
   34696             : static PyMethodDef py_srvsvc_NetCharDevQPurge_methods[] = {
   34697             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevQPurge_ndr_opnum, METH_NOARGS|METH_CLASS,
   34698             :                 "srvsvc.NetCharDevQPurge.opnum() -> 6 (0x06) " },
   34699             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurge_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   34700             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   34701             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurge_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   34702             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   34703             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurge_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   34704             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   34705             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurge_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   34706             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   34707             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevQPurge_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   34708             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevQPurge_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   34709             :         { NULL, NULL, 0, NULL }
   34710             : };
   34711             : 
   34712             : 
   34713             : static PyTypeObject srvsvc_NetCharDevQPurge_Type = {
   34714             :         PyVarObject_HEAD_INIT(NULL, 0)
   34715             :         .tp_name = "srvsvc.NetCharDevQPurge",
   34716             :         .tp_getset = py_srvsvc_NetCharDevQPurge_getsetters,
   34717             :         .tp_methods = py_srvsvc_NetCharDevQPurge_methods,
   34718             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   34719             :         .tp_new = py_srvsvc_NetCharDevQPurge_new,
   34720             : };
   34721             : 
   34722           0 : static bool pack_py_srvsvc_NetCharDevQPurge_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQPurge *r)
   34723             : {
   34724           0 :         PyObject *py_server_unc;
   34725           0 :         PyObject *py_queue_name;
   34726           0 :         const char *kwnames[] = {
   34727             :                 "server_unc", "queue_name", NULL
   34728             :         };
   34729             : 
   34730           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:srvsvc_NetCharDevQPurge", discard_const_p(char *, kwnames), &py_server_unc, &py_queue_name)) {
   34731           0 :                 return false;
   34732             :         }
   34733             : 
   34734           0 :         if (py_server_unc == NULL) {
   34735           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   34736           0 :                 return false;
   34737             :         }
   34738           0 :         if (py_server_unc == Py_None) {
   34739           0 :                 r->in.server_unc = NULL;
   34740             :         } else {
   34741           0 :                 r->in.server_unc = NULL;
   34742             :                 {
   34743           0 :                         const char *test_str;
   34744           0 :                         const char *talloc_str;
   34745           0 :                         PyObject *unicode = NULL;
   34746           0 :                         if (PyUnicode_Check(py_server_unc)) {
   34747           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   34748           0 :                                 if (unicode == NULL) {
   34749           0 :                                         return false;
   34750             :                                 }
   34751           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   34752           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   34753           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   34754             :                         } else {
   34755           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   34756           0 :                                 return false;
   34757             :                         }
   34758           0 :                         talloc_str = talloc_strdup(r, test_str);
   34759           0 :                         if (unicode != NULL) {
   34760           0 :                                 Py_DECREF(unicode);
   34761             :                         }
   34762           0 :                         if (talloc_str == NULL) {
   34763           0 :                                 PyErr_NoMemory();
   34764           0 :                                 return false;
   34765             :                         }
   34766           0 :                         r->in.server_unc = talloc_str;
   34767             :                 }
   34768             :         }
   34769           0 :         if (py_queue_name == NULL) {
   34770           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.queue_name");
   34771           0 :                 return false;
   34772             :         }
   34773             :         {
   34774           0 :                 const char *test_str;
   34775           0 :                 const char *talloc_str;
   34776           0 :                 PyObject *unicode = NULL;
   34777           0 :                 if (PyUnicode_Check(py_queue_name)) {
   34778           0 :                         unicode = PyUnicode_AsEncodedString(py_queue_name, "utf-8", "ignore");
   34779           0 :                         if (unicode == NULL) {
   34780           0 :                                 return false;
   34781             :                         }
   34782           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34783           0 :                 } else if (PyBytes_Check(py_queue_name)) {
   34784           0 :                         test_str = PyBytes_AS_STRING(py_queue_name);
   34785             :                 } else {
   34786           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
   34787           0 :                         return false;
   34788             :                 }
   34789           0 :                 talloc_str = talloc_strdup(r, test_str);
   34790           0 :                 if (unicode != NULL) {
   34791           0 :                         Py_DECREF(unicode);
   34792             :                 }
   34793           0 :                 if (talloc_str == NULL) {
   34794           0 :                         PyErr_NoMemory();
   34795           0 :                         return false;
   34796             :                 }
   34797           0 :                 r->in.queue_name = talloc_str;
   34798             :         }
   34799           0 :         return true;
   34800             : }
   34801             : 
   34802           0 : static PyObject *unpack_py_srvsvc_NetCharDevQPurge_args_out(struct srvsvc_NetCharDevQPurge *r)
   34803             : {
   34804           0 :         PyObject *result;
   34805           0 :         result = Py_None;
   34806           0 :         Py_INCREF(result);
   34807           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   34808           0 :                 PyErr_SetWERROR(r->out.result);
   34809           0 :                 return NULL;
   34810             :         }
   34811             : 
   34812           0 :         return result;
   34813             : }
   34814             : 
   34815             : 
   34816           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_in_get_server_unc(PyObject *obj, void *closure)
   34817             : {
   34818           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = pytalloc_get_ptr(obj);
   34819           0 :         PyObject *py_server_unc;
   34820           0 :         if (object->in.server_unc == NULL) {
   34821           0 :                 Py_RETURN_NONE;
   34822             :         }
   34823           0 :         if (object->in.server_unc == NULL) {
   34824           0 :                 py_server_unc = Py_None;
   34825           0 :                 Py_INCREF(py_server_unc);
   34826             :         } else {
   34827           0 :                 if (object->in.server_unc == NULL) {
   34828           0 :                         py_server_unc = Py_None;
   34829           0 :                         Py_INCREF(py_server_unc);
   34830             :                 } else {
   34831           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   34832             :                 }
   34833             :         }
   34834           0 :         return py_server_unc;
   34835             : }
   34836             : 
   34837           0 : static int py_srvsvc_NetCharDevQPurgeSelf_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   34838             : {
   34839           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = pytalloc_get_ptr(py_obj);
   34840           0 :         if (value == NULL) {
   34841           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   34842           0 :                 return -1;
   34843             :         }
   34844           0 :         if (value == Py_None) {
   34845           0 :                 object->in.server_unc = NULL;
   34846             :         } else {
   34847           0 :                 object->in.server_unc = NULL;
   34848             :                 {
   34849           0 :                         const char *test_str;
   34850           0 :                         const char *talloc_str;
   34851           0 :                         PyObject *unicode = NULL;
   34852           0 :                         if (PyUnicode_Check(value)) {
   34853           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   34854           0 :                                 if (unicode == NULL) {
   34855           0 :                                         return -1;
   34856             :                                 }
   34857           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   34858           0 :                         } else if (PyBytes_Check(value)) {
   34859           0 :                                 test_str = PyBytes_AS_STRING(value);
   34860             :                         } else {
   34861           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   34862           0 :                                 return -1;
   34863             :                         }
   34864           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   34865           0 :                         if (unicode != NULL) {
   34866           0 :                                 Py_DECREF(unicode);
   34867             :                         }
   34868           0 :                         if (talloc_str == NULL) {
   34869           0 :                                 PyErr_NoMemory();
   34870           0 :                                 return -1;
   34871             :                         }
   34872           0 :                         object->in.server_unc = talloc_str;
   34873             :                 }
   34874             :         }
   34875           0 :         return 0;
   34876             : }
   34877             : 
   34878           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_in_get_queue_name(PyObject *obj, void *closure)
   34879             : {
   34880           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = pytalloc_get_ptr(obj);
   34881           0 :         PyObject *py_queue_name;
   34882           0 :         if (object->in.queue_name == NULL) {
   34883           0 :                 py_queue_name = Py_None;
   34884           0 :                 Py_INCREF(py_queue_name);
   34885             :         } else {
   34886           0 :                 py_queue_name = PyUnicode_Decode(object->in.queue_name, strlen(object->in.queue_name), "utf-8", "ignore");
   34887             :         }
   34888           0 :         return py_queue_name;
   34889             : }
   34890             : 
   34891           0 : static int py_srvsvc_NetCharDevQPurgeSelf_in_set_queue_name(PyObject *py_obj, PyObject *value, void *closure)
   34892             : {
   34893           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = pytalloc_get_ptr(py_obj);
   34894           0 :         if (value == NULL) {
   34895           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.queue_name");
   34896           0 :                 return -1;
   34897             :         }
   34898             :         {
   34899           0 :                 const char *test_str;
   34900           0 :                 const char *talloc_str;
   34901           0 :                 PyObject *unicode = NULL;
   34902           0 :                 if (PyUnicode_Check(value)) {
   34903           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   34904           0 :                         if (unicode == NULL) {
   34905           0 :                                 return -1;
   34906             :                         }
   34907           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34908           0 :                 } else if (PyBytes_Check(value)) {
   34909           0 :                         test_str = PyBytes_AS_STRING(value);
   34910             :                 } else {
   34911           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   34912           0 :                         return -1;
   34913             :                 }
   34914           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   34915           0 :                 if (unicode != NULL) {
   34916           0 :                         Py_DECREF(unicode);
   34917             :                 }
   34918           0 :                 if (talloc_str == NULL) {
   34919           0 :                         PyErr_NoMemory();
   34920           0 :                         return -1;
   34921             :                 }
   34922           0 :                 object->in.queue_name = talloc_str;
   34923             :         }
   34924           0 :         return 0;
   34925             : }
   34926             : 
   34927           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_in_get_computer_name(PyObject *obj, void *closure)
   34928             : {
   34929           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = pytalloc_get_ptr(obj);
   34930           0 :         PyObject *py_computer_name;
   34931           0 :         if (object->in.computer_name == NULL) {
   34932           0 :                 py_computer_name = Py_None;
   34933           0 :                 Py_INCREF(py_computer_name);
   34934             :         } else {
   34935           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   34936             :         }
   34937           0 :         return py_computer_name;
   34938             : }
   34939             : 
   34940           0 : static int py_srvsvc_NetCharDevQPurgeSelf_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   34941             : {
   34942           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = pytalloc_get_ptr(py_obj);
   34943           0 :         if (value == NULL) {
   34944           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
   34945           0 :                 return -1;
   34946             :         }
   34947             :         {
   34948           0 :                 const char *test_str;
   34949           0 :                 const char *talloc_str;
   34950           0 :                 PyObject *unicode = NULL;
   34951           0 :                 if (PyUnicode_Check(value)) {
   34952           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   34953           0 :                         if (unicode == NULL) {
   34954           0 :                                 return -1;
   34955             :                         }
   34956           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34957           0 :                 } else if (PyBytes_Check(value)) {
   34958           0 :                         test_str = PyBytes_AS_STRING(value);
   34959             :                 } else {
   34960           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   34961           0 :                         return -1;
   34962             :                 }
   34963           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   34964           0 :                 if (unicode != NULL) {
   34965           0 :                         Py_DECREF(unicode);
   34966             :                 }
   34967           0 :                 if (talloc_str == NULL) {
   34968           0 :                         PyErr_NoMemory();
   34969           0 :                         return -1;
   34970             :                 }
   34971           0 :                 object->in.computer_name = talloc_str;
   34972             :         }
   34973           0 :         return 0;
   34974             : }
   34975             : 
   34976           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_get_result(PyObject *obj, void *closure)
   34977             : {
   34978           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = pytalloc_get_ptr(obj);
   34979           0 :         PyObject *py_result;
   34980           0 :         py_result = PyErr_FromWERROR(object->out.result);
   34981           0 :         return py_result;
   34982             : }
   34983             : 
   34984           0 : static int py_srvsvc_NetCharDevQPurgeSelf_set_result(PyObject *py_obj, PyObject *value, void *closure)
   34985             : {
   34986           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = pytalloc_get_ptr(py_obj);
   34987           0 :         if (value == NULL) {
   34988           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   34989           0 :                 return -1;
   34990             :         }
   34991           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   34992           0 :         return 0;
   34993             : }
   34994             : 
   34995             : static PyGetSetDef py_srvsvc_NetCharDevQPurgeSelf_getsetters[] = {
   34996             :         {
   34997             :                 .name = discard_const_p(char, "in_server_unc"),
   34998             :                 .get = py_srvsvc_NetCharDevQPurgeSelf_in_get_server_unc,
   34999             :                 .set = py_srvsvc_NetCharDevQPurgeSelf_in_set_server_unc,
   35000             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35001             :         },
   35002             :         {
   35003             :                 .name = discard_const_p(char, "in_queue_name"),
   35004             :                 .get = py_srvsvc_NetCharDevQPurgeSelf_in_get_queue_name,
   35005             :                 .set = py_srvsvc_NetCharDevQPurgeSelf_in_set_queue_name,
   35006             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35007             :         },
   35008             :         {
   35009             :                 .name = discard_const_p(char, "in_computer_name"),
   35010             :                 .get = py_srvsvc_NetCharDevQPurgeSelf_in_get_computer_name,
   35011             :                 .set = py_srvsvc_NetCharDevQPurgeSelf_in_set_computer_name,
   35012             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35013             :         },
   35014             :         {
   35015             :                 .name = discard_const_p(char, "result"),
   35016             :                 .get = py_srvsvc_NetCharDevQPurgeSelf_get_result,
   35017             :                 .set = py_srvsvc_NetCharDevQPurgeSelf_set_result,
   35018             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   35019             :         },
   35020             :         { .name = NULL }
   35021             : };
   35022             : 
   35023           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   35024             : {
   35025           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevQPurgeSelf, type);
   35026           0 :         return self;
   35027             : }
   35028             : 
   35029           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   35030             : {
   35031             : 
   35032             : 
   35033           0 :         return PyLong_FromLong(7);
   35034             : }
   35035             : 
   35036           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   35037             : {
   35038           0 :         const struct ndr_interface_call *call = NULL;
   35039           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = pytalloc_get_ptr(py_obj);
   35040           0 :         PyObject *ret = NULL;
   35041           0 :         struct ndr_push *push = NULL;
   35042           0 :         DATA_BLOB blob;
   35043           0 :         enum ndr_err_code err;
   35044             : 
   35045           0 :         if (ndr_table_srvsvc.num_calls < 8) {
   35046           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQPurgeSelf_ndr_pack");
   35047           0 :                 return NULL;
   35048             :         }
   35049           0 :         call = &ndr_table_srvsvc.calls[7];
   35050             : 
   35051           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   35052           0 :         if (push == NULL) {
   35053           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35054           0 :                 return NULL;
   35055             :         }
   35056             : 
   35057           0 :         push->flags |= ndr_push_flags;
   35058             : 
   35059           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   35060           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35061           0 :                 TALLOC_FREE(push);
   35062           0 :                 PyErr_SetNdrError(err);
   35063           0 :                 return NULL;
   35064             :         }
   35065           0 :         blob = ndr_push_blob(push);
   35066           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   35067           0 :         TALLOC_FREE(push);
   35068           0 :         return ret;
   35069             : }
   35070             : 
   35071           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35072             : {
   35073           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35074           0 :         PyObject *bigendian_obj = NULL;
   35075           0 :         PyObject *ndr64_obj = NULL;
   35076           0 :         libndr_flags ndr_push_flags = 0;
   35077             : 
   35078           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   35079             :                 discard_const_p(char *, kwnames),
   35080             :                 &bigendian_obj,
   35081             :                 &ndr64_obj)) {
   35082           0 :                 return NULL;
   35083             :         }
   35084             : 
   35085           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35086           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35087             :         }
   35088           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35089           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35090             :         }
   35091             : 
   35092           0 :         return py_srvsvc_NetCharDevQPurgeSelf_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   35093             : }
   35094             : 
   35095           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35096             : {
   35097           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35098           0 :         PyObject *bigendian_obj = NULL;
   35099           0 :         PyObject *ndr64_obj = NULL;
   35100           0 :         libndr_flags ndr_push_flags = 0;
   35101             : 
   35102           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   35103             :                 discard_const_p(char *, kwnames),
   35104             :                 &bigendian_obj,
   35105             :                 &ndr64_obj)) {
   35106           0 :                 return NULL;
   35107             :         }
   35108             : 
   35109           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35110           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35111             :         }
   35112           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35113           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35114             :         }
   35115             : 
   35116           0 :         return py_srvsvc_NetCharDevQPurgeSelf_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   35117             : }
   35118             : 
   35119           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   35120             : {
   35121           0 :         const struct ndr_interface_call *call = NULL;
   35122           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = pytalloc_get_ptr(py_obj);
   35123           0 :         struct ndr_pull *pull = NULL;
   35124           0 :         enum ndr_err_code err;
   35125             : 
   35126           0 :         if (ndr_table_srvsvc.num_calls < 8) {
   35127           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack");
   35128           0 :                 return NULL;
   35129             :         }
   35130           0 :         call = &ndr_table_srvsvc.calls[7];
   35131             : 
   35132           0 :         pull = ndr_pull_init_blob(blob, object);
   35133           0 :         if (pull == NULL) {
   35134           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35135           0 :                 return NULL;
   35136             :         }
   35137             : 
   35138           0 :         pull->flags |= ndr_pull_flags;
   35139             : 
   35140           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   35141           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35142           0 :                 TALLOC_FREE(pull);
   35143           0 :                 PyErr_SetNdrError(err);
   35144           0 :                 return NULL;
   35145             :         }
   35146           0 :         if (!allow_remaining) {
   35147           0 :                 uint32_t highest_ofs;
   35148             : 
   35149           0 :                 if (pull->offset > pull->relative_highest_offset) {
   35150           0 :                         highest_ofs = pull->offset;
   35151             :                 } else {
   35152           0 :                         highest_ofs = pull->relative_highest_offset;
   35153             :                 }
   35154           0 :                 if (highest_ofs < pull->data_size) {
   35155           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   35156             :                                 "not all bytes consumed ofs[%u] size[%u]",
   35157             :                                 highest_ofs, pull->data_size);
   35158           0 :                         TALLOC_FREE(pull);
   35159           0 :                         PyErr_SetNdrError(err);
   35160           0 :                         return NULL;
   35161             :                 }
   35162             :         }
   35163             : 
   35164           0 :         TALLOC_FREE(pull);
   35165           0 :         Py_RETURN_NONE;
   35166             : }
   35167             : 
   35168           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35169             : {
   35170           0 :         DATA_BLOB blob;
   35171           0 :         Py_ssize_t blob_length = 0;
   35172           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35173           0 :         PyObject *bigendian_obj = NULL;
   35174           0 :         PyObject *ndr64_obj = NULL;
   35175           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35176           0 :         PyObject *allow_remaining_obj = NULL;
   35177           0 :         bool allow_remaining = false;
   35178             : 
   35179           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   35180             :                 discard_const_p(char *, kwnames),
   35181             :                 &blob.data, &blob_length,
   35182             :                 &bigendian_obj,
   35183             :                 &ndr64_obj,
   35184             :                 &allow_remaining_obj)) {
   35185           0 :                 return NULL;
   35186             :         }
   35187           0 :         blob.length = blob_length;
   35188             : 
   35189           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35190           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35191             :         }
   35192           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35193           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35194             :         }
   35195             : 
   35196           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35197           0 :                 allow_remaining = true;
   35198             :         }
   35199             : 
   35200           0 :         return py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   35201             : }
   35202             : 
   35203           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35204             : {
   35205           0 :         DATA_BLOB blob;
   35206           0 :         Py_ssize_t blob_length = 0;
   35207           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35208           0 :         PyObject *bigendian_obj = NULL;
   35209           0 :         PyObject *ndr64_obj = NULL;
   35210           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35211           0 :         PyObject *allow_remaining_obj = NULL;
   35212           0 :         bool allow_remaining = false;
   35213             : 
   35214           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   35215             :                 discard_const_p(char *, kwnames),
   35216             :                 &blob.data, &blob_length,
   35217             :                 &bigendian_obj,
   35218             :                 &ndr64_obj,
   35219             :                 &allow_remaining_obj)) {
   35220           0 :                 return NULL;
   35221             :         }
   35222           0 :         blob.length = blob_length;
   35223             : 
   35224           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35225           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35226             :         }
   35227           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35228           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35229             :         }
   35230             : 
   35231           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35232           0 :                 allow_remaining = true;
   35233             :         }
   35234             : 
   35235           0 :         return py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   35236             : }
   35237             : 
   35238           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   35239             : {
   35240           0 :         const struct ndr_interface_call *call = NULL;
   35241           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = pytalloc_get_ptr(py_obj);
   35242           0 :         PyObject *ret;
   35243           0 :         char *retstr;
   35244             : 
   35245           0 :         if (ndr_table_srvsvc.num_calls < 8) {
   35246           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQPurgeSelf_ndr_print");
   35247           0 :                 return NULL;
   35248             :         }
   35249           0 :         call = &ndr_table_srvsvc.calls[7];
   35250             : 
   35251           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   35252           0 :         ret = PyUnicode_FromString(retstr);
   35253           0 :         TALLOC_FREE(retstr);
   35254             : 
   35255           0 :         return ret;
   35256             : }
   35257             : 
   35258           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35259             : {
   35260           0 :         return py_srvsvc_NetCharDevQPurgeSelf_ndr_print(py_obj, "srvsvc_NetCharDevQPurgeSelf_in", NDR_IN);
   35261             : }
   35262             : 
   35263           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35264             : {
   35265           0 :         return py_srvsvc_NetCharDevQPurgeSelf_ndr_print(py_obj, "srvsvc_NetCharDevQPurgeSelf_out", NDR_OUT);
   35266             : }
   35267             : 
   35268             : static PyMethodDef py_srvsvc_NetCharDevQPurgeSelf_methods[] = {
   35269             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevQPurgeSelf_ndr_opnum, METH_NOARGS|METH_CLASS,
   35270             :                 "srvsvc.NetCharDevQPurgeSelf.opnum() -> 7 (0x07) " },
   35271             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurgeSelf_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   35272             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   35273             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurgeSelf_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   35274             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   35275             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   35276             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   35277             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   35278             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   35279             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevQPurgeSelf_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   35280             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevQPurgeSelf_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   35281             :         { NULL, NULL, 0, NULL }
   35282             : };
   35283             : 
   35284             : 
   35285             : static PyTypeObject srvsvc_NetCharDevQPurgeSelf_Type = {
   35286             :         PyVarObject_HEAD_INIT(NULL, 0)
   35287             :         .tp_name = "srvsvc.NetCharDevQPurgeSelf",
   35288             :         .tp_getset = py_srvsvc_NetCharDevQPurgeSelf_getsetters,
   35289             :         .tp_methods = py_srvsvc_NetCharDevQPurgeSelf_methods,
   35290             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   35291             :         .tp_new = py_srvsvc_NetCharDevQPurgeSelf_new,
   35292             : };
   35293             : 
   35294           0 : static bool pack_py_srvsvc_NetCharDevQPurgeSelf_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQPurgeSelf *r)
   35295             : {
   35296           0 :         PyObject *py_server_unc;
   35297           0 :         PyObject *py_queue_name;
   35298           0 :         PyObject *py_computer_name;
   35299           0 :         const char *kwnames[] = {
   35300             :                 "server_unc", "queue_name", "computer_name", NULL
   35301             :         };
   35302             : 
   35303           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetCharDevQPurgeSelf", discard_const_p(char *, kwnames), &py_server_unc, &py_queue_name, &py_computer_name)) {
   35304           0 :                 return false;
   35305             :         }
   35306             : 
   35307           0 :         if (py_server_unc == NULL) {
   35308           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   35309           0 :                 return false;
   35310             :         }
   35311           0 :         if (py_server_unc == Py_None) {
   35312           0 :                 r->in.server_unc = NULL;
   35313             :         } else {
   35314           0 :                 r->in.server_unc = NULL;
   35315             :                 {
   35316           0 :                         const char *test_str;
   35317           0 :                         const char *talloc_str;
   35318           0 :                         PyObject *unicode = NULL;
   35319           0 :                         if (PyUnicode_Check(py_server_unc)) {
   35320           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   35321           0 :                                 if (unicode == NULL) {
   35322           0 :                                         return false;
   35323             :                                 }
   35324           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   35325           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   35326           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   35327             :                         } else {
   35328           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   35329           0 :                                 return false;
   35330             :                         }
   35331           0 :                         talloc_str = talloc_strdup(r, test_str);
   35332           0 :                         if (unicode != NULL) {
   35333           0 :                                 Py_DECREF(unicode);
   35334             :                         }
   35335           0 :                         if (talloc_str == NULL) {
   35336           0 :                                 PyErr_NoMemory();
   35337           0 :                                 return false;
   35338             :                         }
   35339           0 :                         r->in.server_unc = talloc_str;
   35340             :                 }
   35341             :         }
   35342           0 :         if (py_queue_name == NULL) {
   35343           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.queue_name");
   35344           0 :                 return false;
   35345             :         }
   35346             :         {
   35347           0 :                 const char *test_str;
   35348           0 :                 const char *talloc_str;
   35349           0 :                 PyObject *unicode = NULL;
   35350           0 :                 if (PyUnicode_Check(py_queue_name)) {
   35351           0 :                         unicode = PyUnicode_AsEncodedString(py_queue_name, "utf-8", "ignore");
   35352           0 :                         if (unicode == NULL) {
   35353           0 :                                 return false;
   35354             :                         }
   35355           0 :                         test_str = PyBytes_AS_STRING(unicode);
   35356           0 :                 } else if (PyBytes_Check(py_queue_name)) {
   35357           0 :                         test_str = PyBytes_AS_STRING(py_queue_name);
   35358             :                 } else {
   35359           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
   35360           0 :                         return false;
   35361             :                 }
   35362           0 :                 talloc_str = talloc_strdup(r, test_str);
   35363           0 :                 if (unicode != NULL) {
   35364           0 :                         Py_DECREF(unicode);
   35365             :                 }
   35366           0 :                 if (talloc_str == NULL) {
   35367           0 :                         PyErr_NoMemory();
   35368           0 :                         return false;
   35369             :                 }
   35370           0 :                 r->in.queue_name = talloc_str;
   35371             :         }
   35372           0 :         if (py_computer_name == NULL) {
   35373           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
   35374           0 :                 return false;
   35375             :         }
   35376             :         {
   35377           0 :                 const char *test_str;
   35378           0 :                 const char *talloc_str;
   35379           0 :                 PyObject *unicode = NULL;
   35380           0 :                 if (PyUnicode_Check(py_computer_name)) {
   35381           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   35382           0 :                         if (unicode == NULL) {
   35383           0 :                                 return false;
   35384             :                         }
   35385           0 :                         test_str = PyBytes_AS_STRING(unicode);
   35386           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   35387           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   35388             :                 } else {
   35389           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   35390           0 :                         return false;
   35391             :                 }
   35392           0 :                 talloc_str = talloc_strdup(r, test_str);
   35393           0 :                 if (unicode != NULL) {
   35394           0 :                         Py_DECREF(unicode);
   35395             :                 }
   35396           0 :                 if (talloc_str == NULL) {
   35397           0 :                         PyErr_NoMemory();
   35398           0 :                         return false;
   35399             :                 }
   35400           0 :                 r->in.computer_name = talloc_str;
   35401             :         }
   35402           0 :         return true;
   35403             : }
   35404             : 
   35405           0 : static PyObject *unpack_py_srvsvc_NetCharDevQPurgeSelf_args_out(struct srvsvc_NetCharDevQPurgeSelf *r)
   35406             : {
   35407           0 :         PyObject *result;
   35408           0 :         result = Py_None;
   35409           0 :         Py_INCREF(result);
   35410           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   35411           0 :                 PyErr_SetWERROR(r->out.result);
   35412           0 :                 return NULL;
   35413             :         }
   35414             : 
   35415           0 :         return result;
   35416             : }
   35417             : 
   35418             : 
   35419           0 : static PyObject *py_srvsvc_NetConnEnum_in_get_server_unc(PyObject *obj, void *closure)
   35420             : {
   35421           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(obj);
   35422           0 :         PyObject *py_server_unc;
   35423           0 :         if (object->in.server_unc == NULL) {
   35424           0 :                 Py_RETURN_NONE;
   35425             :         }
   35426           0 :         if (object->in.server_unc == NULL) {
   35427           0 :                 py_server_unc = Py_None;
   35428           0 :                 Py_INCREF(py_server_unc);
   35429             :         } else {
   35430           0 :                 if (object->in.server_unc == NULL) {
   35431           0 :                         py_server_unc = Py_None;
   35432           0 :                         Py_INCREF(py_server_unc);
   35433             :                 } else {
   35434           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   35435             :                 }
   35436             :         }
   35437           0 :         return py_server_unc;
   35438             : }
   35439             : 
   35440           0 : static int py_srvsvc_NetConnEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   35441             : {
   35442           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(py_obj);
   35443           0 :         if (value == NULL) {
   35444           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   35445           0 :                 return -1;
   35446             :         }
   35447           0 :         if (value == Py_None) {
   35448           0 :                 object->in.server_unc = NULL;
   35449             :         } else {
   35450           0 :                 object->in.server_unc = NULL;
   35451             :                 {
   35452           0 :                         const char *test_str;
   35453           0 :                         const char *talloc_str;
   35454           0 :                         PyObject *unicode = NULL;
   35455           0 :                         if (PyUnicode_Check(value)) {
   35456           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   35457           0 :                                 if (unicode == NULL) {
   35458           0 :                                         return -1;
   35459             :                                 }
   35460           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   35461           0 :                         } else if (PyBytes_Check(value)) {
   35462           0 :                                 test_str = PyBytes_AS_STRING(value);
   35463             :                         } else {
   35464           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   35465           0 :                                 return -1;
   35466             :                         }
   35467           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   35468           0 :                         if (unicode != NULL) {
   35469           0 :                                 Py_DECREF(unicode);
   35470             :                         }
   35471           0 :                         if (talloc_str == NULL) {
   35472           0 :                                 PyErr_NoMemory();
   35473           0 :                                 return -1;
   35474             :                         }
   35475           0 :                         object->in.server_unc = talloc_str;
   35476             :                 }
   35477             :         }
   35478           0 :         return 0;
   35479             : }
   35480             : 
   35481           0 : static PyObject *py_srvsvc_NetConnEnum_in_get_path(PyObject *obj, void *closure)
   35482             : {
   35483           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(obj);
   35484           0 :         PyObject *py_path;
   35485           0 :         if (object->in.path == NULL) {
   35486           0 :                 Py_RETURN_NONE;
   35487             :         }
   35488           0 :         if (object->in.path == NULL) {
   35489           0 :                 py_path = Py_None;
   35490           0 :                 Py_INCREF(py_path);
   35491             :         } else {
   35492           0 :                 if (object->in.path == NULL) {
   35493           0 :                         py_path = Py_None;
   35494           0 :                         Py_INCREF(py_path);
   35495             :                 } else {
   35496           0 :                         py_path = PyUnicode_Decode(object->in.path, strlen(object->in.path), "utf-8", "ignore");
   35497             :                 }
   35498             :         }
   35499           0 :         return py_path;
   35500             : }
   35501             : 
   35502           0 : static int py_srvsvc_NetConnEnum_in_set_path(PyObject *py_obj, PyObject *value, void *closure)
   35503             : {
   35504           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(py_obj);
   35505           0 :         if (value == NULL) {
   35506           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.path");
   35507           0 :                 return -1;
   35508             :         }
   35509           0 :         if (value == Py_None) {
   35510           0 :                 object->in.path = NULL;
   35511             :         } else {
   35512           0 :                 object->in.path = NULL;
   35513             :                 {
   35514           0 :                         const char *test_str;
   35515           0 :                         const char *talloc_str;
   35516           0 :                         PyObject *unicode = NULL;
   35517           0 :                         if (PyUnicode_Check(value)) {
   35518           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   35519           0 :                                 if (unicode == NULL) {
   35520           0 :                                         return -1;
   35521             :                                 }
   35522           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   35523           0 :                         } else if (PyBytes_Check(value)) {
   35524           0 :                                 test_str = PyBytes_AS_STRING(value);
   35525             :                         } else {
   35526           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   35527           0 :                                 return -1;
   35528             :                         }
   35529           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   35530           0 :                         if (unicode != NULL) {
   35531           0 :                                 Py_DECREF(unicode);
   35532             :                         }
   35533           0 :                         if (talloc_str == NULL) {
   35534           0 :                                 PyErr_NoMemory();
   35535           0 :                                 return -1;
   35536             :                         }
   35537           0 :                         object->in.path = talloc_str;
   35538             :                 }
   35539             :         }
   35540           0 :         return 0;
   35541             : }
   35542             : 
   35543           0 : static PyObject *py_srvsvc_NetConnEnum_in_get_info_ctr(PyObject *obj, void *closure)
   35544             : {
   35545           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(obj);
   35546           0 :         PyObject *py_info_ctr;
   35547           0 :         if (object->in.info_ctr == NULL) {
   35548           0 :                 Py_RETURN_NONE;
   35549             :         }
   35550           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetConnInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   35551           0 :         return py_info_ctr;
   35552             : }
   35553             : 
   35554           0 : static int py_srvsvc_NetConnEnum_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   35555             : {
   35556           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(py_obj);
   35557           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   35558           0 :         if (value == NULL) {
   35559           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info_ctr");
   35560           0 :                 return -1;
   35561             :         }
   35562           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   35563           0 :         if (object->in.info_ctr == NULL) {
   35564           0 :                 PyErr_NoMemory();
   35565           0 :                 return -1;
   35566             :         }
   35567           0 :         PY_CHECK_TYPE(&srvsvc_NetConnInfoCtr_Type, value, return -1;);
   35568           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35569           0 :                 PyErr_NoMemory();
   35570           0 :                 return -1;
   35571             :         }
   35572           0 :         object->in.info_ctr = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(value);
   35573           0 :         return 0;
   35574             : }
   35575             : 
   35576           0 : static PyObject *py_srvsvc_NetConnEnum_out_get_info_ctr(PyObject *obj, void *closure)
   35577             : {
   35578           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(obj);
   35579           0 :         PyObject *py_info_ctr;
   35580           0 :         if (object->out.info_ctr == NULL) {
   35581           0 :                 Py_RETURN_NONE;
   35582             :         }
   35583           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetConnInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   35584           0 :         return py_info_ctr;
   35585             : }
   35586             : 
   35587           0 : static int py_srvsvc_NetConnEnum_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   35588             : {
   35589           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(py_obj);
   35590           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   35591           0 :         if (value == NULL) {
   35592           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info_ctr");
   35593           0 :                 return -1;
   35594             :         }
   35595           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   35596           0 :         if (object->out.info_ctr == NULL) {
   35597           0 :                 PyErr_NoMemory();
   35598           0 :                 return -1;
   35599             :         }
   35600           0 :         PY_CHECK_TYPE(&srvsvc_NetConnInfoCtr_Type, value, return -1;);
   35601           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35602           0 :                 PyErr_NoMemory();
   35603           0 :                 return -1;
   35604             :         }
   35605           0 :         object->out.info_ctr = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(value);
   35606           0 :         return 0;
   35607             : }
   35608             : 
   35609           0 : static PyObject *py_srvsvc_NetConnEnum_in_get_max_buffer(PyObject *obj, void *closure)
   35610             : {
   35611           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(obj);
   35612           0 :         PyObject *py_max_buffer;
   35613           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)(object->in.max_buffer));
   35614           0 :         return py_max_buffer;
   35615             : }
   35616             : 
   35617           0 : static int py_srvsvc_NetConnEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   35618             : {
   35619           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(py_obj);
   35620           0 :         if (value == NULL) {
   35621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.max_buffer");
   35622           0 :                 return -1;
   35623             :         }
   35624             :         {
   35625           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   35626           0 :                 if (PyLong_Check(value)) {
   35627           0 :                         unsigned long long test_var;
   35628           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35629           0 :                         if (PyErr_Occurred() != NULL) {
   35630           0 :                                 return -1;
   35631             :                         }
   35632           0 :                         if (test_var > uint_max) {
   35633           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35634             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35635           0 :                                 return -1;
   35636             :                         }
   35637           0 :                         object->in.max_buffer = test_var;
   35638             :                 } else {
   35639           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35640             :                           PyLong_Type.tp_name);
   35641           0 :                         return -1;
   35642             :                 }
   35643             :         }
   35644           0 :         return 0;
   35645             : }
   35646             : 
   35647           0 : static PyObject *py_srvsvc_NetConnEnum_out_get_totalentries(PyObject *obj, void *closure)
   35648             : {
   35649           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(obj);
   35650           0 :         PyObject *py_totalentries;
   35651           0 :         if (object->out.totalentries == NULL) {
   35652           0 :                 Py_RETURN_NONE;
   35653             :         }
   35654           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.totalentries));
   35655           0 :         return py_totalentries;
   35656             : }
   35657             : 
   35658           0 : static int py_srvsvc_NetConnEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   35659             : {
   35660           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(py_obj);
   35661           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   35662           0 :         if (value == NULL) {
   35663           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.totalentries");
   35664           0 :                 return -1;
   35665             :         }
   35666           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   35667           0 :         if (object->out.totalentries == NULL) {
   35668           0 :                 PyErr_NoMemory();
   35669           0 :                 return -1;
   35670             :         }
   35671             :         {
   35672           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   35673           0 :                 if (PyLong_Check(value)) {
   35674           0 :                         unsigned long long test_var;
   35675           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35676           0 :                         if (PyErr_Occurred() != NULL) {
   35677           0 :                                 return -1;
   35678             :                         }
   35679           0 :                         if (test_var > uint_max) {
   35680           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35681             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35682           0 :                                 return -1;
   35683             :                         }
   35684           0 :                         *object->out.totalentries = test_var;
   35685             :                 } else {
   35686           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35687             :                           PyLong_Type.tp_name);
   35688           0 :                         return -1;
   35689             :                 }
   35690             :         }
   35691           0 :         return 0;
   35692             : }
   35693             : 
   35694           0 : static PyObject *py_srvsvc_NetConnEnum_in_get_resume_handle(PyObject *obj, void *closure)
   35695             : {
   35696           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(obj);
   35697           0 :         PyObject *py_resume_handle;
   35698           0 :         if (object->in.resume_handle == NULL) {
   35699           0 :                 Py_RETURN_NONE;
   35700             :         }
   35701           0 :         if (object->in.resume_handle == NULL) {
   35702           0 :                 py_resume_handle = Py_None;
   35703           0 :                 Py_INCREF(py_resume_handle);
   35704             :         } else {
   35705           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.resume_handle));
   35706             :         }
   35707           0 :         return py_resume_handle;
   35708             : }
   35709             : 
   35710           0 : static int py_srvsvc_NetConnEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   35711             : {
   35712           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(py_obj);
   35713           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   35714           0 :         if (value == NULL) {
   35715           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.resume_handle");
   35716           0 :                 return -1;
   35717             :         }
   35718           0 :         if (value == Py_None) {
   35719           0 :                 object->in.resume_handle = NULL;
   35720             :         } else {
   35721           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   35722           0 :                 if (object->in.resume_handle == NULL) {
   35723           0 :                         PyErr_NoMemory();
   35724           0 :                         return -1;
   35725             :                 }
   35726             :                 {
   35727           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   35728           0 :                         if (PyLong_Check(value)) {
   35729           0 :                                 unsigned long long test_var;
   35730           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   35731           0 :                                 if (PyErr_Occurred() != NULL) {
   35732           0 :                                         return -1;
   35733             :                                 }
   35734           0 :                                 if (test_var > uint_max) {
   35735           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35736             :                                           PyLong_Type.tp_name, uint_max, test_var);
   35737           0 :                                         return -1;
   35738             :                                 }
   35739           0 :                                 *object->in.resume_handle = test_var;
   35740             :                         } else {
   35741           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   35742             :                                   PyLong_Type.tp_name);
   35743           0 :                                 return -1;
   35744             :                         }
   35745             :                 }
   35746             :         }
   35747           0 :         return 0;
   35748             : }
   35749             : 
   35750           0 : static PyObject *py_srvsvc_NetConnEnum_out_get_resume_handle(PyObject *obj, void *closure)
   35751             : {
   35752           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(obj);
   35753           0 :         PyObject *py_resume_handle;
   35754           0 :         if (object->out.resume_handle == NULL) {
   35755           0 :                 Py_RETURN_NONE;
   35756             :         }
   35757           0 :         if (object->out.resume_handle == NULL) {
   35758           0 :                 py_resume_handle = Py_None;
   35759           0 :                 Py_INCREF(py_resume_handle);
   35760             :         } else {
   35761           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.resume_handle));
   35762             :         }
   35763           0 :         return py_resume_handle;
   35764             : }
   35765             : 
   35766           0 : static int py_srvsvc_NetConnEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   35767             : {
   35768           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(py_obj);
   35769           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   35770           0 :         if (value == NULL) {
   35771           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.resume_handle");
   35772           0 :                 return -1;
   35773             :         }
   35774           0 :         if (value == Py_None) {
   35775           0 :                 object->out.resume_handle = NULL;
   35776             :         } else {
   35777           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   35778           0 :                 if (object->out.resume_handle == NULL) {
   35779           0 :                         PyErr_NoMemory();
   35780           0 :                         return -1;
   35781             :                 }
   35782             :                 {
   35783           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   35784           0 :                         if (PyLong_Check(value)) {
   35785           0 :                                 unsigned long long test_var;
   35786           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   35787           0 :                                 if (PyErr_Occurred() != NULL) {
   35788           0 :                                         return -1;
   35789             :                                 }
   35790           0 :                                 if (test_var > uint_max) {
   35791           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35792             :                                           PyLong_Type.tp_name, uint_max, test_var);
   35793           0 :                                         return -1;
   35794             :                                 }
   35795           0 :                                 *object->out.resume_handle = test_var;
   35796             :                         } else {
   35797           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   35798             :                                   PyLong_Type.tp_name);
   35799           0 :                                 return -1;
   35800             :                         }
   35801             :                 }
   35802             :         }
   35803           0 :         return 0;
   35804             : }
   35805             : 
   35806           0 : static PyObject *py_srvsvc_NetConnEnum_get_result(PyObject *obj, void *closure)
   35807             : {
   35808           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(obj);
   35809           0 :         PyObject *py_result;
   35810           0 :         py_result = PyErr_FromWERROR(object->out.result);
   35811           0 :         return py_result;
   35812             : }
   35813             : 
   35814           0 : static int py_srvsvc_NetConnEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   35815             : {
   35816           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(py_obj);
   35817           0 :         if (value == NULL) {
   35818           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   35819           0 :                 return -1;
   35820             :         }
   35821           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   35822           0 :         return 0;
   35823             : }
   35824             : 
   35825             : static PyGetSetDef py_srvsvc_NetConnEnum_getsetters[] = {
   35826             :         {
   35827             :                 .name = discard_const_p(char, "in_server_unc"),
   35828             :                 .get = py_srvsvc_NetConnEnum_in_get_server_unc,
   35829             :                 .set = py_srvsvc_NetConnEnum_in_set_server_unc,
   35830             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35831             :         },
   35832             :         {
   35833             :                 .name = discard_const_p(char, "in_path"),
   35834             :                 .get = py_srvsvc_NetConnEnum_in_get_path,
   35835             :                 .set = py_srvsvc_NetConnEnum_in_set_path,
   35836             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35837             :         },
   35838             :         {
   35839             :                 .name = discard_const_p(char, "in_info_ctr"),
   35840             :                 .get = py_srvsvc_NetConnEnum_in_get_info_ctr,
   35841             :                 .set = py_srvsvc_NetConnEnum_in_set_info_ctr,
   35842             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetConnInfoCtr")
   35843             :         },
   35844             :         {
   35845             :                 .name = discard_const_p(char, "out_info_ctr"),
   35846             :                 .get = py_srvsvc_NetConnEnum_out_get_info_ctr,
   35847             :                 .set = py_srvsvc_NetConnEnum_out_set_info_ctr,
   35848             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetConnInfoCtr")
   35849             :         },
   35850             :         {
   35851             :                 .name = discard_const_p(char, "in_max_buffer"),
   35852             :                 .get = py_srvsvc_NetConnEnum_in_get_max_buffer,
   35853             :                 .set = py_srvsvc_NetConnEnum_in_set_max_buffer,
   35854             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35855             :         },
   35856             :         {
   35857             :                 .name = discard_const_p(char, "out_totalentries"),
   35858             :                 .get = py_srvsvc_NetConnEnum_out_get_totalentries,
   35859             :                 .set = py_srvsvc_NetConnEnum_out_set_totalentries,
   35860             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35861             :         },
   35862             :         {
   35863             :                 .name = discard_const_p(char, "in_resume_handle"),
   35864             :                 .get = py_srvsvc_NetConnEnum_in_get_resume_handle,
   35865             :                 .set = py_srvsvc_NetConnEnum_in_set_resume_handle,
   35866             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35867             :         },
   35868             :         {
   35869             :                 .name = discard_const_p(char, "out_resume_handle"),
   35870             :                 .get = py_srvsvc_NetConnEnum_out_get_resume_handle,
   35871             :                 .set = py_srvsvc_NetConnEnum_out_set_resume_handle,
   35872             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35873             :         },
   35874             :         {
   35875             :                 .name = discard_const_p(char, "result"),
   35876             :                 .get = py_srvsvc_NetConnEnum_get_result,
   35877             :                 .set = py_srvsvc_NetConnEnum_set_result,
   35878             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   35879             :         },
   35880             :         { .name = NULL }
   35881             : };
   35882             : 
   35883           0 : static PyObject *py_srvsvc_NetConnEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   35884             : {
   35885           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetConnEnum, type);
   35886           0 :         struct srvsvc_NetConnEnum *_self = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(self);
   35887           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   35888           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetConnInfoCtr);
   35889           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetConnInfoCtr);
   35890           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   35891           0 :         return self;
   35892             : }
   35893             : 
   35894           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   35895             : {
   35896             : 
   35897             : 
   35898           0 :         return PyLong_FromLong(8);
   35899             : }
   35900             : 
   35901           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   35902             : {
   35903           0 :         const struct ndr_interface_call *call = NULL;
   35904           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(py_obj);
   35905           0 :         PyObject *ret = NULL;
   35906           0 :         struct ndr_push *push = NULL;
   35907           0 :         DATA_BLOB blob;
   35908           0 :         enum ndr_err_code err;
   35909             : 
   35910           0 :         if (ndr_table_srvsvc.num_calls < 9) {
   35911           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetConnEnum_ndr_pack");
   35912           0 :                 return NULL;
   35913             :         }
   35914           0 :         call = &ndr_table_srvsvc.calls[8];
   35915             : 
   35916           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   35917           0 :         if (push == NULL) {
   35918           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35919           0 :                 return NULL;
   35920             :         }
   35921             : 
   35922           0 :         push->flags |= ndr_push_flags;
   35923             : 
   35924           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   35925           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35926           0 :                 TALLOC_FREE(push);
   35927           0 :                 PyErr_SetNdrError(err);
   35928           0 :                 return NULL;
   35929             :         }
   35930           0 :         blob = ndr_push_blob(push);
   35931           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   35932           0 :         TALLOC_FREE(push);
   35933           0 :         return ret;
   35934             : }
   35935             : 
   35936           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35937             : {
   35938           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35939           0 :         PyObject *bigendian_obj = NULL;
   35940           0 :         PyObject *ndr64_obj = NULL;
   35941           0 :         libndr_flags ndr_push_flags = 0;
   35942             : 
   35943           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   35944             :                 discard_const_p(char *, kwnames),
   35945             :                 &bigendian_obj,
   35946             :                 &ndr64_obj)) {
   35947           0 :                 return NULL;
   35948             :         }
   35949             : 
   35950           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35951           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35952             :         }
   35953           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35954           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35955             :         }
   35956             : 
   35957           0 :         return py_srvsvc_NetConnEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   35958             : }
   35959             : 
   35960           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35961             : {
   35962           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35963           0 :         PyObject *bigendian_obj = NULL;
   35964           0 :         PyObject *ndr64_obj = NULL;
   35965           0 :         libndr_flags ndr_push_flags = 0;
   35966             : 
   35967           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   35968             :                 discard_const_p(char *, kwnames),
   35969             :                 &bigendian_obj,
   35970             :                 &ndr64_obj)) {
   35971           0 :                 return NULL;
   35972             :         }
   35973             : 
   35974           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35975           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35976             :         }
   35977           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35978           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35979             :         }
   35980             : 
   35981           0 :         return py_srvsvc_NetConnEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   35982             : }
   35983             : 
   35984           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   35985             : {
   35986           0 :         const struct ndr_interface_call *call = NULL;
   35987           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(py_obj);
   35988           0 :         struct ndr_pull *pull = NULL;
   35989           0 :         enum ndr_err_code err;
   35990             : 
   35991           0 :         if (ndr_table_srvsvc.num_calls < 9) {
   35992           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetConnEnum_ndr_unpack");
   35993           0 :                 return NULL;
   35994             :         }
   35995           0 :         call = &ndr_table_srvsvc.calls[8];
   35996             : 
   35997           0 :         pull = ndr_pull_init_blob(blob, object);
   35998           0 :         if (pull == NULL) {
   35999           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36000           0 :                 return NULL;
   36001             :         }
   36002             : 
   36003           0 :         pull->flags |= ndr_pull_flags;
   36004             : 
   36005           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   36006           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36007           0 :                 TALLOC_FREE(pull);
   36008           0 :                 PyErr_SetNdrError(err);
   36009           0 :                 return NULL;
   36010             :         }
   36011           0 :         if (!allow_remaining) {
   36012           0 :                 uint32_t highest_ofs;
   36013             : 
   36014           0 :                 if (pull->offset > pull->relative_highest_offset) {
   36015           0 :                         highest_ofs = pull->offset;
   36016             :                 } else {
   36017           0 :                         highest_ofs = pull->relative_highest_offset;
   36018             :                 }
   36019           0 :                 if (highest_ofs < pull->data_size) {
   36020           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   36021             :                                 "not all bytes consumed ofs[%u] size[%u]",
   36022             :                                 highest_ofs, pull->data_size);
   36023           0 :                         TALLOC_FREE(pull);
   36024           0 :                         PyErr_SetNdrError(err);
   36025           0 :                         return NULL;
   36026             :                 }
   36027             :         }
   36028             : 
   36029           0 :         TALLOC_FREE(pull);
   36030           0 :         Py_RETURN_NONE;
   36031             : }
   36032             : 
   36033           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36034             : {
   36035           0 :         DATA_BLOB blob;
   36036           0 :         Py_ssize_t blob_length = 0;
   36037           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36038           0 :         PyObject *bigendian_obj = NULL;
   36039           0 :         PyObject *ndr64_obj = NULL;
   36040           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36041           0 :         PyObject *allow_remaining_obj = NULL;
   36042           0 :         bool allow_remaining = false;
   36043             : 
   36044           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   36045             :                 discard_const_p(char *, kwnames),
   36046             :                 &blob.data, &blob_length,
   36047             :                 &bigendian_obj,
   36048             :                 &ndr64_obj,
   36049             :                 &allow_remaining_obj)) {
   36050           0 :                 return NULL;
   36051             :         }
   36052           0 :         blob.length = blob_length;
   36053             : 
   36054           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36055           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36056             :         }
   36057           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36058           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36059             :         }
   36060             : 
   36061           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36062           0 :                 allow_remaining = true;
   36063             :         }
   36064             : 
   36065           0 :         return py_srvsvc_NetConnEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   36066             : }
   36067             : 
   36068           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36069             : {
   36070           0 :         DATA_BLOB blob;
   36071           0 :         Py_ssize_t blob_length = 0;
   36072           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36073           0 :         PyObject *bigendian_obj = NULL;
   36074           0 :         PyObject *ndr64_obj = NULL;
   36075           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36076           0 :         PyObject *allow_remaining_obj = NULL;
   36077           0 :         bool allow_remaining = false;
   36078             : 
   36079           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   36080             :                 discard_const_p(char *, kwnames),
   36081             :                 &blob.data, &blob_length,
   36082             :                 &bigendian_obj,
   36083             :                 &ndr64_obj,
   36084             :                 &allow_remaining_obj)) {
   36085           0 :                 return NULL;
   36086             :         }
   36087           0 :         blob.length = blob_length;
   36088             : 
   36089           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36090           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36091             :         }
   36092           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36093           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36094             :         }
   36095             : 
   36096           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36097           0 :                 allow_remaining = true;
   36098             :         }
   36099             : 
   36100           0 :         return py_srvsvc_NetConnEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   36101             : }
   36102             : 
   36103           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   36104             : {
   36105           0 :         const struct ndr_interface_call *call = NULL;
   36106           0 :         struct srvsvc_NetConnEnum *object = pytalloc_get_ptr(py_obj);
   36107           0 :         PyObject *ret;
   36108           0 :         char *retstr;
   36109             : 
   36110           0 :         if (ndr_table_srvsvc.num_calls < 9) {
   36111           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetConnEnum_ndr_print");
   36112           0 :                 return NULL;
   36113             :         }
   36114           0 :         call = &ndr_table_srvsvc.calls[8];
   36115             : 
   36116           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   36117           0 :         ret = PyUnicode_FromString(retstr);
   36118           0 :         TALLOC_FREE(retstr);
   36119             : 
   36120           0 :         return ret;
   36121             : }
   36122             : 
   36123           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36124             : {
   36125           0 :         return py_srvsvc_NetConnEnum_ndr_print(py_obj, "srvsvc_NetConnEnum_in", NDR_IN);
   36126             : }
   36127             : 
   36128           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36129             : {
   36130           0 :         return py_srvsvc_NetConnEnum_ndr_print(py_obj, "srvsvc_NetConnEnum_out", NDR_OUT);
   36131             : }
   36132             : 
   36133             : static PyMethodDef py_srvsvc_NetConnEnum_methods[] = {
   36134             :         { "opnum", (PyCFunction)py_srvsvc_NetConnEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   36135             :                 "srvsvc.NetConnEnum.opnum() -> 8 (0x08) " },
   36136             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetConnEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   36137             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   36138             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetConnEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   36139             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   36140             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetConnEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   36141             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   36142             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetConnEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   36143             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   36144             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetConnEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   36145             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetConnEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   36146             :         { NULL, NULL, 0, NULL }
   36147             : };
   36148             : 
   36149             : 
   36150             : static PyTypeObject srvsvc_NetConnEnum_Type = {
   36151             :         PyVarObject_HEAD_INIT(NULL, 0)
   36152             :         .tp_name = "srvsvc.NetConnEnum",
   36153             :         .tp_getset = py_srvsvc_NetConnEnum_getsetters,
   36154             :         .tp_methods = py_srvsvc_NetConnEnum_methods,
   36155             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   36156             :         .tp_new = py_srvsvc_NetConnEnum_new,
   36157             : };
   36158             : 
   36159           0 : static bool pack_py_srvsvc_NetConnEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetConnEnum *r)
   36160             : {
   36161           0 :         PyObject *py_server_unc;
   36162           0 :         PyObject *py_path;
   36163           0 :         PyObject *py_info_ctr;
   36164           0 :         PyObject *py_max_buffer;
   36165           0 :         PyObject *py_resume_handle;
   36166           0 :         const char *kwnames[] = {
   36167             :                 "server_unc", "path", "info_ctr", "max_buffer", "resume_handle", NULL
   36168             :         };
   36169             : 
   36170           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)) {
   36171           0 :                 return false;
   36172             :         }
   36173             : 
   36174           0 :         if (py_server_unc == NULL) {
   36175           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   36176           0 :                 return false;
   36177             :         }
   36178           0 :         if (py_server_unc == Py_None) {
   36179           0 :                 r->in.server_unc = NULL;
   36180             :         } else {
   36181           0 :                 r->in.server_unc = NULL;
   36182             :                 {
   36183           0 :                         const char *test_str;
   36184           0 :                         const char *talloc_str;
   36185           0 :                         PyObject *unicode = NULL;
   36186           0 :                         if (PyUnicode_Check(py_server_unc)) {
   36187           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   36188           0 :                                 if (unicode == NULL) {
   36189           0 :                                         return false;
   36190             :                                 }
   36191           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36192           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   36193           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   36194             :                         } else {
   36195           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   36196           0 :                                 return false;
   36197             :                         }
   36198           0 :                         talloc_str = talloc_strdup(r, test_str);
   36199           0 :                         if (unicode != NULL) {
   36200           0 :                                 Py_DECREF(unicode);
   36201             :                         }
   36202           0 :                         if (talloc_str == NULL) {
   36203           0 :                                 PyErr_NoMemory();
   36204           0 :                                 return false;
   36205             :                         }
   36206           0 :                         r->in.server_unc = talloc_str;
   36207             :                 }
   36208             :         }
   36209           0 :         if (py_path == NULL) {
   36210           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.path");
   36211           0 :                 return false;
   36212             :         }
   36213           0 :         if (py_path == Py_None) {
   36214           0 :                 r->in.path = NULL;
   36215             :         } else {
   36216           0 :                 r->in.path = NULL;
   36217             :                 {
   36218           0 :                         const char *test_str;
   36219           0 :                         const char *talloc_str;
   36220           0 :                         PyObject *unicode = NULL;
   36221           0 :                         if (PyUnicode_Check(py_path)) {
   36222           0 :                                 unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
   36223           0 :                                 if (unicode == NULL) {
   36224           0 :                                         return false;
   36225             :                                 }
   36226           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36227           0 :                         } else if (PyBytes_Check(py_path)) {
   36228           0 :                                 test_str = PyBytes_AS_STRING(py_path);
   36229             :                         } else {
   36230           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
   36231           0 :                                 return false;
   36232             :                         }
   36233           0 :                         talloc_str = talloc_strdup(r, test_str);
   36234           0 :                         if (unicode != NULL) {
   36235           0 :                                 Py_DECREF(unicode);
   36236             :                         }
   36237           0 :                         if (talloc_str == NULL) {
   36238           0 :                                 PyErr_NoMemory();
   36239           0 :                                 return false;
   36240             :                         }
   36241           0 :                         r->in.path = talloc_str;
   36242             :                 }
   36243             :         }
   36244           0 :         if (py_info_ctr == NULL) {
   36245           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info_ctr");
   36246           0 :                 return false;
   36247             :         }
   36248           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   36249           0 :         if (r->in.info_ctr == NULL) {
   36250           0 :                 PyErr_NoMemory();
   36251           0 :                 return false;
   36252             :         }
   36253           0 :         PY_CHECK_TYPE(&srvsvc_NetConnInfoCtr_Type, py_info_ctr, return false;);
   36254           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   36255           0 :                 PyErr_NoMemory();
   36256           0 :                 return false;
   36257             :         }
   36258           0 :         r->in.info_ctr = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   36259           0 :         if (py_max_buffer == NULL) {
   36260           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.max_buffer");
   36261           0 :                 return false;
   36262             :         }
   36263             :         {
   36264           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   36265           0 :                 if (PyLong_Check(py_max_buffer)) {
   36266           0 :                         unsigned long long test_var;
   36267           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   36268           0 :                         if (PyErr_Occurred() != NULL) {
   36269           0 :                                 return false;
   36270             :                         }
   36271           0 :                         if (test_var > uint_max) {
   36272           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36273             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36274           0 :                                 return false;
   36275             :                         }
   36276           0 :                         r->in.max_buffer = test_var;
   36277             :                 } else {
   36278           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36279             :                           PyLong_Type.tp_name);
   36280           0 :                         return false;
   36281             :                 }
   36282             :         }
   36283           0 :         if (py_resume_handle == NULL) {
   36284           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.resume_handle");
   36285           0 :                 return false;
   36286             :         }
   36287           0 :         if (py_resume_handle == Py_None) {
   36288           0 :                 r->in.resume_handle = NULL;
   36289             :         } else {
   36290           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   36291           0 :                 if (r->in.resume_handle == NULL) {
   36292           0 :                         PyErr_NoMemory();
   36293           0 :                         return false;
   36294             :                 }
   36295             :                 {
   36296           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   36297           0 :                         if (PyLong_Check(py_resume_handle)) {
   36298           0 :                                 unsigned long long test_var;
   36299           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   36300           0 :                                 if (PyErr_Occurred() != NULL) {
   36301           0 :                                         return false;
   36302             :                                 }
   36303           0 :                                 if (test_var > uint_max) {
   36304           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36305             :                                           PyLong_Type.tp_name, uint_max, test_var);
   36306           0 :                                         return false;
   36307             :                                 }
   36308           0 :                                 *r->in.resume_handle = test_var;
   36309             :                         } else {
   36310           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   36311             :                                   PyLong_Type.tp_name);
   36312           0 :                                 return false;
   36313             :                         }
   36314             :                 }
   36315             :         }
   36316           0 :         return true;
   36317             : }
   36318             : 
   36319           0 : static PyObject *unpack_py_srvsvc_NetConnEnum_args_out(struct srvsvc_NetConnEnum *r)
   36320             : {
   36321           0 :         PyObject *result;
   36322           0 :         PyObject *py_info_ctr;
   36323           0 :         PyObject *py_totalentries;
   36324           0 :         PyObject *py_resume_handle;
   36325           0 :         result = PyTuple_New(3);
   36326           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetConnInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   36327           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   36328           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.totalentries));
   36329           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   36330           0 :         if (r->out.resume_handle == NULL) {
   36331           0 :                 py_resume_handle = Py_None;
   36332           0 :                 Py_INCREF(py_resume_handle);
   36333             :         } else {
   36334           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.resume_handle));
   36335             :         }
   36336           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   36337           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   36338           0 :                 PyErr_SetWERROR(r->out.result);
   36339           0 :                 return NULL;
   36340             :         }
   36341             : 
   36342           0 :         return result;
   36343             : }
   36344             : 
   36345             : 
   36346           0 : static PyObject *py_srvsvc_NetFileEnum_in_get_server_unc(PyObject *obj, void *closure)
   36347             : {
   36348           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(obj);
   36349           0 :         PyObject *py_server_unc;
   36350           0 :         if (object->in.server_unc == NULL) {
   36351           0 :                 Py_RETURN_NONE;
   36352             :         }
   36353           0 :         if (object->in.server_unc == NULL) {
   36354           0 :                 py_server_unc = Py_None;
   36355           0 :                 Py_INCREF(py_server_unc);
   36356             :         } else {
   36357           0 :                 if (object->in.server_unc == NULL) {
   36358           0 :                         py_server_unc = Py_None;
   36359           0 :                         Py_INCREF(py_server_unc);
   36360             :                 } else {
   36361           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   36362             :                 }
   36363             :         }
   36364           0 :         return py_server_unc;
   36365             : }
   36366             : 
   36367           0 : static int py_srvsvc_NetFileEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   36368             : {
   36369           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   36370           0 :         if (value == NULL) {
   36371           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   36372           0 :                 return -1;
   36373             :         }
   36374           0 :         if (value == Py_None) {
   36375           0 :                 object->in.server_unc = NULL;
   36376             :         } else {
   36377           0 :                 object->in.server_unc = NULL;
   36378             :                 {
   36379           0 :                         const char *test_str;
   36380           0 :                         const char *talloc_str;
   36381           0 :                         PyObject *unicode = NULL;
   36382           0 :                         if (PyUnicode_Check(value)) {
   36383           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36384           0 :                                 if (unicode == NULL) {
   36385           0 :                                         return -1;
   36386             :                                 }
   36387           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36388           0 :                         } else if (PyBytes_Check(value)) {
   36389           0 :                                 test_str = PyBytes_AS_STRING(value);
   36390             :                         } else {
   36391           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36392           0 :                                 return -1;
   36393             :                         }
   36394           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36395           0 :                         if (unicode != NULL) {
   36396           0 :                                 Py_DECREF(unicode);
   36397             :                         }
   36398           0 :                         if (talloc_str == NULL) {
   36399           0 :                                 PyErr_NoMemory();
   36400           0 :                                 return -1;
   36401             :                         }
   36402           0 :                         object->in.server_unc = talloc_str;
   36403             :                 }
   36404             :         }
   36405           0 :         return 0;
   36406             : }
   36407             : 
   36408           0 : static PyObject *py_srvsvc_NetFileEnum_in_get_path(PyObject *obj, void *closure)
   36409             : {
   36410           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(obj);
   36411           0 :         PyObject *py_path;
   36412           0 :         if (object->in.path == NULL) {
   36413           0 :                 Py_RETURN_NONE;
   36414             :         }
   36415           0 :         if (object->in.path == NULL) {
   36416           0 :                 py_path = Py_None;
   36417           0 :                 Py_INCREF(py_path);
   36418             :         } else {
   36419           0 :                 if (object->in.path == NULL) {
   36420           0 :                         py_path = Py_None;
   36421           0 :                         Py_INCREF(py_path);
   36422             :                 } else {
   36423           0 :                         py_path = PyUnicode_Decode(object->in.path, strlen(object->in.path), "utf-8", "ignore");
   36424             :                 }
   36425             :         }
   36426           0 :         return py_path;
   36427             : }
   36428             : 
   36429           0 : static int py_srvsvc_NetFileEnum_in_set_path(PyObject *py_obj, PyObject *value, void *closure)
   36430             : {
   36431           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   36432           0 :         if (value == NULL) {
   36433           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.path");
   36434           0 :                 return -1;
   36435             :         }
   36436           0 :         if (value == Py_None) {
   36437           0 :                 object->in.path = NULL;
   36438             :         } else {
   36439           0 :                 object->in.path = NULL;
   36440             :                 {
   36441           0 :                         const char *test_str;
   36442           0 :                         const char *talloc_str;
   36443           0 :                         PyObject *unicode = NULL;
   36444           0 :                         if (PyUnicode_Check(value)) {
   36445           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36446           0 :                                 if (unicode == NULL) {
   36447           0 :                                         return -1;
   36448             :                                 }
   36449           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36450           0 :                         } else if (PyBytes_Check(value)) {
   36451           0 :                                 test_str = PyBytes_AS_STRING(value);
   36452             :                         } else {
   36453           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36454           0 :                                 return -1;
   36455             :                         }
   36456           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36457           0 :                         if (unicode != NULL) {
   36458           0 :                                 Py_DECREF(unicode);
   36459             :                         }
   36460           0 :                         if (talloc_str == NULL) {
   36461           0 :                                 PyErr_NoMemory();
   36462           0 :                                 return -1;
   36463             :                         }
   36464           0 :                         object->in.path = talloc_str;
   36465             :                 }
   36466             :         }
   36467           0 :         return 0;
   36468             : }
   36469             : 
   36470           0 : static PyObject *py_srvsvc_NetFileEnum_in_get_user(PyObject *obj, void *closure)
   36471             : {
   36472           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(obj);
   36473           0 :         PyObject *py_user;
   36474           0 :         if (object->in.user == NULL) {
   36475           0 :                 Py_RETURN_NONE;
   36476             :         }
   36477           0 :         if (object->in.user == NULL) {
   36478           0 :                 py_user = Py_None;
   36479           0 :                 Py_INCREF(py_user);
   36480             :         } else {
   36481           0 :                 if (object->in.user == NULL) {
   36482           0 :                         py_user = Py_None;
   36483           0 :                         Py_INCREF(py_user);
   36484             :                 } else {
   36485           0 :                         py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   36486             :                 }
   36487             :         }
   36488           0 :         return py_user;
   36489             : }
   36490             : 
   36491           0 : static int py_srvsvc_NetFileEnum_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   36492             : {
   36493           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   36494           0 :         if (value == NULL) {
   36495           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.user");
   36496           0 :                 return -1;
   36497             :         }
   36498           0 :         if (value == Py_None) {
   36499           0 :                 object->in.user = NULL;
   36500             :         } else {
   36501           0 :                 object->in.user = NULL;
   36502             :                 {
   36503           0 :                         const char *test_str;
   36504           0 :                         const char *talloc_str;
   36505           0 :                         PyObject *unicode = NULL;
   36506           0 :                         if (PyUnicode_Check(value)) {
   36507           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36508           0 :                                 if (unicode == NULL) {
   36509           0 :                                         return -1;
   36510             :                                 }
   36511           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36512           0 :                         } else if (PyBytes_Check(value)) {
   36513           0 :                                 test_str = PyBytes_AS_STRING(value);
   36514             :                         } else {
   36515           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36516           0 :                                 return -1;
   36517             :                         }
   36518           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36519           0 :                         if (unicode != NULL) {
   36520           0 :                                 Py_DECREF(unicode);
   36521             :                         }
   36522           0 :                         if (talloc_str == NULL) {
   36523           0 :                                 PyErr_NoMemory();
   36524           0 :                                 return -1;
   36525             :                         }
   36526           0 :                         object->in.user = talloc_str;
   36527             :                 }
   36528             :         }
   36529           0 :         return 0;
   36530             : }
   36531             : 
   36532           0 : static PyObject *py_srvsvc_NetFileEnum_in_get_info_ctr(PyObject *obj, void *closure)
   36533             : {
   36534           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(obj);
   36535           0 :         PyObject *py_info_ctr;
   36536           0 :         if (object->in.info_ctr == NULL) {
   36537           0 :                 Py_RETURN_NONE;
   36538             :         }
   36539           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetFileInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   36540           0 :         return py_info_ctr;
   36541             : }
   36542             : 
   36543           0 : static int py_srvsvc_NetFileEnum_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   36544             : {
   36545           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   36546           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   36547           0 :         if (value == NULL) {
   36548           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info_ctr");
   36549           0 :                 return -1;
   36550             :         }
   36551           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   36552           0 :         if (object->in.info_ctr == NULL) {
   36553           0 :                 PyErr_NoMemory();
   36554           0 :                 return -1;
   36555             :         }
   36556           0 :         PY_CHECK_TYPE(&srvsvc_NetFileInfoCtr_Type, value, return -1;);
   36557           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   36558           0 :                 PyErr_NoMemory();
   36559           0 :                 return -1;
   36560             :         }
   36561           0 :         object->in.info_ctr = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(value);
   36562           0 :         return 0;
   36563             : }
   36564             : 
   36565           0 : static PyObject *py_srvsvc_NetFileEnum_out_get_info_ctr(PyObject *obj, void *closure)
   36566             : {
   36567           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(obj);
   36568           0 :         PyObject *py_info_ctr;
   36569           0 :         if (object->out.info_ctr == NULL) {
   36570           0 :                 Py_RETURN_NONE;
   36571             :         }
   36572           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetFileInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   36573           0 :         return py_info_ctr;
   36574             : }
   36575             : 
   36576           0 : static int py_srvsvc_NetFileEnum_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   36577             : {
   36578           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   36579           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   36580           0 :         if (value == NULL) {
   36581           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info_ctr");
   36582           0 :                 return -1;
   36583             :         }
   36584           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   36585           0 :         if (object->out.info_ctr == NULL) {
   36586           0 :                 PyErr_NoMemory();
   36587           0 :                 return -1;
   36588             :         }
   36589           0 :         PY_CHECK_TYPE(&srvsvc_NetFileInfoCtr_Type, value, return -1;);
   36590           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   36591           0 :                 PyErr_NoMemory();
   36592           0 :                 return -1;
   36593             :         }
   36594           0 :         object->out.info_ctr = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(value);
   36595           0 :         return 0;
   36596             : }
   36597             : 
   36598           0 : static PyObject *py_srvsvc_NetFileEnum_in_get_max_buffer(PyObject *obj, void *closure)
   36599             : {
   36600           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(obj);
   36601           0 :         PyObject *py_max_buffer;
   36602           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)(object->in.max_buffer));
   36603           0 :         return py_max_buffer;
   36604             : }
   36605             : 
   36606           0 : static int py_srvsvc_NetFileEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   36607             : {
   36608           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   36609           0 :         if (value == NULL) {
   36610           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.max_buffer");
   36611           0 :                 return -1;
   36612             :         }
   36613             :         {
   36614           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   36615           0 :                 if (PyLong_Check(value)) {
   36616           0 :                         unsigned long long test_var;
   36617           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   36618           0 :                         if (PyErr_Occurred() != NULL) {
   36619           0 :                                 return -1;
   36620             :                         }
   36621           0 :                         if (test_var > uint_max) {
   36622           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36623             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36624           0 :                                 return -1;
   36625             :                         }
   36626           0 :                         object->in.max_buffer = test_var;
   36627             :                 } else {
   36628           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36629             :                           PyLong_Type.tp_name);
   36630           0 :                         return -1;
   36631             :                 }
   36632             :         }
   36633           0 :         return 0;
   36634             : }
   36635             : 
   36636           0 : static PyObject *py_srvsvc_NetFileEnum_out_get_totalentries(PyObject *obj, void *closure)
   36637             : {
   36638           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(obj);
   36639           0 :         PyObject *py_totalentries;
   36640           0 :         if (object->out.totalentries == NULL) {
   36641           0 :                 Py_RETURN_NONE;
   36642             :         }
   36643           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.totalentries));
   36644           0 :         return py_totalentries;
   36645             : }
   36646             : 
   36647           0 : static int py_srvsvc_NetFileEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   36648             : {
   36649           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   36650           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   36651           0 :         if (value == NULL) {
   36652           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.totalentries");
   36653           0 :                 return -1;
   36654             :         }
   36655           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   36656           0 :         if (object->out.totalentries == NULL) {
   36657           0 :                 PyErr_NoMemory();
   36658           0 :                 return -1;
   36659             :         }
   36660             :         {
   36661           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   36662           0 :                 if (PyLong_Check(value)) {
   36663           0 :                         unsigned long long test_var;
   36664           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   36665           0 :                         if (PyErr_Occurred() != NULL) {
   36666           0 :                                 return -1;
   36667             :                         }
   36668           0 :                         if (test_var > uint_max) {
   36669           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36670             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36671           0 :                                 return -1;
   36672             :                         }
   36673           0 :                         *object->out.totalentries = test_var;
   36674             :                 } else {
   36675           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36676             :                           PyLong_Type.tp_name);
   36677           0 :                         return -1;
   36678             :                 }
   36679             :         }
   36680           0 :         return 0;
   36681             : }
   36682             : 
   36683           0 : static PyObject *py_srvsvc_NetFileEnum_in_get_resume_handle(PyObject *obj, void *closure)
   36684             : {
   36685           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(obj);
   36686           0 :         PyObject *py_resume_handle;
   36687           0 :         if (object->in.resume_handle == NULL) {
   36688           0 :                 Py_RETURN_NONE;
   36689             :         }
   36690           0 :         if (object->in.resume_handle == NULL) {
   36691           0 :                 py_resume_handle = Py_None;
   36692           0 :                 Py_INCREF(py_resume_handle);
   36693             :         } else {
   36694           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.resume_handle));
   36695             :         }
   36696           0 :         return py_resume_handle;
   36697             : }
   36698             : 
   36699           0 : static int py_srvsvc_NetFileEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   36700             : {
   36701           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   36702           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   36703           0 :         if (value == NULL) {
   36704           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.resume_handle");
   36705           0 :                 return -1;
   36706             :         }
   36707           0 :         if (value == Py_None) {
   36708           0 :                 object->in.resume_handle = NULL;
   36709             :         } else {
   36710           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   36711           0 :                 if (object->in.resume_handle == NULL) {
   36712           0 :                         PyErr_NoMemory();
   36713           0 :                         return -1;
   36714             :                 }
   36715             :                 {
   36716           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   36717           0 :                         if (PyLong_Check(value)) {
   36718           0 :                                 unsigned long long test_var;
   36719           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   36720           0 :                                 if (PyErr_Occurred() != NULL) {
   36721           0 :                                         return -1;
   36722             :                                 }
   36723           0 :                                 if (test_var > uint_max) {
   36724           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36725             :                                           PyLong_Type.tp_name, uint_max, test_var);
   36726           0 :                                         return -1;
   36727             :                                 }
   36728           0 :                                 *object->in.resume_handle = test_var;
   36729             :                         } else {
   36730           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   36731             :                                   PyLong_Type.tp_name);
   36732           0 :                                 return -1;
   36733             :                         }
   36734             :                 }
   36735             :         }
   36736           0 :         return 0;
   36737             : }
   36738             : 
   36739           0 : static PyObject *py_srvsvc_NetFileEnum_out_get_resume_handle(PyObject *obj, void *closure)
   36740             : {
   36741           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(obj);
   36742           0 :         PyObject *py_resume_handle;
   36743           0 :         if (object->out.resume_handle == NULL) {
   36744           0 :                 Py_RETURN_NONE;
   36745             :         }
   36746           0 :         if (object->out.resume_handle == NULL) {
   36747           0 :                 py_resume_handle = Py_None;
   36748           0 :                 Py_INCREF(py_resume_handle);
   36749             :         } else {
   36750           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.resume_handle));
   36751             :         }
   36752           0 :         return py_resume_handle;
   36753             : }
   36754             : 
   36755           0 : static int py_srvsvc_NetFileEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   36756             : {
   36757           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   36758           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   36759           0 :         if (value == NULL) {
   36760           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.resume_handle");
   36761           0 :                 return -1;
   36762             :         }
   36763           0 :         if (value == Py_None) {
   36764           0 :                 object->out.resume_handle = NULL;
   36765             :         } else {
   36766           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   36767           0 :                 if (object->out.resume_handle == NULL) {
   36768           0 :                         PyErr_NoMemory();
   36769           0 :                         return -1;
   36770             :                 }
   36771             :                 {
   36772           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   36773           0 :                         if (PyLong_Check(value)) {
   36774           0 :                                 unsigned long long test_var;
   36775           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   36776           0 :                                 if (PyErr_Occurred() != NULL) {
   36777           0 :                                         return -1;
   36778             :                                 }
   36779           0 :                                 if (test_var > uint_max) {
   36780           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36781             :                                           PyLong_Type.tp_name, uint_max, test_var);
   36782           0 :                                         return -1;
   36783             :                                 }
   36784           0 :                                 *object->out.resume_handle = test_var;
   36785             :                         } else {
   36786           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   36787             :                                   PyLong_Type.tp_name);
   36788           0 :                                 return -1;
   36789             :                         }
   36790             :                 }
   36791             :         }
   36792           0 :         return 0;
   36793             : }
   36794             : 
   36795           0 : static PyObject *py_srvsvc_NetFileEnum_get_result(PyObject *obj, void *closure)
   36796             : {
   36797           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(obj);
   36798           0 :         PyObject *py_result;
   36799           0 :         py_result = PyErr_FromWERROR(object->out.result);
   36800           0 :         return py_result;
   36801             : }
   36802             : 
   36803           0 : static int py_srvsvc_NetFileEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   36804             : {
   36805           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   36806           0 :         if (value == NULL) {
   36807           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   36808           0 :                 return -1;
   36809             :         }
   36810           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   36811           0 :         return 0;
   36812             : }
   36813             : 
   36814             : static PyGetSetDef py_srvsvc_NetFileEnum_getsetters[] = {
   36815             :         {
   36816             :                 .name = discard_const_p(char, "in_server_unc"),
   36817             :                 .get = py_srvsvc_NetFileEnum_in_get_server_unc,
   36818             :                 .set = py_srvsvc_NetFileEnum_in_set_server_unc,
   36819             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36820             :         },
   36821             :         {
   36822             :                 .name = discard_const_p(char, "in_path"),
   36823             :                 .get = py_srvsvc_NetFileEnum_in_get_path,
   36824             :                 .set = py_srvsvc_NetFileEnum_in_set_path,
   36825             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36826             :         },
   36827             :         {
   36828             :                 .name = discard_const_p(char, "in_user"),
   36829             :                 .get = py_srvsvc_NetFileEnum_in_get_user,
   36830             :                 .set = py_srvsvc_NetFileEnum_in_set_user,
   36831             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36832             :         },
   36833             :         {
   36834             :                 .name = discard_const_p(char, "in_info_ctr"),
   36835             :                 .get = py_srvsvc_NetFileEnum_in_get_info_ctr,
   36836             :                 .set = py_srvsvc_NetFileEnum_in_set_info_ctr,
   36837             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetFileInfoCtr")
   36838             :         },
   36839             :         {
   36840             :                 .name = discard_const_p(char, "out_info_ctr"),
   36841             :                 .get = py_srvsvc_NetFileEnum_out_get_info_ctr,
   36842             :                 .set = py_srvsvc_NetFileEnum_out_set_info_ctr,
   36843             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetFileInfoCtr")
   36844             :         },
   36845             :         {
   36846             :                 .name = discard_const_p(char, "in_max_buffer"),
   36847             :                 .get = py_srvsvc_NetFileEnum_in_get_max_buffer,
   36848             :                 .set = py_srvsvc_NetFileEnum_in_set_max_buffer,
   36849             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   36850             :         },
   36851             :         {
   36852             :                 .name = discard_const_p(char, "out_totalentries"),
   36853             :                 .get = py_srvsvc_NetFileEnum_out_get_totalentries,
   36854             :                 .set = py_srvsvc_NetFileEnum_out_set_totalentries,
   36855             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   36856             :         },
   36857             :         {
   36858             :                 .name = discard_const_p(char, "in_resume_handle"),
   36859             :                 .get = py_srvsvc_NetFileEnum_in_get_resume_handle,
   36860             :                 .set = py_srvsvc_NetFileEnum_in_set_resume_handle,
   36861             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   36862             :         },
   36863             :         {
   36864             :                 .name = discard_const_p(char, "out_resume_handle"),
   36865             :                 .get = py_srvsvc_NetFileEnum_out_get_resume_handle,
   36866             :                 .set = py_srvsvc_NetFileEnum_out_set_resume_handle,
   36867             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   36868             :         },
   36869             :         {
   36870             :                 .name = discard_const_p(char, "result"),
   36871             :                 .get = py_srvsvc_NetFileEnum_get_result,
   36872             :                 .set = py_srvsvc_NetFileEnum_set_result,
   36873             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   36874             :         },
   36875             :         { .name = NULL }
   36876             : };
   36877             : 
   36878           0 : static PyObject *py_srvsvc_NetFileEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   36879             : {
   36880           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetFileEnum, type);
   36881           0 :         struct srvsvc_NetFileEnum *_self = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(self);
   36882           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   36883           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetFileInfoCtr);
   36884           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetFileInfoCtr);
   36885           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   36886           0 :         return self;
   36887             : }
   36888             : 
   36889           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   36890             : {
   36891             : 
   36892             : 
   36893           0 :         return PyLong_FromLong(9);
   36894             : }
   36895             : 
   36896           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   36897             : {
   36898           0 :         const struct ndr_interface_call *call = NULL;
   36899           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   36900           0 :         PyObject *ret = NULL;
   36901           0 :         struct ndr_push *push = NULL;
   36902           0 :         DATA_BLOB blob;
   36903           0 :         enum ndr_err_code err;
   36904             : 
   36905           0 :         if (ndr_table_srvsvc.num_calls < 10) {
   36906           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileEnum_ndr_pack");
   36907           0 :                 return NULL;
   36908             :         }
   36909           0 :         call = &ndr_table_srvsvc.calls[9];
   36910             : 
   36911           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   36912           0 :         if (push == NULL) {
   36913           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36914           0 :                 return NULL;
   36915             :         }
   36916             : 
   36917           0 :         push->flags |= ndr_push_flags;
   36918             : 
   36919           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   36920           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36921           0 :                 TALLOC_FREE(push);
   36922           0 :                 PyErr_SetNdrError(err);
   36923           0 :                 return NULL;
   36924             :         }
   36925           0 :         blob = ndr_push_blob(push);
   36926           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   36927           0 :         TALLOC_FREE(push);
   36928           0 :         return ret;
   36929             : }
   36930             : 
   36931           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36932             : {
   36933           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36934           0 :         PyObject *bigendian_obj = NULL;
   36935           0 :         PyObject *ndr64_obj = NULL;
   36936           0 :         libndr_flags ndr_push_flags = 0;
   36937             : 
   36938           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   36939             :                 discard_const_p(char *, kwnames),
   36940             :                 &bigendian_obj,
   36941             :                 &ndr64_obj)) {
   36942           0 :                 return NULL;
   36943             :         }
   36944             : 
   36945           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36946           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36947             :         }
   36948           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36949           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36950             :         }
   36951             : 
   36952           0 :         return py_srvsvc_NetFileEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   36953             : }
   36954             : 
   36955           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36956             : {
   36957           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36958           0 :         PyObject *bigendian_obj = NULL;
   36959           0 :         PyObject *ndr64_obj = NULL;
   36960           0 :         libndr_flags ndr_push_flags = 0;
   36961             : 
   36962           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   36963             :                 discard_const_p(char *, kwnames),
   36964             :                 &bigendian_obj,
   36965             :                 &ndr64_obj)) {
   36966           0 :                 return NULL;
   36967             :         }
   36968             : 
   36969           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36970           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36971             :         }
   36972           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36973           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36974             :         }
   36975             : 
   36976           0 :         return py_srvsvc_NetFileEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   36977             : }
   36978             : 
   36979           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   36980             : {
   36981           0 :         const struct ndr_interface_call *call = NULL;
   36982           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   36983           0 :         struct ndr_pull *pull = NULL;
   36984           0 :         enum ndr_err_code err;
   36985             : 
   36986           0 :         if (ndr_table_srvsvc.num_calls < 10) {
   36987           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileEnum_ndr_unpack");
   36988           0 :                 return NULL;
   36989             :         }
   36990           0 :         call = &ndr_table_srvsvc.calls[9];
   36991             : 
   36992           0 :         pull = ndr_pull_init_blob(blob, object);
   36993           0 :         if (pull == NULL) {
   36994           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36995           0 :                 return NULL;
   36996             :         }
   36997             : 
   36998           0 :         pull->flags |= ndr_pull_flags;
   36999             : 
   37000           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   37001           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37002           0 :                 TALLOC_FREE(pull);
   37003           0 :                 PyErr_SetNdrError(err);
   37004           0 :                 return NULL;
   37005             :         }
   37006           0 :         if (!allow_remaining) {
   37007           0 :                 uint32_t highest_ofs;
   37008             : 
   37009           0 :                 if (pull->offset > pull->relative_highest_offset) {
   37010           0 :                         highest_ofs = pull->offset;
   37011             :                 } else {
   37012           0 :                         highest_ofs = pull->relative_highest_offset;
   37013             :                 }
   37014           0 :                 if (highest_ofs < pull->data_size) {
   37015           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   37016             :                                 "not all bytes consumed ofs[%u] size[%u]",
   37017             :                                 highest_ofs, pull->data_size);
   37018           0 :                         TALLOC_FREE(pull);
   37019           0 :                         PyErr_SetNdrError(err);
   37020           0 :                         return NULL;
   37021             :                 }
   37022             :         }
   37023             : 
   37024           0 :         TALLOC_FREE(pull);
   37025           0 :         Py_RETURN_NONE;
   37026             : }
   37027             : 
   37028           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37029             : {
   37030           0 :         DATA_BLOB blob;
   37031           0 :         Py_ssize_t blob_length = 0;
   37032           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37033           0 :         PyObject *bigendian_obj = NULL;
   37034           0 :         PyObject *ndr64_obj = NULL;
   37035           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37036           0 :         PyObject *allow_remaining_obj = NULL;
   37037           0 :         bool allow_remaining = false;
   37038             : 
   37039           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   37040             :                 discard_const_p(char *, kwnames),
   37041             :                 &blob.data, &blob_length,
   37042             :                 &bigendian_obj,
   37043             :                 &ndr64_obj,
   37044             :                 &allow_remaining_obj)) {
   37045           0 :                 return NULL;
   37046             :         }
   37047           0 :         blob.length = blob_length;
   37048             : 
   37049           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37050           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37051             :         }
   37052           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37053           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37054             :         }
   37055             : 
   37056           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37057           0 :                 allow_remaining = true;
   37058             :         }
   37059             : 
   37060           0 :         return py_srvsvc_NetFileEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   37061             : }
   37062             : 
   37063           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37064             : {
   37065           0 :         DATA_BLOB blob;
   37066           0 :         Py_ssize_t blob_length = 0;
   37067           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37068           0 :         PyObject *bigendian_obj = NULL;
   37069           0 :         PyObject *ndr64_obj = NULL;
   37070           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37071           0 :         PyObject *allow_remaining_obj = NULL;
   37072           0 :         bool allow_remaining = false;
   37073             : 
   37074           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   37075             :                 discard_const_p(char *, kwnames),
   37076             :                 &blob.data, &blob_length,
   37077             :                 &bigendian_obj,
   37078             :                 &ndr64_obj,
   37079             :                 &allow_remaining_obj)) {
   37080           0 :                 return NULL;
   37081             :         }
   37082           0 :         blob.length = blob_length;
   37083             : 
   37084           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37085           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37086             :         }
   37087           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37088           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37089             :         }
   37090             : 
   37091           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37092           0 :                 allow_remaining = true;
   37093             :         }
   37094             : 
   37095           0 :         return py_srvsvc_NetFileEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   37096             : }
   37097             : 
   37098           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   37099             : {
   37100           0 :         const struct ndr_interface_call *call = NULL;
   37101           0 :         struct srvsvc_NetFileEnum *object = pytalloc_get_ptr(py_obj);
   37102           0 :         PyObject *ret;
   37103           0 :         char *retstr;
   37104             : 
   37105           0 :         if (ndr_table_srvsvc.num_calls < 10) {
   37106           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileEnum_ndr_print");
   37107           0 :                 return NULL;
   37108             :         }
   37109           0 :         call = &ndr_table_srvsvc.calls[9];
   37110             : 
   37111           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   37112           0 :         ret = PyUnicode_FromString(retstr);
   37113           0 :         TALLOC_FREE(retstr);
   37114             : 
   37115           0 :         return ret;
   37116             : }
   37117             : 
   37118           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37119             : {
   37120           0 :         return py_srvsvc_NetFileEnum_ndr_print(py_obj, "srvsvc_NetFileEnum_in", NDR_IN);
   37121             : }
   37122             : 
   37123           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37124             : {
   37125           0 :         return py_srvsvc_NetFileEnum_ndr_print(py_obj, "srvsvc_NetFileEnum_out", NDR_OUT);
   37126             : }
   37127             : 
   37128             : static PyMethodDef py_srvsvc_NetFileEnum_methods[] = {
   37129             :         { "opnum", (PyCFunction)py_srvsvc_NetFileEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   37130             :                 "srvsvc.NetFileEnum.opnum() -> 9 (0x09) " },
   37131             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   37132             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   37133             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   37134             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   37135             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   37136             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   37137             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   37138             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   37139             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetFileEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   37140             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetFileEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   37141             :         { NULL, NULL, 0, NULL }
   37142             : };
   37143             : 
   37144             : 
   37145             : static PyTypeObject srvsvc_NetFileEnum_Type = {
   37146             :         PyVarObject_HEAD_INIT(NULL, 0)
   37147             :         .tp_name = "srvsvc.NetFileEnum",
   37148             :         .tp_getset = py_srvsvc_NetFileEnum_getsetters,
   37149             :         .tp_methods = py_srvsvc_NetFileEnum_methods,
   37150             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   37151             :         .tp_new = py_srvsvc_NetFileEnum_new,
   37152             : };
   37153             : 
   37154           0 : static bool pack_py_srvsvc_NetFileEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetFileEnum *r)
   37155             : {
   37156           0 :         PyObject *py_server_unc;
   37157           0 :         PyObject *py_path;
   37158           0 :         PyObject *py_user;
   37159           0 :         PyObject *py_info_ctr;
   37160           0 :         PyObject *py_max_buffer;
   37161           0 :         PyObject *py_resume_handle;
   37162           0 :         const char *kwnames[] = {
   37163             :                 "server_unc", "path", "user", "info_ctr", "max_buffer", "resume_handle", NULL
   37164             :         };
   37165             : 
   37166           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)) {
   37167           0 :                 return false;
   37168             :         }
   37169             : 
   37170           0 :         if (py_server_unc == NULL) {
   37171           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   37172           0 :                 return false;
   37173             :         }
   37174           0 :         if (py_server_unc == Py_None) {
   37175           0 :                 r->in.server_unc = NULL;
   37176             :         } else {
   37177           0 :                 r->in.server_unc = NULL;
   37178             :                 {
   37179           0 :                         const char *test_str;
   37180           0 :                         const char *talloc_str;
   37181           0 :                         PyObject *unicode = NULL;
   37182           0 :                         if (PyUnicode_Check(py_server_unc)) {
   37183           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   37184           0 :                                 if (unicode == NULL) {
   37185           0 :                                         return false;
   37186             :                                 }
   37187           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37188           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   37189           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   37190             :                         } else {
   37191           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   37192           0 :                                 return false;
   37193             :                         }
   37194           0 :                         talloc_str = talloc_strdup(r, test_str);
   37195           0 :                         if (unicode != NULL) {
   37196           0 :                                 Py_DECREF(unicode);
   37197             :                         }
   37198           0 :                         if (talloc_str == NULL) {
   37199           0 :                                 PyErr_NoMemory();
   37200           0 :                                 return false;
   37201             :                         }
   37202           0 :                         r->in.server_unc = talloc_str;
   37203             :                 }
   37204             :         }
   37205           0 :         if (py_path == NULL) {
   37206           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.path");
   37207           0 :                 return false;
   37208             :         }
   37209           0 :         if (py_path == Py_None) {
   37210           0 :                 r->in.path = NULL;
   37211             :         } else {
   37212           0 :                 r->in.path = NULL;
   37213             :                 {
   37214           0 :                         const char *test_str;
   37215           0 :                         const char *talloc_str;
   37216           0 :                         PyObject *unicode = NULL;
   37217           0 :                         if (PyUnicode_Check(py_path)) {
   37218           0 :                                 unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
   37219           0 :                                 if (unicode == NULL) {
   37220           0 :                                         return false;
   37221             :                                 }
   37222           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37223           0 :                         } else if (PyBytes_Check(py_path)) {
   37224           0 :                                 test_str = PyBytes_AS_STRING(py_path);
   37225             :                         } else {
   37226           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
   37227           0 :                                 return false;
   37228             :                         }
   37229           0 :                         talloc_str = talloc_strdup(r, test_str);
   37230           0 :                         if (unicode != NULL) {
   37231           0 :                                 Py_DECREF(unicode);
   37232             :                         }
   37233           0 :                         if (talloc_str == NULL) {
   37234           0 :                                 PyErr_NoMemory();
   37235           0 :                                 return false;
   37236             :                         }
   37237           0 :                         r->in.path = talloc_str;
   37238             :                 }
   37239             :         }
   37240           0 :         if (py_user == NULL) {
   37241           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.user");
   37242           0 :                 return false;
   37243             :         }
   37244           0 :         if (py_user == Py_None) {
   37245           0 :                 r->in.user = NULL;
   37246             :         } else {
   37247           0 :                 r->in.user = NULL;
   37248             :                 {
   37249           0 :                         const char *test_str;
   37250           0 :                         const char *talloc_str;
   37251           0 :                         PyObject *unicode = NULL;
   37252           0 :                         if (PyUnicode_Check(py_user)) {
   37253           0 :                                 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   37254           0 :                                 if (unicode == NULL) {
   37255           0 :                                         return false;
   37256             :                                 }
   37257           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37258           0 :                         } else if (PyBytes_Check(py_user)) {
   37259           0 :                                 test_str = PyBytes_AS_STRING(py_user);
   37260             :                         } else {
   37261           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   37262           0 :                                 return false;
   37263             :                         }
   37264           0 :                         talloc_str = talloc_strdup(r, test_str);
   37265           0 :                         if (unicode != NULL) {
   37266           0 :                                 Py_DECREF(unicode);
   37267             :                         }
   37268           0 :                         if (talloc_str == NULL) {
   37269           0 :                                 PyErr_NoMemory();
   37270           0 :                                 return false;
   37271             :                         }
   37272           0 :                         r->in.user = talloc_str;
   37273             :                 }
   37274             :         }
   37275           0 :         if (py_info_ctr == NULL) {
   37276           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info_ctr");
   37277           0 :                 return false;
   37278             :         }
   37279           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   37280           0 :         if (r->in.info_ctr == NULL) {
   37281           0 :                 PyErr_NoMemory();
   37282           0 :                 return false;
   37283             :         }
   37284           0 :         PY_CHECK_TYPE(&srvsvc_NetFileInfoCtr_Type, py_info_ctr, return false;);
   37285           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   37286           0 :                 PyErr_NoMemory();
   37287           0 :                 return false;
   37288             :         }
   37289           0 :         r->in.info_ctr = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   37290           0 :         if (py_max_buffer == NULL) {
   37291           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.max_buffer");
   37292           0 :                 return false;
   37293             :         }
   37294             :         {
   37295           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   37296           0 :                 if (PyLong_Check(py_max_buffer)) {
   37297           0 :                         unsigned long long test_var;
   37298           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   37299           0 :                         if (PyErr_Occurred() != NULL) {
   37300           0 :                                 return false;
   37301             :                         }
   37302           0 :                         if (test_var > uint_max) {
   37303           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37304             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37305           0 :                                 return false;
   37306             :                         }
   37307           0 :                         r->in.max_buffer = test_var;
   37308             :                 } else {
   37309           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37310             :                           PyLong_Type.tp_name);
   37311           0 :                         return false;
   37312             :                 }
   37313             :         }
   37314           0 :         if (py_resume_handle == NULL) {
   37315           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.resume_handle");
   37316           0 :                 return false;
   37317             :         }
   37318           0 :         if (py_resume_handle == Py_None) {
   37319           0 :                 r->in.resume_handle = NULL;
   37320             :         } else {
   37321           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   37322           0 :                 if (r->in.resume_handle == NULL) {
   37323           0 :                         PyErr_NoMemory();
   37324           0 :                         return false;
   37325             :                 }
   37326             :                 {
   37327           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   37328           0 :                         if (PyLong_Check(py_resume_handle)) {
   37329           0 :                                 unsigned long long test_var;
   37330           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   37331           0 :                                 if (PyErr_Occurred() != NULL) {
   37332           0 :                                         return false;
   37333             :                                 }
   37334           0 :                                 if (test_var > uint_max) {
   37335           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37336             :                                           PyLong_Type.tp_name, uint_max, test_var);
   37337           0 :                                         return false;
   37338             :                                 }
   37339           0 :                                 *r->in.resume_handle = test_var;
   37340             :                         } else {
   37341           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   37342             :                                   PyLong_Type.tp_name);
   37343           0 :                                 return false;
   37344             :                         }
   37345             :                 }
   37346             :         }
   37347           0 :         return true;
   37348             : }
   37349             : 
   37350           0 : static PyObject *unpack_py_srvsvc_NetFileEnum_args_out(struct srvsvc_NetFileEnum *r)
   37351             : {
   37352           0 :         PyObject *result;
   37353           0 :         PyObject *py_info_ctr;
   37354           0 :         PyObject *py_totalentries;
   37355           0 :         PyObject *py_resume_handle;
   37356           0 :         result = PyTuple_New(3);
   37357           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetFileInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   37358           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   37359           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.totalentries));
   37360           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   37361           0 :         if (r->out.resume_handle == NULL) {
   37362           0 :                 py_resume_handle = Py_None;
   37363           0 :                 Py_INCREF(py_resume_handle);
   37364             :         } else {
   37365           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.resume_handle));
   37366             :         }
   37367           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   37368           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   37369           0 :                 PyErr_SetWERROR(r->out.result);
   37370           0 :                 return NULL;
   37371             :         }
   37372             : 
   37373           0 :         return result;
   37374             : }
   37375             : 
   37376             : 
   37377           0 : static PyObject *py_srvsvc_NetFileGetInfo_in_get_server_unc(PyObject *obj, void *closure)
   37378             : {
   37379           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(obj);
   37380           0 :         PyObject *py_server_unc;
   37381           0 :         if (object->in.server_unc == NULL) {
   37382           0 :                 Py_RETURN_NONE;
   37383             :         }
   37384           0 :         if (object->in.server_unc == NULL) {
   37385           0 :                 py_server_unc = Py_None;
   37386           0 :                 Py_INCREF(py_server_unc);
   37387             :         } else {
   37388           0 :                 if (object->in.server_unc == NULL) {
   37389           0 :                         py_server_unc = Py_None;
   37390           0 :                         Py_INCREF(py_server_unc);
   37391             :                 } else {
   37392           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   37393             :                 }
   37394             :         }
   37395           0 :         return py_server_unc;
   37396             : }
   37397             : 
   37398           0 : static int py_srvsvc_NetFileGetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   37399             : {
   37400           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(py_obj);
   37401           0 :         if (value == NULL) {
   37402           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   37403           0 :                 return -1;
   37404             :         }
   37405           0 :         if (value == Py_None) {
   37406           0 :                 object->in.server_unc = NULL;
   37407             :         } else {
   37408           0 :                 object->in.server_unc = NULL;
   37409             :                 {
   37410           0 :                         const char *test_str;
   37411           0 :                         const char *talloc_str;
   37412           0 :                         PyObject *unicode = NULL;
   37413           0 :                         if (PyUnicode_Check(value)) {
   37414           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   37415           0 :                                 if (unicode == NULL) {
   37416           0 :                                         return -1;
   37417             :                                 }
   37418           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37419           0 :                         } else if (PyBytes_Check(value)) {
   37420           0 :                                 test_str = PyBytes_AS_STRING(value);
   37421             :                         } else {
   37422           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   37423           0 :                                 return -1;
   37424             :                         }
   37425           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   37426           0 :                         if (unicode != NULL) {
   37427           0 :                                 Py_DECREF(unicode);
   37428             :                         }
   37429           0 :                         if (talloc_str == NULL) {
   37430           0 :                                 PyErr_NoMemory();
   37431           0 :                                 return -1;
   37432             :                         }
   37433           0 :                         object->in.server_unc = talloc_str;
   37434             :                 }
   37435             :         }
   37436           0 :         return 0;
   37437             : }
   37438             : 
   37439           0 : static PyObject *py_srvsvc_NetFileGetInfo_in_get_fid(PyObject *obj, void *closure)
   37440             : {
   37441           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(obj);
   37442           0 :         PyObject *py_fid;
   37443           0 :         py_fid = PyLong_FromUnsignedLongLong((uint32_t)(object->in.fid));
   37444           0 :         return py_fid;
   37445             : }
   37446             : 
   37447           0 : static int py_srvsvc_NetFileGetInfo_in_set_fid(PyObject *py_obj, PyObject *value, void *closure)
   37448             : {
   37449           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(py_obj);
   37450           0 :         if (value == NULL) {
   37451           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.fid");
   37452           0 :                 return -1;
   37453             :         }
   37454             :         {
   37455           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.fid));
   37456           0 :                 if (PyLong_Check(value)) {
   37457           0 :                         unsigned long long test_var;
   37458           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   37459           0 :                         if (PyErr_Occurred() != NULL) {
   37460           0 :                                 return -1;
   37461             :                         }
   37462           0 :                         if (test_var > uint_max) {
   37463           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37464             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37465           0 :                                 return -1;
   37466             :                         }
   37467           0 :                         object->in.fid = test_var;
   37468             :                 } else {
   37469           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37470             :                           PyLong_Type.tp_name);
   37471           0 :                         return -1;
   37472             :                 }
   37473             :         }
   37474           0 :         return 0;
   37475             : }
   37476             : 
   37477           0 : static PyObject *py_srvsvc_NetFileGetInfo_in_get_level(PyObject *obj, void *closure)
   37478             : {
   37479           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(obj);
   37480           0 :         PyObject *py_level;
   37481           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   37482           0 :         return py_level;
   37483             : }
   37484             : 
   37485           0 : static int py_srvsvc_NetFileGetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   37486             : {
   37487           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(py_obj);
   37488           0 :         if (value == NULL) {
   37489           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   37490           0 :                 return -1;
   37491             :         }
   37492             :         {
   37493           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   37494           0 :                 if (PyLong_Check(value)) {
   37495           0 :                         unsigned long long test_var;
   37496           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   37497           0 :                         if (PyErr_Occurred() != NULL) {
   37498           0 :                                 return -1;
   37499             :                         }
   37500           0 :                         if (test_var > uint_max) {
   37501           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37502             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37503           0 :                                 return -1;
   37504             :                         }
   37505           0 :                         object->in.level = test_var;
   37506             :                 } else {
   37507           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37508             :                           PyLong_Type.tp_name);
   37509           0 :                         return -1;
   37510             :                 }
   37511             :         }
   37512           0 :         return 0;
   37513             : }
   37514             : 
   37515           0 : static PyObject *py_srvsvc_NetFileGetInfo_out_get_info(PyObject *obj, void *closure)
   37516             : {
   37517           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(obj);
   37518           0 :         PyObject *py_info;
   37519           0 :         if (object->out.info == NULL) {
   37520           0 :                 Py_RETURN_NONE;
   37521             :         }
   37522           0 :         py_info = pyrpc_import_union(&srvsvc_NetFileInfo_Type, object->out.info, object->in.level, object->out.info, "union srvsvc_NetFileInfo");
   37523           0 :         if (py_info == NULL) {
   37524           0 :                 return NULL;
   37525             :         }
   37526           0 :         return py_info;
   37527             : }
   37528             : 
   37529           0 : static int py_srvsvc_NetFileGetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   37530             : {
   37531           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(py_obj);
   37532           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   37533           0 :         if (value == NULL) {
   37534           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   37535           0 :                 return -1;
   37536             :         }
   37537           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   37538           0 :         if (object->out.info == NULL) {
   37539           0 :                 PyErr_NoMemory();
   37540           0 :                 return -1;
   37541             :         }
   37542             :         {
   37543           0 :                 union srvsvc_NetFileInfo *info_switch_1;
   37544           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");
   37545           0 :                 if (info_switch_1 == NULL) {
   37546           0 :                         return -1;
   37547             :                 }
   37548           0 :                 object->out.info = info_switch_1;
   37549             :         }
   37550           0 :         return 0;
   37551             : }
   37552             : 
   37553           0 : static PyObject *py_srvsvc_NetFileGetInfo_get_result(PyObject *obj, void *closure)
   37554             : {
   37555           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(obj);
   37556           0 :         PyObject *py_result;
   37557           0 :         py_result = PyErr_FromWERROR(object->out.result);
   37558           0 :         return py_result;
   37559             : }
   37560             : 
   37561           0 : static int py_srvsvc_NetFileGetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   37562             : {
   37563           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(py_obj);
   37564           0 :         if (value == NULL) {
   37565           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   37566           0 :                 return -1;
   37567             :         }
   37568           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   37569           0 :         return 0;
   37570             : }
   37571             : 
   37572             : static PyGetSetDef py_srvsvc_NetFileGetInfo_getsetters[] = {
   37573             :         {
   37574             :                 .name = discard_const_p(char, "in_server_unc"),
   37575             :                 .get = py_srvsvc_NetFileGetInfo_in_get_server_unc,
   37576             :                 .set = py_srvsvc_NetFileGetInfo_in_set_server_unc,
   37577             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   37578             :         },
   37579             :         {
   37580             :                 .name = discard_const_p(char, "in_fid"),
   37581             :                 .get = py_srvsvc_NetFileGetInfo_in_get_fid,
   37582             :                 .set = py_srvsvc_NetFileGetInfo_in_set_fid,
   37583             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   37584             :         },
   37585             :         {
   37586             :                 .name = discard_const_p(char, "in_level"),
   37587             :                 .get = py_srvsvc_NetFileGetInfo_in_get_level,
   37588             :                 .set = py_srvsvc_NetFileGetInfo_in_set_level,
   37589             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   37590             :         },
   37591             :         {
   37592             :                 .name = discard_const_p(char, "out_info"),
   37593             :                 .get = py_srvsvc_NetFileGetInfo_out_get_info,
   37594             :                 .set = py_srvsvc_NetFileGetInfo_out_set_info,
   37595             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetFileInfo")
   37596             :         },
   37597             :         {
   37598             :                 .name = discard_const_p(char, "result"),
   37599             :                 .get = py_srvsvc_NetFileGetInfo_get_result,
   37600             :                 .set = py_srvsvc_NetFileGetInfo_set_result,
   37601             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   37602             :         },
   37603             :         { .name = NULL }
   37604             : };
   37605             : 
   37606           0 : static PyObject *py_srvsvc_NetFileGetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   37607             : {
   37608           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetFileGetInfo, type);
   37609           0 :         struct srvsvc_NetFileGetInfo *_self = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(self);
   37610           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   37611           0 :         _self->out.info = talloc_zero(mem_ctx, union srvsvc_NetFileInfo);
   37612           0 :         return self;
   37613             : }
   37614             : 
   37615           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   37616             : {
   37617             : 
   37618             : 
   37619           0 :         return PyLong_FromLong(10);
   37620             : }
   37621             : 
   37622           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   37623             : {
   37624           0 :         const struct ndr_interface_call *call = NULL;
   37625           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(py_obj);
   37626           0 :         PyObject *ret = NULL;
   37627           0 :         struct ndr_push *push = NULL;
   37628           0 :         DATA_BLOB blob;
   37629           0 :         enum ndr_err_code err;
   37630             : 
   37631           0 :         if (ndr_table_srvsvc.num_calls < 11) {
   37632           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileGetInfo_ndr_pack");
   37633           0 :                 return NULL;
   37634             :         }
   37635           0 :         call = &ndr_table_srvsvc.calls[10];
   37636             : 
   37637           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   37638           0 :         if (push == NULL) {
   37639           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37640           0 :                 return NULL;
   37641             :         }
   37642             : 
   37643           0 :         push->flags |= ndr_push_flags;
   37644             : 
   37645           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   37646           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37647           0 :                 TALLOC_FREE(push);
   37648           0 :                 PyErr_SetNdrError(err);
   37649           0 :                 return NULL;
   37650             :         }
   37651           0 :         blob = ndr_push_blob(push);
   37652           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   37653           0 :         TALLOC_FREE(push);
   37654           0 :         return ret;
   37655             : }
   37656             : 
   37657           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37658             : {
   37659           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37660           0 :         PyObject *bigendian_obj = NULL;
   37661           0 :         PyObject *ndr64_obj = NULL;
   37662           0 :         libndr_flags ndr_push_flags = 0;
   37663             : 
   37664           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   37665             :                 discard_const_p(char *, kwnames),
   37666             :                 &bigendian_obj,
   37667             :                 &ndr64_obj)) {
   37668           0 :                 return NULL;
   37669             :         }
   37670             : 
   37671           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37672           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37673             :         }
   37674           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37675           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37676             :         }
   37677             : 
   37678           0 :         return py_srvsvc_NetFileGetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   37679             : }
   37680             : 
   37681           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37682             : {
   37683           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37684           0 :         PyObject *bigendian_obj = NULL;
   37685           0 :         PyObject *ndr64_obj = NULL;
   37686           0 :         libndr_flags ndr_push_flags = 0;
   37687             : 
   37688           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   37689             :                 discard_const_p(char *, kwnames),
   37690             :                 &bigendian_obj,
   37691             :                 &ndr64_obj)) {
   37692           0 :                 return NULL;
   37693             :         }
   37694             : 
   37695           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37696           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37697             :         }
   37698           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37699           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37700             :         }
   37701             : 
   37702           0 :         return py_srvsvc_NetFileGetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   37703             : }
   37704             : 
   37705           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   37706             : {
   37707           0 :         const struct ndr_interface_call *call = NULL;
   37708           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(py_obj);
   37709           0 :         struct ndr_pull *pull = NULL;
   37710           0 :         enum ndr_err_code err;
   37711             : 
   37712           0 :         if (ndr_table_srvsvc.num_calls < 11) {
   37713           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileGetInfo_ndr_unpack");
   37714           0 :                 return NULL;
   37715             :         }
   37716           0 :         call = &ndr_table_srvsvc.calls[10];
   37717             : 
   37718           0 :         pull = ndr_pull_init_blob(blob, object);
   37719           0 :         if (pull == NULL) {
   37720           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37721           0 :                 return NULL;
   37722             :         }
   37723             : 
   37724           0 :         pull->flags |= ndr_pull_flags;
   37725             : 
   37726           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   37727           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37728           0 :                 TALLOC_FREE(pull);
   37729           0 :                 PyErr_SetNdrError(err);
   37730           0 :                 return NULL;
   37731             :         }
   37732           0 :         if (!allow_remaining) {
   37733           0 :                 uint32_t highest_ofs;
   37734             : 
   37735           0 :                 if (pull->offset > pull->relative_highest_offset) {
   37736           0 :                         highest_ofs = pull->offset;
   37737             :                 } else {
   37738           0 :                         highest_ofs = pull->relative_highest_offset;
   37739             :                 }
   37740           0 :                 if (highest_ofs < pull->data_size) {
   37741           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   37742             :                                 "not all bytes consumed ofs[%u] size[%u]",
   37743             :                                 highest_ofs, pull->data_size);
   37744           0 :                         TALLOC_FREE(pull);
   37745           0 :                         PyErr_SetNdrError(err);
   37746           0 :                         return NULL;
   37747             :                 }
   37748             :         }
   37749             : 
   37750           0 :         TALLOC_FREE(pull);
   37751           0 :         Py_RETURN_NONE;
   37752             : }
   37753             : 
   37754           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37755             : {
   37756           0 :         DATA_BLOB blob;
   37757           0 :         Py_ssize_t blob_length = 0;
   37758           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37759           0 :         PyObject *bigendian_obj = NULL;
   37760           0 :         PyObject *ndr64_obj = NULL;
   37761           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37762           0 :         PyObject *allow_remaining_obj = NULL;
   37763           0 :         bool allow_remaining = false;
   37764             : 
   37765           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   37766             :                 discard_const_p(char *, kwnames),
   37767             :                 &blob.data, &blob_length,
   37768             :                 &bigendian_obj,
   37769             :                 &ndr64_obj,
   37770             :                 &allow_remaining_obj)) {
   37771           0 :                 return NULL;
   37772             :         }
   37773           0 :         blob.length = blob_length;
   37774             : 
   37775           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37776           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37777             :         }
   37778           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37779           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37780             :         }
   37781             : 
   37782           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37783           0 :                 allow_remaining = true;
   37784             :         }
   37785             : 
   37786           0 :         return py_srvsvc_NetFileGetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   37787             : }
   37788             : 
   37789           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37790             : {
   37791           0 :         DATA_BLOB blob;
   37792           0 :         Py_ssize_t blob_length = 0;
   37793           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37794           0 :         PyObject *bigendian_obj = NULL;
   37795           0 :         PyObject *ndr64_obj = NULL;
   37796           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37797           0 :         PyObject *allow_remaining_obj = NULL;
   37798           0 :         bool allow_remaining = false;
   37799             : 
   37800           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   37801             :                 discard_const_p(char *, kwnames),
   37802             :                 &blob.data, &blob_length,
   37803             :                 &bigendian_obj,
   37804             :                 &ndr64_obj,
   37805             :                 &allow_remaining_obj)) {
   37806           0 :                 return NULL;
   37807             :         }
   37808           0 :         blob.length = blob_length;
   37809             : 
   37810           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37811           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37812             :         }
   37813           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37814           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37815             :         }
   37816             : 
   37817           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37818           0 :                 allow_remaining = true;
   37819             :         }
   37820             : 
   37821           0 :         return py_srvsvc_NetFileGetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   37822             : }
   37823             : 
   37824           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   37825             : {
   37826           0 :         const struct ndr_interface_call *call = NULL;
   37827           0 :         struct srvsvc_NetFileGetInfo *object = pytalloc_get_ptr(py_obj);
   37828           0 :         PyObject *ret;
   37829           0 :         char *retstr;
   37830             : 
   37831           0 :         if (ndr_table_srvsvc.num_calls < 11) {
   37832           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileGetInfo_ndr_print");
   37833           0 :                 return NULL;
   37834             :         }
   37835           0 :         call = &ndr_table_srvsvc.calls[10];
   37836             : 
   37837           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   37838           0 :         ret = PyUnicode_FromString(retstr);
   37839           0 :         TALLOC_FREE(retstr);
   37840             : 
   37841           0 :         return ret;
   37842             : }
   37843             : 
   37844           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37845             : {
   37846           0 :         return py_srvsvc_NetFileGetInfo_ndr_print(py_obj, "srvsvc_NetFileGetInfo_in", NDR_IN);
   37847             : }
   37848             : 
   37849           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37850             : {
   37851           0 :         return py_srvsvc_NetFileGetInfo_ndr_print(py_obj, "srvsvc_NetFileGetInfo_out", NDR_OUT);
   37852             : }
   37853             : 
   37854             : static PyMethodDef py_srvsvc_NetFileGetInfo_methods[] = {
   37855             :         { "opnum", (PyCFunction)py_srvsvc_NetFileGetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   37856             :                 "srvsvc.NetFileGetInfo.opnum() -> 10 (0x0a) " },
   37857             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileGetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   37858             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   37859             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileGetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   37860             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   37861             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileGetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   37862             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   37863             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileGetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   37864             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   37865             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetFileGetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   37866             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetFileGetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   37867             :         { NULL, NULL, 0, NULL }
   37868             : };
   37869             : 
   37870             : 
   37871             : static PyTypeObject srvsvc_NetFileGetInfo_Type = {
   37872             :         PyVarObject_HEAD_INIT(NULL, 0)
   37873             :         .tp_name = "srvsvc.NetFileGetInfo",
   37874             :         .tp_getset = py_srvsvc_NetFileGetInfo_getsetters,
   37875             :         .tp_methods = py_srvsvc_NetFileGetInfo_methods,
   37876             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   37877             :         .tp_new = py_srvsvc_NetFileGetInfo_new,
   37878             : };
   37879             : 
   37880           0 : static bool pack_py_srvsvc_NetFileGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetFileGetInfo *r)
   37881             : {
   37882           0 :         PyObject *py_server_unc;
   37883           0 :         PyObject *py_fid;
   37884           0 :         PyObject *py_level;
   37885           0 :         const char *kwnames[] = {
   37886             :                 "server_unc", "fid", "level", NULL
   37887             :         };
   37888             : 
   37889           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetFileGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_fid, &py_level)) {
   37890           0 :                 return false;
   37891             :         }
   37892             : 
   37893           0 :         if (py_server_unc == NULL) {
   37894           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   37895           0 :                 return false;
   37896             :         }
   37897           0 :         if (py_server_unc == Py_None) {
   37898           0 :                 r->in.server_unc = NULL;
   37899             :         } else {
   37900           0 :                 r->in.server_unc = NULL;
   37901             :                 {
   37902           0 :                         const char *test_str;
   37903           0 :                         const char *talloc_str;
   37904           0 :                         PyObject *unicode = NULL;
   37905           0 :                         if (PyUnicode_Check(py_server_unc)) {
   37906           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   37907           0 :                                 if (unicode == NULL) {
   37908           0 :                                         return false;
   37909             :                                 }
   37910           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37911           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   37912           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   37913             :                         } else {
   37914           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   37915           0 :                                 return false;
   37916             :                         }
   37917           0 :                         talloc_str = talloc_strdup(r, test_str);
   37918           0 :                         if (unicode != NULL) {
   37919           0 :                                 Py_DECREF(unicode);
   37920             :                         }
   37921           0 :                         if (talloc_str == NULL) {
   37922           0 :                                 PyErr_NoMemory();
   37923           0 :                                 return false;
   37924             :                         }
   37925           0 :                         r->in.server_unc = talloc_str;
   37926             :                 }
   37927             :         }
   37928           0 :         if (py_fid == NULL) {
   37929           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.fid");
   37930           0 :                 return false;
   37931             :         }
   37932             :         {
   37933           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.fid));
   37934           0 :                 if (PyLong_Check(py_fid)) {
   37935           0 :                         unsigned long long test_var;
   37936           0 :                         test_var = PyLong_AsUnsignedLongLong(py_fid);
   37937           0 :                         if (PyErr_Occurred() != NULL) {
   37938           0 :                                 return false;
   37939             :                         }
   37940           0 :                         if (test_var > uint_max) {
   37941           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37942             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37943           0 :                                 return false;
   37944             :                         }
   37945           0 :                         r->in.fid = test_var;
   37946             :                 } else {
   37947           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37948             :                           PyLong_Type.tp_name);
   37949           0 :                         return false;
   37950             :                 }
   37951             :         }
   37952           0 :         if (py_level == NULL) {
   37953           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   37954           0 :                 return false;
   37955             :         }
   37956             :         {
   37957           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   37958           0 :                 if (PyLong_Check(py_level)) {
   37959           0 :                         unsigned long long test_var;
   37960           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   37961           0 :                         if (PyErr_Occurred() != NULL) {
   37962           0 :                                 return false;
   37963             :                         }
   37964           0 :                         if (test_var > uint_max) {
   37965           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37966             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37967           0 :                                 return false;
   37968             :                         }
   37969           0 :                         r->in.level = test_var;
   37970             :                 } else {
   37971           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37972             :                           PyLong_Type.tp_name);
   37973           0 :                         return false;
   37974             :                 }
   37975             :         }
   37976           0 :         return true;
   37977             : }
   37978             : 
   37979           0 : static PyObject *unpack_py_srvsvc_NetFileGetInfo_args_out(struct srvsvc_NetFileGetInfo *r)
   37980             : {
   37981           0 :         PyObject *result;
   37982           0 :         PyObject *py_info;
   37983           0 :         py_info = pyrpc_import_union(&srvsvc_NetFileInfo_Type, r->out.info, r->in.level, r->out.info, "union srvsvc_NetFileInfo");
   37984           0 :         if (py_info == NULL) {
   37985           0 :                 return NULL;
   37986             :         }
   37987           0 :         result = py_info;
   37988           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   37989           0 :                 PyErr_SetWERROR(r->out.result);
   37990           0 :                 return NULL;
   37991             :         }
   37992             : 
   37993           0 :         return result;
   37994             : }
   37995             : 
   37996             : 
   37997           0 : static PyObject *py_srvsvc_NetFileClose_in_get_server_unc(PyObject *obj, void *closure)
   37998             : {
   37999           0 :         struct srvsvc_NetFileClose *object = pytalloc_get_ptr(obj);
   38000           0 :         PyObject *py_server_unc;
   38001           0 :         if (object->in.server_unc == NULL) {
   38002           0 :                 Py_RETURN_NONE;
   38003             :         }
   38004           0 :         if (object->in.server_unc == NULL) {
   38005           0 :                 py_server_unc = Py_None;
   38006           0 :                 Py_INCREF(py_server_unc);
   38007             :         } else {
   38008           0 :                 if (object->in.server_unc == NULL) {
   38009           0 :                         py_server_unc = Py_None;
   38010           0 :                         Py_INCREF(py_server_unc);
   38011             :                 } else {
   38012           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   38013             :                 }
   38014             :         }
   38015           0 :         return py_server_unc;
   38016             : }
   38017             : 
   38018           0 : static int py_srvsvc_NetFileClose_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   38019             : {
   38020           0 :         struct srvsvc_NetFileClose *object = pytalloc_get_ptr(py_obj);
   38021           0 :         if (value == NULL) {
   38022           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   38023           0 :                 return -1;
   38024             :         }
   38025           0 :         if (value == Py_None) {
   38026           0 :                 object->in.server_unc = NULL;
   38027             :         } else {
   38028           0 :                 object->in.server_unc = NULL;
   38029             :                 {
   38030           0 :                         const char *test_str;
   38031           0 :                         const char *talloc_str;
   38032           0 :                         PyObject *unicode = NULL;
   38033           0 :                         if (PyUnicode_Check(value)) {
   38034           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38035           0 :                                 if (unicode == NULL) {
   38036           0 :                                         return -1;
   38037             :                                 }
   38038           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38039           0 :                         } else if (PyBytes_Check(value)) {
   38040           0 :                                 test_str = PyBytes_AS_STRING(value);
   38041             :                         } else {
   38042           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38043           0 :                                 return -1;
   38044             :                         }
   38045           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38046           0 :                         if (unicode != NULL) {
   38047           0 :                                 Py_DECREF(unicode);
   38048             :                         }
   38049           0 :                         if (talloc_str == NULL) {
   38050           0 :                                 PyErr_NoMemory();
   38051           0 :                                 return -1;
   38052             :                         }
   38053           0 :                         object->in.server_unc = talloc_str;
   38054             :                 }
   38055             :         }
   38056           0 :         return 0;
   38057             : }
   38058             : 
   38059           0 : static PyObject *py_srvsvc_NetFileClose_in_get_fid(PyObject *obj, void *closure)
   38060             : {
   38061           0 :         struct srvsvc_NetFileClose *object = pytalloc_get_ptr(obj);
   38062           0 :         PyObject *py_fid;
   38063           0 :         py_fid = PyLong_FromUnsignedLongLong((uint32_t)(object->in.fid));
   38064           0 :         return py_fid;
   38065             : }
   38066             : 
   38067           0 : static int py_srvsvc_NetFileClose_in_set_fid(PyObject *py_obj, PyObject *value, void *closure)
   38068             : {
   38069           0 :         struct srvsvc_NetFileClose *object = pytalloc_get_ptr(py_obj);
   38070           0 :         if (value == NULL) {
   38071           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.fid");
   38072           0 :                 return -1;
   38073             :         }
   38074             :         {
   38075           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.fid));
   38076           0 :                 if (PyLong_Check(value)) {
   38077           0 :                         unsigned long long test_var;
   38078           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38079           0 :                         if (PyErr_Occurred() != NULL) {
   38080           0 :                                 return -1;
   38081             :                         }
   38082           0 :                         if (test_var > uint_max) {
   38083           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38084             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38085           0 :                                 return -1;
   38086             :                         }
   38087           0 :                         object->in.fid = test_var;
   38088             :                 } else {
   38089           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38090             :                           PyLong_Type.tp_name);
   38091           0 :                         return -1;
   38092             :                 }
   38093             :         }
   38094           0 :         return 0;
   38095             : }
   38096             : 
   38097           0 : static PyObject *py_srvsvc_NetFileClose_get_result(PyObject *obj, void *closure)
   38098             : {
   38099           0 :         struct srvsvc_NetFileClose *object = pytalloc_get_ptr(obj);
   38100           0 :         PyObject *py_result;
   38101           0 :         py_result = PyErr_FromWERROR(object->out.result);
   38102           0 :         return py_result;
   38103             : }
   38104             : 
   38105           0 : static int py_srvsvc_NetFileClose_set_result(PyObject *py_obj, PyObject *value, void *closure)
   38106             : {
   38107           0 :         struct srvsvc_NetFileClose *object = pytalloc_get_ptr(py_obj);
   38108           0 :         if (value == NULL) {
   38109           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   38110           0 :                 return -1;
   38111             :         }
   38112           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   38113           0 :         return 0;
   38114             : }
   38115             : 
   38116             : static PyGetSetDef py_srvsvc_NetFileClose_getsetters[] = {
   38117             :         {
   38118             :                 .name = discard_const_p(char, "in_server_unc"),
   38119             :                 .get = py_srvsvc_NetFileClose_in_get_server_unc,
   38120             :                 .set = py_srvsvc_NetFileClose_in_set_server_unc,
   38121             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   38122             :         },
   38123             :         {
   38124             :                 .name = discard_const_p(char, "in_fid"),
   38125             :                 .get = py_srvsvc_NetFileClose_in_get_fid,
   38126             :                 .set = py_srvsvc_NetFileClose_in_set_fid,
   38127             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   38128             :         },
   38129             :         {
   38130             :                 .name = discard_const_p(char, "result"),
   38131             :                 .get = py_srvsvc_NetFileClose_get_result,
   38132             :                 .set = py_srvsvc_NetFileClose_set_result,
   38133             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   38134             :         },
   38135             :         { .name = NULL }
   38136             : };
   38137             : 
   38138           0 : static PyObject *py_srvsvc_NetFileClose_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   38139             : {
   38140           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetFileClose, type);
   38141           0 :         return self;
   38142             : }
   38143             : 
   38144           0 : static PyObject *py_srvsvc_NetFileClose_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   38145             : {
   38146             : 
   38147             : 
   38148           0 :         return PyLong_FromLong(11);
   38149             : }
   38150             : 
   38151           0 : static PyObject *py_srvsvc_NetFileClose_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   38152             : {
   38153           0 :         const struct ndr_interface_call *call = NULL;
   38154           0 :         struct srvsvc_NetFileClose *object = pytalloc_get_ptr(py_obj);
   38155           0 :         PyObject *ret = NULL;
   38156           0 :         struct ndr_push *push = NULL;
   38157           0 :         DATA_BLOB blob;
   38158           0 :         enum ndr_err_code err;
   38159             : 
   38160           0 :         if (ndr_table_srvsvc.num_calls < 12) {
   38161           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileClose_ndr_pack");
   38162           0 :                 return NULL;
   38163             :         }
   38164           0 :         call = &ndr_table_srvsvc.calls[11];
   38165             : 
   38166           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   38167           0 :         if (push == NULL) {
   38168           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38169           0 :                 return NULL;
   38170             :         }
   38171             : 
   38172           0 :         push->flags |= ndr_push_flags;
   38173             : 
   38174           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   38175           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38176           0 :                 TALLOC_FREE(push);
   38177           0 :                 PyErr_SetNdrError(err);
   38178           0 :                 return NULL;
   38179             :         }
   38180           0 :         blob = ndr_push_blob(push);
   38181           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   38182           0 :         TALLOC_FREE(push);
   38183           0 :         return ret;
   38184             : }
   38185             : 
   38186           0 : static PyObject *py_srvsvc_NetFileClose_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38187             : {
   38188           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38189           0 :         PyObject *bigendian_obj = NULL;
   38190           0 :         PyObject *ndr64_obj = NULL;
   38191           0 :         libndr_flags ndr_push_flags = 0;
   38192             : 
   38193           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   38194             :                 discard_const_p(char *, kwnames),
   38195             :                 &bigendian_obj,
   38196             :                 &ndr64_obj)) {
   38197           0 :                 return NULL;
   38198             :         }
   38199             : 
   38200           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38201           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38202             :         }
   38203           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38204           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38205             :         }
   38206             : 
   38207           0 :         return py_srvsvc_NetFileClose_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   38208             : }
   38209             : 
   38210           0 : static PyObject *py_srvsvc_NetFileClose_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38211             : {
   38212           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38213           0 :         PyObject *bigendian_obj = NULL;
   38214           0 :         PyObject *ndr64_obj = NULL;
   38215           0 :         libndr_flags ndr_push_flags = 0;
   38216             : 
   38217           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   38218             :                 discard_const_p(char *, kwnames),
   38219             :                 &bigendian_obj,
   38220             :                 &ndr64_obj)) {
   38221           0 :                 return NULL;
   38222             :         }
   38223             : 
   38224           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38225           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38226             :         }
   38227           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38228           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38229             :         }
   38230             : 
   38231           0 :         return py_srvsvc_NetFileClose_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   38232             : }
   38233             : 
   38234           0 : static PyObject *py_srvsvc_NetFileClose_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   38235             : {
   38236           0 :         const struct ndr_interface_call *call = NULL;
   38237           0 :         struct srvsvc_NetFileClose *object = pytalloc_get_ptr(py_obj);
   38238           0 :         struct ndr_pull *pull = NULL;
   38239           0 :         enum ndr_err_code err;
   38240             : 
   38241           0 :         if (ndr_table_srvsvc.num_calls < 12) {
   38242           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileClose_ndr_unpack");
   38243           0 :                 return NULL;
   38244             :         }
   38245           0 :         call = &ndr_table_srvsvc.calls[11];
   38246             : 
   38247           0 :         pull = ndr_pull_init_blob(blob, object);
   38248           0 :         if (pull == NULL) {
   38249           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38250           0 :                 return NULL;
   38251             :         }
   38252             : 
   38253           0 :         pull->flags |= ndr_pull_flags;
   38254             : 
   38255           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   38256           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38257           0 :                 TALLOC_FREE(pull);
   38258           0 :                 PyErr_SetNdrError(err);
   38259           0 :                 return NULL;
   38260             :         }
   38261           0 :         if (!allow_remaining) {
   38262           0 :                 uint32_t highest_ofs;
   38263             : 
   38264           0 :                 if (pull->offset > pull->relative_highest_offset) {
   38265           0 :                         highest_ofs = pull->offset;
   38266             :                 } else {
   38267           0 :                         highest_ofs = pull->relative_highest_offset;
   38268             :                 }
   38269           0 :                 if (highest_ofs < pull->data_size) {
   38270           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   38271             :                                 "not all bytes consumed ofs[%u] size[%u]",
   38272             :                                 highest_ofs, pull->data_size);
   38273           0 :                         TALLOC_FREE(pull);
   38274           0 :                         PyErr_SetNdrError(err);
   38275           0 :                         return NULL;
   38276             :                 }
   38277             :         }
   38278             : 
   38279           0 :         TALLOC_FREE(pull);
   38280           0 :         Py_RETURN_NONE;
   38281             : }
   38282             : 
   38283           0 : static PyObject *py_srvsvc_NetFileClose_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38284             : {
   38285           0 :         DATA_BLOB blob;
   38286           0 :         Py_ssize_t blob_length = 0;
   38287           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   38288           0 :         PyObject *bigendian_obj = NULL;
   38289           0 :         PyObject *ndr64_obj = NULL;
   38290           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   38291           0 :         PyObject *allow_remaining_obj = NULL;
   38292           0 :         bool allow_remaining = false;
   38293             : 
   38294           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   38295             :                 discard_const_p(char *, kwnames),
   38296             :                 &blob.data, &blob_length,
   38297             :                 &bigendian_obj,
   38298             :                 &ndr64_obj,
   38299             :                 &allow_remaining_obj)) {
   38300           0 :                 return NULL;
   38301             :         }
   38302           0 :         blob.length = blob_length;
   38303             : 
   38304           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38305           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   38306             :         }
   38307           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38308           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   38309             :         }
   38310             : 
   38311           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   38312           0 :                 allow_remaining = true;
   38313             :         }
   38314             : 
   38315           0 :         return py_srvsvc_NetFileClose_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   38316             : }
   38317             : 
   38318           0 : static PyObject *py_srvsvc_NetFileClose_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38319             : {
   38320           0 :         DATA_BLOB blob;
   38321           0 :         Py_ssize_t blob_length = 0;
   38322           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   38323           0 :         PyObject *bigendian_obj = NULL;
   38324           0 :         PyObject *ndr64_obj = NULL;
   38325           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   38326           0 :         PyObject *allow_remaining_obj = NULL;
   38327           0 :         bool allow_remaining = false;
   38328             : 
   38329           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   38330             :                 discard_const_p(char *, kwnames),
   38331             :                 &blob.data, &blob_length,
   38332             :                 &bigendian_obj,
   38333             :                 &ndr64_obj,
   38334             :                 &allow_remaining_obj)) {
   38335           0 :                 return NULL;
   38336             :         }
   38337           0 :         blob.length = blob_length;
   38338             : 
   38339           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38340           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   38341             :         }
   38342           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38343           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   38344             :         }
   38345             : 
   38346           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   38347           0 :                 allow_remaining = true;
   38348             :         }
   38349             : 
   38350           0 :         return py_srvsvc_NetFileClose_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   38351             : }
   38352             : 
   38353           0 : static PyObject *py_srvsvc_NetFileClose_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   38354             : {
   38355           0 :         const struct ndr_interface_call *call = NULL;
   38356           0 :         struct srvsvc_NetFileClose *object = pytalloc_get_ptr(py_obj);
   38357           0 :         PyObject *ret;
   38358           0 :         char *retstr;
   38359             : 
   38360           0 :         if (ndr_table_srvsvc.num_calls < 12) {
   38361           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileClose_ndr_print");
   38362           0 :                 return NULL;
   38363             :         }
   38364           0 :         call = &ndr_table_srvsvc.calls[11];
   38365             : 
   38366           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   38367           0 :         ret = PyUnicode_FromString(retstr);
   38368           0 :         TALLOC_FREE(retstr);
   38369             : 
   38370           0 :         return ret;
   38371             : }
   38372             : 
   38373           0 : static PyObject *py_srvsvc_NetFileClose_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   38374             : {
   38375           0 :         return py_srvsvc_NetFileClose_ndr_print(py_obj, "srvsvc_NetFileClose_in", NDR_IN);
   38376             : }
   38377             : 
   38378           0 : static PyObject *py_srvsvc_NetFileClose_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   38379             : {
   38380           0 :         return py_srvsvc_NetFileClose_ndr_print(py_obj, "srvsvc_NetFileClose_out", NDR_OUT);
   38381             : }
   38382             : 
   38383             : static PyMethodDef py_srvsvc_NetFileClose_methods[] = {
   38384             :         { "opnum", (PyCFunction)py_srvsvc_NetFileClose_ndr_opnum, METH_NOARGS|METH_CLASS,
   38385             :                 "srvsvc.NetFileClose.opnum() -> 11 (0x0b) " },
   38386             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileClose_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   38387             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   38388             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileClose_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   38389             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   38390             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileClose_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   38391             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   38392             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileClose_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   38393             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   38394             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetFileClose_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   38395             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetFileClose_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   38396             :         { NULL, NULL, 0, NULL }
   38397             : };
   38398             : 
   38399             : 
   38400             : static PyTypeObject srvsvc_NetFileClose_Type = {
   38401             :         PyVarObject_HEAD_INIT(NULL, 0)
   38402             :         .tp_name = "srvsvc.NetFileClose",
   38403             :         .tp_getset = py_srvsvc_NetFileClose_getsetters,
   38404             :         .tp_methods = py_srvsvc_NetFileClose_methods,
   38405             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   38406             :         .tp_new = py_srvsvc_NetFileClose_new,
   38407             : };
   38408             : 
   38409           0 : static bool pack_py_srvsvc_NetFileClose_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetFileClose *r)
   38410             : {
   38411           0 :         PyObject *py_server_unc;
   38412           0 :         PyObject *py_fid;
   38413           0 :         const char *kwnames[] = {
   38414             :                 "server_unc", "fid", NULL
   38415             :         };
   38416             : 
   38417           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:srvsvc_NetFileClose", discard_const_p(char *, kwnames), &py_server_unc, &py_fid)) {
   38418           0 :                 return false;
   38419             :         }
   38420             : 
   38421           0 :         if (py_server_unc == NULL) {
   38422           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   38423           0 :                 return false;
   38424             :         }
   38425           0 :         if (py_server_unc == Py_None) {
   38426           0 :                 r->in.server_unc = NULL;
   38427             :         } else {
   38428           0 :                 r->in.server_unc = NULL;
   38429             :                 {
   38430           0 :                         const char *test_str;
   38431           0 :                         const char *talloc_str;
   38432           0 :                         PyObject *unicode = NULL;
   38433           0 :                         if (PyUnicode_Check(py_server_unc)) {
   38434           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   38435           0 :                                 if (unicode == NULL) {
   38436           0 :                                         return false;
   38437             :                                 }
   38438           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38439           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   38440           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   38441             :                         } else {
   38442           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   38443           0 :                                 return false;
   38444             :                         }
   38445           0 :                         talloc_str = talloc_strdup(r, test_str);
   38446           0 :                         if (unicode != NULL) {
   38447           0 :                                 Py_DECREF(unicode);
   38448             :                         }
   38449           0 :                         if (talloc_str == NULL) {
   38450           0 :                                 PyErr_NoMemory();
   38451           0 :                                 return false;
   38452             :                         }
   38453           0 :                         r->in.server_unc = talloc_str;
   38454             :                 }
   38455             :         }
   38456           0 :         if (py_fid == NULL) {
   38457           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.fid");
   38458           0 :                 return false;
   38459             :         }
   38460             :         {
   38461           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.fid));
   38462           0 :                 if (PyLong_Check(py_fid)) {
   38463           0 :                         unsigned long long test_var;
   38464           0 :                         test_var = PyLong_AsUnsignedLongLong(py_fid);
   38465           0 :                         if (PyErr_Occurred() != NULL) {
   38466           0 :                                 return false;
   38467             :                         }
   38468           0 :                         if (test_var > uint_max) {
   38469           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38470             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38471           0 :                                 return false;
   38472             :                         }
   38473           0 :                         r->in.fid = test_var;
   38474             :                 } else {
   38475           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38476             :                           PyLong_Type.tp_name);
   38477           0 :                         return false;
   38478             :                 }
   38479             :         }
   38480           0 :         return true;
   38481             : }
   38482             : 
   38483           0 : static PyObject *unpack_py_srvsvc_NetFileClose_args_out(struct srvsvc_NetFileClose *r)
   38484             : {
   38485           0 :         PyObject *result;
   38486           0 :         result = Py_None;
   38487           0 :         Py_INCREF(result);
   38488           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   38489           0 :                 PyErr_SetWERROR(r->out.result);
   38490           0 :                 return NULL;
   38491             :         }
   38492             : 
   38493           0 :         return result;
   38494             : }
   38495             : 
   38496             : 
   38497           0 : static PyObject *py_srvsvc_NetSessEnum_in_get_server_unc(PyObject *obj, void *closure)
   38498             : {
   38499           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(obj);
   38500           0 :         PyObject *py_server_unc;
   38501           0 :         if (object->in.server_unc == NULL) {
   38502           0 :                 Py_RETURN_NONE;
   38503             :         }
   38504           0 :         if (object->in.server_unc == NULL) {
   38505           0 :                 py_server_unc = Py_None;
   38506           0 :                 Py_INCREF(py_server_unc);
   38507             :         } else {
   38508           0 :                 if (object->in.server_unc == NULL) {
   38509           0 :                         py_server_unc = Py_None;
   38510           0 :                         Py_INCREF(py_server_unc);
   38511             :                 } else {
   38512           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   38513             :                 }
   38514             :         }
   38515           0 :         return py_server_unc;
   38516             : }
   38517             : 
   38518           0 : static int py_srvsvc_NetSessEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   38519             : {
   38520           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   38521           0 :         if (value == NULL) {
   38522           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   38523           0 :                 return -1;
   38524             :         }
   38525           0 :         if (value == Py_None) {
   38526           0 :                 object->in.server_unc = NULL;
   38527             :         } else {
   38528           0 :                 object->in.server_unc = NULL;
   38529             :                 {
   38530           0 :                         const char *test_str;
   38531           0 :                         const char *talloc_str;
   38532           0 :                         PyObject *unicode = NULL;
   38533           0 :                         if (PyUnicode_Check(value)) {
   38534           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38535           0 :                                 if (unicode == NULL) {
   38536           0 :                                         return -1;
   38537             :                                 }
   38538           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38539           0 :                         } else if (PyBytes_Check(value)) {
   38540           0 :                                 test_str = PyBytes_AS_STRING(value);
   38541             :                         } else {
   38542           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38543           0 :                                 return -1;
   38544             :                         }
   38545           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38546           0 :                         if (unicode != NULL) {
   38547           0 :                                 Py_DECREF(unicode);
   38548             :                         }
   38549           0 :                         if (talloc_str == NULL) {
   38550           0 :                                 PyErr_NoMemory();
   38551           0 :                                 return -1;
   38552             :                         }
   38553           0 :                         object->in.server_unc = talloc_str;
   38554             :                 }
   38555             :         }
   38556           0 :         return 0;
   38557             : }
   38558             : 
   38559           0 : static PyObject *py_srvsvc_NetSessEnum_in_get_client(PyObject *obj, void *closure)
   38560             : {
   38561           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(obj);
   38562           0 :         PyObject *py_client;
   38563           0 :         if (object->in.client == NULL) {
   38564           0 :                 Py_RETURN_NONE;
   38565             :         }
   38566           0 :         if (object->in.client == NULL) {
   38567           0 :                 py_client = Py_None;
   38568           0 :                 Py_INCREF(py_client);
   38569             :         } else {
   38570           0 :                 if (object->in.client == NULL) {
   38571           0 :                         py_client = Py_None;
   38572           0 :                         Py_INCREF(py_client);
   38573             :                 } else {
   38574           0 :                         py_client = PyUnicode_Decode(object->in.client, strlen(object->in.client), "utf-8", "ignore");
   38575             :                 }
   38576             :         }
   38577           0 :         return py_client;
   38578             : }
   38579             : 
   38580           0 : static int py_srvsvc_NetSessEnum_in_set_client(PyObject *py_obj, PyObject *value, void *closure)
   38581             : {
   38582           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   38583           0 :         if (value == NULL) {
   38584           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.client");
   38585           0 :                 return -1;
   38586             :         }
   38587           0 :         if (value == Py_None) {
   38588           0 :                 object->in.client = NULL;
   38589             :         } else {
   38590           0 :                 object->in.client = NULL;
   38591             :                 {
   38592           0 :                         const char *test_str;
   38593           0 :                         const char *talloc_str;
   38594           0 :                         PyObject *unicode = NULL;
   38595           0 :                         if (PyUnicode_Check(value)) {
   38596           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38597           0 :                                 if (unicode == NULL) {
   38598           0 :                                         return -1;
   38599             :                                 }
   38600           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38601           0 :                         } else if (PyBytes_Check(value)) {
   38602           0 :                                 test_str = PyBytes_AS_STRING(value);
   38603             :                         } else {
   38604           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38605           0 :                                 return -1;
   38606             :                         }
   38607           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38608           0 :                         if (unicode != NULL) {
   38609           0 :                                 Py_DECREF(unicode);
   38610             :                         }
   38611           0 :                         if (talloc_str == NULL) {
   38612           0 :                                 PyErr_NoMemory();
   38613           0 :                                 return -1;
   38614             :                         }
   38615           0 :                         object->in.client = talloc_str;
   38616             :                 }
   38617             :         }
   38618           0 :         return 0;
   38619             : }
   38620             : 
   38621           0 : static PyObject *py_srvsvc_NetSessEnum_in_get_user(PyObject *obj, void *closure)
   38622             : {
   38623           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(obj);
   38624           0 :         PyObject *py_user;
   38625           0 :         if (object->in.user == NULL) {
   38626           0 :                 Py_RETURN_NONE;
   38627             :         }
   38628           0 :         if (object->in.user == NULL) {
   38629           0 :                 py_user = Py_None;
   38630           0 :                 Py_INCREF(py_user);
   38631             :         } else {
   38632           0 :                 if (object->in.user == NULL) {
   38633           0 :                         py_user = Py_None;
   38634           0 :                         Py_INCREF(py_user);
   38635             :                 } else {
   38636           0 :                         py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   38637             :                 }
   38638             :         }
   38639           0 :         return py_user;
   38640             : }
   38641             : 
   38642           0 : static int py_srvsvc_NetSessEnum_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   38643             : {
   38644           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   38645           0 :         if (value == NULL) {
   38646           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.user");
   38647           0 :                 return -1;
   38648             :         }
   38649           0 :         if (value == Py_None) {
   38650           0 :                 object->in.user = NULL;
   38651             :         } else {
   38652           0 :                 object->in.user = NULL;
   38653             :                 {
   38654           0 :                         const char *test_str;
   38655           0 :                         const char *talloc_str;
   38656           0 :                         PyObject *unicode = NULL;
   38657           0 :                         if (PyUnicode_Check(value)) {
   38658           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38659           0 :                                 if (unicode == NULL) {
   38660           0 :                                         return -1;
   38661             :                                 }
   38662           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38663           0 :                         } else if (PyBytes_Check(value)) {
   38664           0 :                                 test_str = PyBytes_AS_STRING(value);
   38665             :                         } else {
   38666           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38667           0 :                                 return -1;
   38668             :                         }
   38669           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38670           0 :                         if (unicode != NULL) {
   38671           0 :                                 Py_DECREF(unicode);
   38672             :                         }
   38673           0 :                         if (talloc_str == NULL) {
   38674           0 :                                 PyErr_NoMemory();
   38675           0 :                                 return -1;
   38676             :                         }
   38677           0 :                         object->in.user = talloc_str;
   38678             :                 }
   38679             :         }
   38680           0 :         return 0;
   38681             : }
   38682             : 
   38683           0 : static PyObject *py_srvsvc_NetSessEnum_in_get_info_ctr(PyObject *obj, void *closure)
   38684             : {
   38685           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(obj);
   38686           0 :         PyObject *py_info_ctr;
   38687           0 :         if (object->in.info_ctr == NULL) {
   38688           0 :                 Py_RETURN_NONE;
   38689             :         }
   38690           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetSessInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   38691           0 :         return py_info_ctr;
   38692             : }
   38693             : 
   38694           0 : static int py_srvsvc_NetSessEnum_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   38695             : {
   38696           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   38697           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   38698           0 :         if (value == NULL) {
   38699           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info_ctr");
   38700           0 :                 return -1;
   38701             :         }
   38702           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   38703           0 :         if (object->in.info_ctr == NULL) {
   38704           0 :                 PyErr_NoMemory();
   38705           0 :                 return -1;
   38706             :         }
   38707           0 :         PY_CHECK_TYPE(&srvsvc_NetSessInfoCtr_Type, value, return -1;);
   38708           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   38709           0 :                 PyErr_NoMemory();
   38710           0 :                 return -1;
   38711             :         }
   38712           0 :         object->in.info_ctr = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(value);
   38713           0 :         return 0;
   38714             : }
   38715             : 
   38716           0 : static PyObject *py_srvsvc_NetSessEnum_out_get_info_ctr(PyObject *obj, void *closure)
   38717             : {
   38718           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(obj);
   38719           0 :         PyObject *py_info_ctr;
   38720           0 :         if (object->out.info_ctr == NULL) {
   38721           0 :                 Py_RETURN_NONE;
   38722             :         }
   38723           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetSessInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   38724           0 :         return py_info_ctr;
   38725             : }
   38726             : 
   38727           0 : static int py_srvsvc_NetSessEnum_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   38728             : {
   38729           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   38730           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   38731           0 :         if (value == NULL) {
   38732           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info_ctr");
   38733           0 :                 return -1;
   38734             :         }
   38735           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   38736           0 :         if (object->out.info_ctr == NULL) {
   38737           0 :                 PyErr_NoMemory();
   38738           0 :                 return -1;
   38739             :         }
   38740           0 :         PY_CHECK_TYPE(&srvsvc_NetSessInfoCtr_Type, value, return -1;);
   38741           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   38742           0 :                 PyErr_NoMemory();
   38743           0 :                 return -1;
   38744             :         }
   38745           0 :         object->out.info_ctr = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(value);
   38746           0 :         return 0;
   38747             : }
   38748             : 
   38749           0 : static PyObject *py_srvsvc_NetSessEnum_in_get_max_buffer(PyObject *obj, void *closure)
   38750             : {
   38751           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(obj);
   38752           0 :         PyObject *py_max_buffer;
   38753           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)(object->in.max_buffer));
   38754           0 :         return py_max_buffer;
   38755             : }
   38756             : 
   38757           0 : static int py_srvsvc_NetSessEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   38758             : {
   38759           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   38760           0 :         if (value == NULL) {
   38761           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.max_buffer");
   38762           0 :                 return -1;
   38763             :         }
   38764             :         {
   38765           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   38766           0 :                 if (PyLong_Check(value)) {
   38767           0 :                         unsigned long long test_var;
   38768           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38769           0 :                         if (PyErr_Occurred() != NULL) {
   38770           0 :                                 return -1;
   38771             :                         }
   38772           0 :                         if (test_var > uint_max) {
   38773           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38774             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38775           0 :                                 return -1;
   38776             :                         }
   38777           0 :                         object->in.max_buffer = test_var;
   38778             :                 } else {
   38779           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38780             :                           PyLong_Type.tp_name);
   38781           0 :                         return -1;
   38782             :                 }
   38783             :         }
   38784           0 :         return 0;
   38785             : }
   38786             : 
   38787           0 : static PyObject *py_srvsvc_NetSessEnum_out_get_totalentries(PyObject *obj, void *closure)
   38788             : {
   38789           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(obj);
   38790           0 :         PyObject *py_totalentries;
   38791           0 :         if (object->out.totalentries == NULL) {
   38792           0 :                 Py_RETURN_NONE;
   38793             :         }
   38794           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.totalentries));
   38795           0 :         return py_totalentries;
   38796             : }
   38797             : 
   38798           0 : static int py_srvsvc_NetSessEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   38799             : {
   38800           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   38801           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   38802           0 :         if (value == NULL) {
   38803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.totalentries");
   38804           0 :                 return -1;
   38805             :         }
   38806           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   38807           0 :         if (object->out.totalentries == NULL) {
   38808           0 :                 PyErr_NoMemory();
   38809           0 :                 return -1;
   38810             :         }
   38811             :         {
   38812           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   38813           0 :                 if (PyLong_Check(value)) {
   38814           0 :                         unsigned long long test_var;
   38815           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38816           0 :                         if (PyErr_Occurred() != NULL) {
   38817           0 :                                 return -1;
   38818             :                         }
   38819           0 :                         if (test_var > uint_max) {
   38820           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38821             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38822           0 :                                 return -1;
   38823             :                         }
   38824           0 :                         *object->out.totalentries = test_var;
   38825             :                 } else {
   38826           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38827             :                           PyLong_Type.tp_name);
   38828           0 :                         return -1;
   38829             :                 }
   38830             :         }
   38831           0 :         return 0;
   38832             : }
   38833             : 
   38834           0 : static PyObject *py_srvsvc_NetSessEnum_in_get_resume_handle(PyObject *obj, void *closure)
   38835             : {
   38836           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(obj);
   38837           0 :         PyObject *py_resume_handle;
   38838           0 :         if (object->in.resume_handle == NULL) {
   38839           0 :                 Py_RETURN_NONE;
   38840             :         }
   38841           0 :         if (object->in.resume_handle == NULL) {
   38842           0 :                 py_resume_handle = Py_None;
   38843           0 :                 Py_INCREF(py_resume_handle);
   38844             :         } else {
   38845           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.resume_handle));
   38846             :         }
   38847           0 :         return py_resume_handle;
   38848             : }
   38849             : 
   38850           0 : static int py_srvsvc_NetSessEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   38851             : {
   38852           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   38853           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   38854           0 :         if (value == NULL) {
   38855           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.resume_handle");
   38856           0 :                 return -1;
   38857             :         }
   38858           0 :         if (value == Py_None) {
   38859           0 :                 object->in.resume_handle = NULL;
   38860             :         } else {
   38861           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   38862           0 :                 if (object->in.resume_handle == NULL) {
   38863           0 :                         PyErr_NoMemory();
   38864           0 :                         return -1;
   38865             :                 }
   38866             :                 {
   38867           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   38868           0 :                         if (PyLong_Check(value)) {
   38869           0 :                                 unsigned long long test_var;
   38870           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   38871           0 :                                 if (PyErr_Occurred() != NULL) {
   38872           0 :                                         return -1;
   38873             :                                 }
   38874           0 :                                 if (test_var > uint_max) {
   38875           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38876             :                                           PyLong_Type.tp_name, uint_max, test_var);
   38877           0 :                                         return -1;
   38878             :                                 }
   38879           0 :                                 *object->in.resume_handle = test_var;
   38880             :                         } else {
   38881           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   38882             :                                   PyLong_Type.tp_name);
   38883           0 :                                 return -1;
   38884             :                         }
   38885             :                 }
   38886             :         }
   38887           0 :         return 0;
   38888             : }
   38889             : 
   38890           0 : static PyObject *py_srvsvc_NetSessEnum_out_get_resume_handle(PyObject *obj, void *closure)
   38891             : {
   38892           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(obj);
   38893           0 :         PyObject *py_resume_handle;
   38894           0 :         if (object->out.resume_handle == NULL) {
   38895           0 :                 Py_RETURN_NONE;
   38896             :         }
   38897           0 :         if (object->out.resume_handle == NULL) {
   38898           0 :                 py_resume_handle = Py_None;
   38899           0 :                 Py_INCREF(py_resume_handle);
   38900             :         } else {
   38901           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.resume_handle));
   38902             :         }
   38903           0 :         return py_resume_handle;
   38904             : }
   38905             : 
   38906           0 : static int py_srvsvc_NetSessEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   38907             : {
   38908           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   38909           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   38910           0 :         if (value == NULL) {
   38911           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.resume_handle");
   38912           0 :                 return -1;
   38913             :         }
   38914           0 :         if (value == Py_None) {
   38915           0 :                 object->out.resume_handle = NULL;
   38916             :         } else {
   38917           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   38918           0 :                 if (object->out.resume_handle == NULL) {
   38919           0 :                         PyErr_NoMemory();
   38920           0 :                         return -1;
   38921             :                 }
   38922             :                 {
   38923           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   38924           0 :                         if (PyLong_Check(value)) {
   38925           0 :                                 unsigned long long test_var;
   38926           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   38927           0 :                                 if (PyErr_Occurred() != NULL) {
   38928           0 :                                         return -1;
   38929             :                                 }
   38930           0 :                                 if (test_var > uint_max) {
   38931           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38932             :                                           PyLong_Type.tp_name, uint_max, test_var);
   38933           0 :                                         return -1;
   38934             :                                 }
   38935           0 :                                 *object->out.resume_handle = test_var;
   38936             :                         } else {
   38937           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   38938             :                                   PyLong_Type.tp_name);
   38939           0 :                                 return -1;
   38940             :                         }
   38941             :                 }
   38942             :         }
   38943           0 :         return 0;
   38944             : }
   38945             : 
   38946           0 : static PyObject *py_srvsvc_NetSessEnum_get_result(PyObject *obj, void *closure)
   38947             : {
   38948           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(obj);
   38949           0 :         PyObject *py_result;
   38950           0 :         py_result = PyErr_FromWERROR(object->out.result);
   38951           0 :         return py_result;
   38952             : }
   38953             : 
   38954           0 : static int py_srvsvc_NetSessEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   38955             : {
   38956           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   38957           0 :         if (value == NULL) {
   38958           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   38959           0 :                 return -1;
   38960             :         }
   38961           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   38962           0 :         return 0;
   38963             : }
   38964             : 
   38965             : static PyGetSetDef py_srvsvc_NetSessEnum_getsetters[] = {
   38966             :         {
   38967             :                 .name = discard_const_p(char, "in_server_unc"),
   38968             :                 .get = py_srvsvc_NetSessEnum_in_get_server_unc,
   38969             :                 .set = py_srvsvc_NetSessEnum_in_set_server_unc,
   38970             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   38971             :         },
   38972             :         {
   38973             :                 .name = discard_const_p(char, "in_client"),
   38974             :                 .get = py_srvsvc_NetSessEnum_in_get_client,
   38975             :                 .set = py_srvsvc_NetSessEnum_in_set_client,
   38976             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   38977             :         },
   38978             :         {
   38979             :                 .name = discard_const_p(char, "in_user"),
   38980             :                 .get = py_srvsvc_NetSessEnum_in_get_user,
   38981             :                 .set = py_srvsvc_NetSessEnum_in_set_user,
   38982             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   38983             :         },
   38984             :         {
   38985             :                 .name = discard_const_p(char, "in_info_ctr"),
   38986             :                 .get = py_srvsvc_NetSessEnum_in_get_info_ctr,
   38987             :                 .set = py_srvsvc_NetSessEnum_in_set_info_ctr,
   38988             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfoCtr")
   38989             :         },
   38990             :         {
   38991             :                 .name = discard_const_p(char, "out_info_ctr"),
   38992             :                 .get = py_srvsvc_NetSessEnum_out_get_info_ctr,
   38993             :                 .set = py_srvsvc_NetSessEnum_out_set_info_ctr,
   38994             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfoCtr")
   38995             :         },
   38996             :         {
   38997             :                 .name = discard_const_p(char, "in_max_buffer"),
   38998             :                 .get = py_srvsvc_NetSessEnum_in_get_max_buffer,
   38999             :                 .set = py_srvsvc_NetSessEnum_in_set_max_buffer,
   39000             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39001             :         },
   39002             :         {
   39003             :                 .name = discard_const_p(char, "out_totalentries"),
   39004             :                 .get = py_srvsvc_NetSessEnum_out_get_totalentries,
   39005             :                 .set = py_srvsvc_NetSessEnum_out_set_totalentries,
   39006             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39007             :         },
   39008             :         {
   39009             :                 .name = discard_const_p(char, "in_resume_handle"),
   39010             :                 .get = py_srvsvc_NetSessEnum_in_get_resume_handle,
   39011             :                 .set = py_srvsvc_NetSessEnum_in_set_resume_handle,
   39012             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39013             :         },
   39014             :         {
   39015             :                 .name = discard_const_p(char, "out_resume_handle"),
   39016             :                 .get = py_srvsvc_NetSessEnum_out_get_resume_handle,
   39017             :                 .set = py_srvsvc_NetSessEnum_out_set_resume_handle,
   39018             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39019             :         },
   39020             :         {
   39021             :                 .name = discard_const_p(char, "result"),
   39022             :                 .get = py_srvsvc_NetSessEnum_get_result,
   39023             :                 .set = py_srvsvc_NetSessEnum_set_result,
   39024             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   39025             :         },
   39026             :         { .name = NULL }
   39027             : };
   39028             : 
   39029           0 : static PyObject *py_srvsvc_NetSessEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   39030             : {
   39031           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetSessEnum, type);
   39032           0 :         struct srvsvc_NetSessEnum *_self = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(self);
   39033           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   39034           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetSessInfoCtr);
   39035           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetSessInfoCtr);
   39036           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   39037           0 :         return self;
   39038             : }
   39039             : 
   39040           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   39041             : {
   39042             : 
   39043             : 
   39044           0 :         return PyLong_FromLong(12);
   39045             : }
   39046             : 
   39047           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   39048             : {
   39049           0 :         const struct ndr_interface_call *call = NULL;
   39050           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   39051           0 :         PyObject *ret = NULL;
   39052           0 :         struct ndr_push *push = NULL;
   39053           0 :         DATA_BLOB blob;
   39054           0 :         enum ndr_err_code err;
   39055             : 
   39056           0 :         if (ndr_table_srvsvc.num_calls < 13) {
   39057           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSessEnum_ndr_pack");
   39058           0 :                 return NULL;
   39059             :         }
   39060           0 :         call = &ndr_table_srvsvc.calls[12];
   39061             : 
   39062           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   39063           0 :         if (push == NULL) {
   39064           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39065           0 :                 return NULL;
   39066             :         }
   39067             : 
   39068           0 :         push->flags |= ndr_push_flags;
   39069             : 
   39070           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   39071           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39072           0 :                 TALLOC_FREE(push);
   39073           0 :                 PyErr_SetNdrError(err);
   39074           0 :                 return NULL;
   39075             :         }
   39076           0 :         blob = ndr_push_blob(push);
   39077           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   39078           0 :         TALLOC_FREE(push);
   39079           0 :         return ret;
   39080             : }
   39081             : 
   39082           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39083             : {
   39084           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39085           0 :         PyObject *bigendian_obj = NULL;
   39086           0 :         PyObject *ndr64_obj = NULL;
   39087           0 :         libndr_flags ndr_push_flags = 0;
   39088             : 
   39089           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   39090             :                 discard_const_p(char *, kwnames),
   39091             :                 &bigendian_obj,
   39092             :                 &ndr64_obj)) {
   39093           0 :                 return NULL;
   39094             :         }
   39095             : 
   39096           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39097           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39098             :         }
   39099           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39100           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39101             :         }
   39102             : 
   39103           0 :         return py_srvsvc_NetSessEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   39104             : }
   39105             : 
   39106           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39107             : {
   39108           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39109           0 :         PyObject *bigendian_obj = NULL;
   39110           0 :         PyObject *ndr64_obj = NULL;
   39111           0 :         libndr_flags ndr_push_flags = 0;
   39112             : 
   39113           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   39114             :                 discard_const_p(char *, kwnames),
   39115             :                 &bigendian_obj,
   39116             :                 &ndr64_obj)) {
   39117           0 :                 return NULL;
   39118             :         }
   39119             : 
   39120           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39121           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39122             :         }
   39123           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39124           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39125             :         }
   39126             : 
   39127           0 :         return py_srvsvc_NetSessEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   39128             : }
   39129             : 
   39130           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   39131             : {
   39132           0 :         const struct ndr_interface_call *call = NULL;
   39133           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   39134           0 :         struct ndr_pull *pull = NULL;
   39135           0 :         enum ndr_err_code err;
   39136             : 
   39137           0 :         if (ndr_table_srvsvc.num_calls < 13) {
   39138           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSessEnum_ndr_unpack");
   39139           0 :                 return NULL;
   39140             :         }
   39141           0 :         call = &ndr_table_srvsvc.calls[12];
   39142             : 
   39143           0 :         pull = ndr_pull_init_blob(blob, object);
   39144           0 :         if (pull == NULL) {
   39145           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39146           0 :                 return NULL;
   39147             :         }
   39148             : 
   39149           0 :         pull->flags |= ndr_pull_flags;
   39150             : 
   39151           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   39152           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39153           0 :                 TALLOC_FREE(pull);
   39154           0 :                 PyErr_SetNdrError(err);
   39155           0 :                 return NULL;
   39156             :         }
   39157           0 :         if (!allow_remaining) {
   39158           0 :                 uint32_t highest_ofs;
   39159             : 
   39160           0 :                 if (pull->offset > pull->relative_highest_offset) {
   39161           0 :                         highest_ofs = pull->offset;
   39162             :                 } else {
   39163           0 :                         highest_ofs = pull->relative_highest_offset;
   39164             :                 }
   39165           0 :                 if (highest_ofs < pull->data_size) {
   39166           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   39167             :                                 "not all bytes consumed ofs[%u] size[%u]",
   39168             :                                 highest_ofs, pull->data_size);
   39169           0 :                         TALLOC_FREE(pull);
   39170           0 :                         PyErr_SetNdrError(err);
   39171           0 :                         return NULL;
   39172             :                 }
   39173             :         }
   39174             : 
   39175           0 :         TALLOC_FREE(pull);
   39176           0 :         Py_RETURN_NONE;
   39177             : }
   39178             : 
   39179           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39180             : {
   39181           0 :         DATA_BLOB blob;
   39182           0 :         Py_ssize_t blob_length = 0;
   39183           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39184           0 :         PyObject *bigendian_obj = NULL;
   39185           0 :         PyObject *ndr64_obj = NULL;
   39186           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39187           0 :         PyObject *allow_remaining_obj = NULL;
   39188           0 :         bool allow_remaining = false;
   39189             : 
   39190           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   39191             :                 discard_const_p(char *, kwnames),
   39192             :                 &blob.data, &blob_length,
   39193             :                 &bigendian_obj,
   39194             :                 &ndr64_obj,
   39195             :                 &allow_remaining_obj)) {
   39196           0 :                 return NULL;
   39197             :         }
   39198           0 :         blob.length = blob_length;
   39199             : 
   39200           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39201           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39202             :         }
   39203           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39204           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39205             :         }
   39206             : 
   39207           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39208           0 :                 allow_remaining = true;
   39209             :         }
   39210             : 
   39211           0 :         return py_srvsvc_NetSessEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   39212             : }
   39213             : 
   39214           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39215             : {
   39216           0 :         DATA_BLOB blob;
   39217           0 :         Py_ssize_t blob_length = 0;
   39218           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39219           0 :         PyObject *bigendian_obj = NULL;
   39220           0 :         PyObject *ndr64_obj = NULL;
   39221           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39222           0 :         PyObject *allow_remaining_obj = NULL;
   39223           0 :         bool allow_remaining = false;
   39224             : 
   39225           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   39226             :                 discard_const_p(char *, kwnames),
   39227             :                 &blob.data, &blob_length,
   39228             :                 &bigendian_obj,
   39229             :                 &ndr64_obj,
   39230             :                 &allow_remaining_obj)) {
   39231           0 :                 return NULL;
   39232             :         }
   39233           0 :         blob.length = blob_length;
   39234             : 
   39235           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39236           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39237             :         }
   39238           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39239           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39240             :         }
   39241             : 
   39242           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39243           0 :                 allow_remaining = true;
   39244             :         }
   39245             : 
   39246           0 :         return py_srvsvc_NetSessEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   39247             : }
   39248             : 
   39249           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   39250             : {
   39251           0 :         const struct ndr_interface_call *call = NULL;
   39252           0 :         struct srvsvc_NetSessEnum *object = pytalloc_get_ptr(py_obj);
   39253           0 :         PyObject *ret;
   39254           0 :         char *retstr;
   39255             : 
   39256           0 :         if (ndr_table_srvsvc.num_calls < 13) {
   39257           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSessEnum_ndr_print");
   39258           0 :                 return NULL;
   39259             :         }
   39260           0 :         call = &ndr_table_srvsvc.calls[12];
   39261             : 
   39262           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   39263           0 :         ret = PyUnicode_FromString(retstr);
   39264           0 :         TALLOC_FREE(retstr);
   39265             : 
   39266           0 :         return ret;
   39267             : }
   39268             : 
   39269           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39270             : {
   39271           0 :         return py_srvsvc_NetSessEnum_ndr_print(py_obj, "srvsvc_NetSessEnum_in", NDR_IN);
   39272             : }
   39273             : 
   39274           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39275             : {
   39276           0 :         return py_srvsvc_NetSessEnum_ndr_print(py_obj, "srvsvc_NetSessEnum_out", NDR_OUT);
   39277             : }
   39278             : 
   39279             : static PyMethodDef py_srvsvc_NetSessEnum_methods[] = {
   39280             :         { "opnum", (PyCFunction)py_srvsvc_NetSessEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   39281             :                 "srvsvc.NetSessEnum.opnum() -> 12 (0x0c) " },
   39282             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   39283             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   39284             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   39285             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   39286             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   39287             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   39288             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   39289             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   39290             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetSessEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   39291             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetSessEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   39292             :         { NULL, NULL, 0, NULL }
   39293             : };
   39294             : 
   39295             : 
   39296             : static PyTypeObject srvsvc_NetSessEnum_Type = {
   39297             :         PyVarObject_HEAD_INIT(NULL, 0)
   39298             :         .tp_name = "srvsvc.NetSessEnum",
   39299             :         .tp_getset = py_srvsvc_NetSessEnum_getsetters,
   39300             :         .tp_methods = py_srvsvc_NetSessEnum_methods,
   39301             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   39302             :         .tp_new = py_srvsvc_NetSessEnum_new,
   39303             : };
   39304             : 
   39305           0 : static bool pack_py_srvsvc_NetSessEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSessEnum *r)
   39306             : {
   39307           0 :         PyObject *py_server_unc;
   39308           0 :         PyObject *py_client;
   39309           0 :         PyObject *py_user;
   39310           0 :         PyObject *py_info_ctr;
   39311           0 :         PyObject *py_max_buffer;
   39312           0 :         PyObject *py_resume_handle;
   39313           0 :         const char *kwnames[] = {
   39314             :                 "server_unc", "client", "user", "info_ctr", "max_buffer", "resume_handle", NULL
   39315             :         };
   39316             : 
   39317           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)) {
   39318           0 :                 return false;
   39319             :         }
   39320             : 
   39321           0 :         if (py_server_unc == NULL) {
   39322           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   39323           0 :                 return false;
   39324             :         }
   39325           0 :         if (py_server_unc == Py_None) {
   39326           0 :                 r->in.server_unc = NULL;
   39327             :         } else {
   39328           0 :                 r->in.server_unc = NULL;
   39329             :                 {
   39330           0 :                         const char *test_str;
   39331           0 :                         const char *talloc_str;
   39332           0 :                         PyObject *unicode = NULL;
   39333           0 :                         if (PyUnicode_Check(py_server_unc)) {
   39334           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   39335           0 :                                 if (unicode == NULL) {
   39336           0 :                                         return false;
   39337             :                                 }
   39338           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39339           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   39340           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   39341             :                         } else {
   39342           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   39343           0 :                                 return false;
   39344             :                         }
   39345           0 :                         talloc_str = talloc_strdup(r, test_str);
   39346           0 :                         if (unicode != NULL) {
   39347           0 :                                 Py_DECREF(unicode);
   39348             :                         }
   39349           0 :                         if (talloc_str == NULL) {
   39350           0 :                                 PyErr_NoMemory();
   39351           0 :                                 return false;
   39352             :                         }
   39353           0 :                         r->in.server_unc = talloc_str;
   39354             :                 }
   39355             :         }
   39356           0 :         if (py_client == NULL) {
   39357           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.client");
   39358           0 :                 return false;
   39359             :         }
   39360           0 :         if (py_client == Py_None) {
   39361           0 :                 r->in.client = NULL;
   39362             :         } else {
   39363           0 :                 r->in.client = NULL;
   39364             :                 {
   39365           0 :                         const char *test_str;
   39366           0 :                         const char *talloc_str;
   39367           0 :                         PyObject *unicode = NULL;
   39368           0 :                         if (PyUnicode_Check(py_client)) {
   39369           0 :                                 unicode = PyUnicode_AsEncodedString(py_client, "utf-8", "ignore");
   39370           0 :                                 if (unicode == NULL) {
   39371           0 :                                         return false;
   39372             :                                 }
   39373           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39374           0 :                         } else if (PyBytes_Check(py_client)) {
   39375           0 :                                 test_str = PyBytes_AS_STRING(py_client);
   39376             :                         } else {
   39377           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client)->tp_name);
   39378           0 :                                 return false;
   39379             :                         }
   39380           0 :                         talloc_str = talloc_strdup(r, test_str);
   39381           0 :                         if (unicode != NULL) {
   39382           0 :                                 Py_DECREF(unicode);
   39383             :                         }
   39384           0 :                         if (talloc_str == NULL) {
   39385           0 :                                 PyErr_NoMemory();
   39386           0 :                                 return false;
   39387             :                         }
   39388           0 :                         r->in.client = talloc_str;
   39389             :                 }
   39390             :         }
   39391           0 :         if (py_user == NULL) {
   39392           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.user");
   39393           0 :                 return false;
   39394             :         }
   39395           0 :         if (py_user == Py_None) {
   39396           0 :                 r->in.user = NULL;
   39397             :         } else {
   39398           0 :                 r->in.user = NULL;
   39399             :                 {
   39400           0 :                         const char *test_str;
   39401           0 :                         const char *talloc_str;
   39402           0 :                         PyObject *unicode = NULL;
   39403           0 :                         if (PyUnicode_Check(py_user)) {
   39404           0 :                                 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   39405           0 :                                 if (unicode == NULL) {
   39406           0 :                                         return false;
   39407             :                                 }
   39408           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39409           0 :                         } else if (PyBytes_Check(py_user)) {
   39410           0 :                                 test_str = PyBytes_AS_STRING(py_user);
   39411             :                         } else {
   39412           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   39413           0 :                                 return false;
   39414             :                         }
   39415           0 :                         talloc_str = talloc_strdup(r, test_str);
   39416           0 :                         if (unicode != NULL) {
   39417           0 :                                 Py_DECREF(unicode);
   39418             :                         }
   39419           0 :                         if (talloc_str == NULL) {
   39420           0 :                                 PyErr_NoMemory();
   39421           0 :                                 return false;
   39422             :                         }
   39423           0 :                         r->in.user = talloc_str;
   39424             :                 }
   39425             :         }
   39426           0 :         if (py_info_ctr == NULL) {
   39427           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info_ctr");
   39428           0 :                 return false;
   39429             :         }
   39430           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   39431           0 :         if (r->in.info_ctr == NULL) {
   39432           0 :                 PyErr_NoMemory();
   39433           0 :                 return false;
   39434             :         }
   39435           0 :         PY_CHECK_TYPE(&srvsvc_NetSessInfoCtr_Type, py_info_ctr, return false;);
   39436           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   39437           0 :                 PyErr_NoMemory();
   39438           0 :                 return false;
   39439             :         }
   39440           0 :         r->in.info_ctr = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   39441           0 :         if (py_max_buffer == NULL) {
   39442           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.max_buffer");
   39443           0 :                 return false;
   39444             :         }
   39445             :         {
   39446           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   39447           0 :                 if (PyLong_Check(py_max_buffer)) {
   39448           0 :                         unsigned long long test_var;
   39449           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   39450           0 :                         if (PyErr_Occurred() != NULL) {
   39451           0 :                                 return false;
   39452             :                         }
   39453           0 :                         if (test_var > uint_max) {
   39454           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39455             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39456           0 :                                 return false;
   39457             :                         }
   39458           0 :                         r->in.max_buffer = test_var;
   39459             :                 } else {
   39460           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39461             :                           PyLong_Type.tp_name);
   39462           0 :                         return false;
   39463             :                 }
   39464             :         }
   39465           0 :         if (py_resume_handle == NULL) {
   39466           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.resume_handle");
   39467           0 :                 return false;
   39468             :         }
   39469           0 :         if (py_resume_handle == Py_None) {
   39470           0 :                 r->in.resume_handle = NULL;
   39471             :         } else {
   39472           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   39473           0 :                 if (r->in.resume_handle == NULL) {
   39474           0 :                         PyErr_NoMemory();
   39475           0 :                         return false;
   39476             :                 }
   39477             :                 {
   39478           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   39479           0 :                         if (PyLong_Check(py_resume_handle)) {
   39480           0 :                                 unsigned long long test_var;
   39481           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   39482           0 :                                 if (PyErr_Occurred() != NULL) {
   39483           0 :                                         return false;
   39484             :                                 }
   39485           0 :                                 if (test_var > uint_max) {
   39486           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39487             :                                           PyLong_Type.tp_name, uint_max, test_var);
   39488           0 :                                         return false;
   39489             :                                 }
   39490           0 :                                 *r->in.resume_handle = test_var;
   39491             :                         } else {
   39492           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   39493             :                                   PyLong_Type.tp_name);
   39494           0 :                                 return false;
   39495             :                         }
   39496             :                 }
   39497             :         }
   39498           0 :         return true;
   39499             : }
   39500             : 
   39501           0 : static PyObject *unpack_py_srvsvc_NetSessEnum_args_out(struct srvsvc_NetSessEnum *r)
   39502             : {
   39503           0 :         PyObject *result;
   39504           0 :         PyObject *py_info_ctr;
   39505           0 :         PyObject *py_totalentries;
   39506           0 :         PyObject *py_resume_handle;
   39507           0 :         result = PyTuple_New(3);
   39508           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetSessInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   39509           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   39510           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.totalentries));
   39511           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   39512           0 :         if (r->out.resume_handle == NULL) {
   39513           0 :                 py_resume_handle = Py_None;
   39514           0 :                 Py_INCREF(py_resume_handle);
   39515             :         } else {
   39516           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.resume_handle));
   39517             :         }
   39518           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   39519           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   39520           0 :                 PyErr_SetWERROR(r->out.result);
   39521           0 :                 return NULL;
   39522             :         }
   39523             : 
   39524           0 :         return result;
   39525             : }
   39526             : 
   39527             : 
   39528           0 : static PyObject *py_srvsvc_NetSessDel_in_get_server_unc(PyObject *obj, void *closure)
   39529             : {
   39530           0 :         struct srvsvc_NetSessDel *object = pytalloc_get_ptr(obj);
   39531           0 :         PyObject *py_server_unc;
   39532           0 :         if (object->in.server_unc == NULL) {
   39533           0 :                 Py_RETURN_NONE;
   39534             :         }
   39535           0 :         if (object->in.server_unc == NULL) {
   39536           0 :                 py_server_unc = Py_None;
   39537           0 :                 Py_INCREF(py_server_unc);
   39538             :         } else {
   39539           0 :                 if (object->in.server_unc == NULL) {
   39540           0 :                         py_server_unc = Py_None;
   39541           0 :                         Py_INCREF(py_server_unc);
   39542             :                 } else {
   39543           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   39544             :                 }
   39545             :         }
   39546           0 :         return py_server_unc;
   39547             : }
   39548             : 
   39549           0 : static int py_srvsvc_NetSessDel_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   39550             : {
   39551           0 :         struct srvsvc_NetSessDel *object = pytalloc_get_ptr(py_obj);
   39552           0 :         if (value == NULL) {
   39553           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   39554           0 :                 return -1;
   39555             :         }
   39556           0 :         if (value == Py_None) {
   39557           0 :                 object->in.server_unc = NULL;
   39558             :         } else {
   39559           0 :                 object->in.server_unc = NULL;
   39560             :                 {
   39561           0 :                         const char *test_str;
   39562           0 :                         const char *talloc_str;
   39563           0 :                         PyObject *unicode = NULL;
   39564           0 :                         if (PyUnicode_Check(value)) {
   39565           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   39566           0 :                                 if (unicode == NULL) {
   39567           0 :                                         return -1;
   39568             :                                 }
   39569           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39570           0 :                         } else if (PyBytes_Check(value)) {
   39571           0 :                                 test_str = PyBytes_AS_STRING(value);
   39572             :                         } else {
   39573           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39574           0 :                                 return -1;
   39575             :                         }
   39576           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39577           0 :                         if (unicode != NULL) {
   39578           0 :                                 Py_DECREF(unicode);
   39579             :                         }
   39580           0 :                         if (talloc_str == NULL) {
   39581           0 :                                 PyErr_NoMemory();
   39582           0 :                                 return -1;
   39583             :                         }
   39584           0 :                         object->in.server_unc = talloc_str;
   39585             :                 }
   39586             :         }
   39587           0 :         return 0;
   39588             : }
   39589             : 
   39590           0 : static PyObject *py_srvsvc_NetSessDel_in_get_client(PyObject *obj, void *closure)
   39591             : {
   39592           0 :         struct srvsvc_NetSessDel *object = pytalloc_get_ptr(obj);
   39593           0 :         PyObject *py_client;
   39594           0 :         if (object->in.client == NULL) {
   39595           0 :                 Py_RETURN_NONE;
   39596             :         }
   39597           0 :         if (object->in.client == NULL) {
   39598           0 :                 py_client = Py_None;
   39599           0 :                 Py_INCREF(py_client);
   39600             :         } else {
   39601           0 :                 if (object->in.client == NULL) {
   39602           0 :                         py_client = Py_None;
   39603           0 :                         Py_INCREF(py_client);
   39604             :                 } else {
   39605           0 :                         py_client = PyUnicode_Decode(object->in.client, strlen(object->in.client), "utf-8", "ignore");
   39606             :                 }
   39607             :         }
   39608           0 :         return py_client;
   39609             : }
   39610             : 
   39611           0 : static int py_srvsvc_NetSessDel_in_set_client(PyObject *py_obj, PyObject *value, void *closure)
   39612             : {
   39613           0 :         struct srvsvc_NetSessDel *object = pytalloc_get_ptr(py_obj);
   39614           0 :         if (value == NULL) {
   39615           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.client");
   39616           0 :                 return -1;
   39617             :         }
   39618           0 :         if (value == Py_None) {
   39619           0 :                 object->in.client = NULL;
   39620             :         } else {
   39621           0 :                 object->in.client = NULL;
   39622             :                 {
   39623           0 :                         const char *test_str;
   39624           0 :                         const char *talloc_str;
   39625           0 :                         PyObject *unicode = NULL;
   39626           0 :                         if (PyUnicode_Check(value)) {
   39627           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   39628           0 :                                 if (unicode == NULL) {
   39629           0 :                                         return -1;
   39630             :                                 }
   39631           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39632           0 :                         } else if (PyBytes_Check(value)) {
   39633           0 :                                 test_str = PyBytes_AS_STRING(value);
   39634             :                         } else {
   39635           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39636           0 :                                 return -1;
   39637             :                         }
   39638           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39639           0 :                         if (unicode != NULL) {
   39640           0 :                                 Py_DECREF(unicode);
   39641             :                         }
   39642           0 :                         if (talloc_str == NULL) {
   39643           0 :                                 PyErr_NoMemory();
   39644           0 :                                 return -1;
   39645             :                         }
   39646           0 :                         object->in.client = talloc_str;
   39647             :                 }
   39648             :         }
   39649           0 :         return 0;
   39650             : }
   39651             : 
   39652           0 : static PyObject *py_srvsvc_NetSessDel_in_get_user(PyObject *obj, void *closure)
   39653             : {
   39654           0 :         struct srvsvc_NetSessDel *object = pytalloc_get_ptr(obj);
   39655           0 :         PyObject *py_user;
   39656           0 :         if (object->in.user == NULL) {
   39657           0 :                 Py_RETURN_NONE;
   39658             :         }
   39659           0 :         if (object->in.user == NULL) {
   39660           0 :                 py_user = Py_None;
   39661           0 :                 Py_INCREF(py_user);
   39662             :         } else {
   39663           0 :                 if (object->in.user == NULL) {
   39664           0 :                         py_user = Py_None;
   39665           0 :                         Py_INCREF(py_user);
   39666             :                 } else {
   39667           0 :                         py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   39668             :                 }
   39669             :         }
   39670           0 :         return py_user;
   39671             : }
   39672             : 
   39673           0 : static int py_srvsvc_NetSessDel_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   39674             : {
   39675           0 :         struct srvsvc_NetSessDel *object = pytalloc_get_ptr(py_obj);
   39676           0 :         if (value == NULL) {
   39677           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.user");
   39678           0 :                 return -1;
   39679             :         }
   39680           0 :         if (value == Py_None) {
   39681           0 :                 object->in.user = NULL;
   39682             :         } else {
   39683           0 :                 object->in.user = NULL;
   39684             :                 {
   39685           0 :                         const char *test_str;
   39686           0 :                         const char *talloc_str;
   39687           0 :                         PyObject *unicode = NULL;
   39688           0 :                         if (PyUnicode_Check(value)) {
   39689           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   39690           0 :                                 if (unicode == NULL) {
   39691           0 :                                         return -1;
   39692             :                                 }
   39693           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39694           0 :                         } else if (PyBytes_Check(value)) {
   39695           0 :                                 test_str = PyBytes_AS_STRING(value);
   39696             :                         } else {
   39697           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39698           0 :                                 return -1;
   39699             :                         }
   39700           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39701           0 :                         if (unicode != NULL) {
   39702           0 :                                 Py_DECREF(unicode);
   39703             :                         }
   39704           0 :                         if (talloc_str == NULL) {
   39705           0 :                                 PyErr_NoMemory();
   39706           0 :                                 return -1;
   39707             :                         }
   39708           0 :                         object->in.user = talloc_str;
   39709             :                 }
   39710             :         }
   39711           0 :         return 0;
   39712             : }
   39713             : 
   39714           0 : static PyObject *py_srvsvc_NetSessDel_get_result(PyObject *obj, void *closure)
   39715             : {
   39716           0 :         struct srvsvc_NetSessDel *object = pytalloc_get_ptr(obj);
   39717           0 :         PyObject *py_result;
   39718           0 :         py_result = PyErr_FromWERROR(object->out.result);
   39719           0 :         return py_result;
   39720             : }
   39721             : 
   39722           0 : static int py_srvsvc_NetSessDel_set_result(PyObject *py_obj, PyObject *value, void *closure)
   39723             : {
   39724           0 :         struct srvsvc_NetSessDel *object = pytalloc_get_ptr(py_obj);
   39725           0 :         if (value == NULL) {
   39726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   39727           0 :                 return -1;
   39728             :         }
   39729           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   39730           0 :         return 0;
   39731             : }
   39732             : 
   39733             : static PyGetSetDef py_srvsvc_NetSessDel_getsetters[] = {
   39734             :         {
   39735             :                 .name = discard_const_p(char, "in_server_unc"),
   39736             :                 .get = py_srvsvc_NetSessDel_in_get_server_unc,
   39737             :                 .set = py_srvsvc_NetSessDel_in_set_server_unc,
   39738             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39739             :         },
   39740             :         {
   39741             :                 .name = discard_const_p(char, "in_client"),
   39742             :                 .get = py_srvsvc_NetSessDel_in_get_client,
   39743             :                 .set = py_srvsvc_NetSessDel_in_set_client,
   39744             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39745             :         },
   39746             :         {
   39747             :                 .name = discard_const_p(char, "in_user"),
   39748             :                 .get = py_srvsvc_NetSessDel_in_get_user,
   39749             :                 .set = py_srvsvc_NetSessDel_in_set_user,
   39750             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39751             :         },
   39752             :         {
   39753             :                 .name = discard_const_p(char, "result"),
   39754             :                 .get = py_srvsvc_NetSessDel_get_result,
   39755             :                 .set = py_srvsvc_NetSessDel_set_result,
   39756             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   39757             :         },
   39758             :         { .name = NULL }
   39759             : };
   39760             : 
   39761           0 : static PyObject *py_srvsvc_NetSessDel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   39762             : {
   39763           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetSessDel, type);
   39764           0 :         return self;
   39765             : }
   39766             : 
   39767           0 : static PyObject *py_srvsvc_NetSessDel_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   39768             : {
   39769             : 
   39770             : 
   39771           0 :         return PyLong_FromLong(13);
   39772             : }
   39773             : 
   39774           0 : static PyObject *py_srvsvc_NetSessDel_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   39775             : {
   39776           0 :         const struct ndr_interface_call *call = NULL;
   39777           0 :         struct srvsvc_NetSessDel *object = pytalloc_get_ptr(py_obj);
   39778           0 :         PyObject *ret = NULL;
   39779           0 :         struct ndr_push *push = NULL;
   39780           0 :         DATA_BLOB blob;
   39781           0 :         enum ndr_err_code err;
   39782             : 
   39783           0 :         if (ndr_table_srvsvc.num_calls < 14) {
   39784           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSessDel_ndr_pack");
   39785           0 :                 return NULL;
   39786             :         }
   39787           0 :         call = &ndr_table_srvsvc.calls[13];
   39788             : 
   39789           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   39790           0 :         if (push == NULL) {
   39791           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39792           0 :                 return NULL;
   39793             :         }
   39794             : 
   39795           0 :         push->flags |= ndr_push_flags;
   39796             : 
   39797           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   39798           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39799           0 :                 TALLOC_FREE(push);
   39800           0 :                 PyErr_SetNdrError(err);
   39801           0 :                 return NULL;
   39802             :         }
   39803           0 :         blob = ndr_push_blob(push);
   39804           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   39805           0 :         TALLOC_FREE(push);
   39806           0 :         return ret;
   39807             : }
   39808             : 
   39809           0 : static PyObject *py_srvsvc_NetSessDel_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39810             : {
   39811           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39812           0 :         PyObject *bigendian_obj = NULL;
   39813           0 :         PyObject *ndr64_obj = NULL;
   39814           0 :         libndr_flags ndr_push_flags = 0;
   39815             : 
   39816           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   39817             :                 discard_const_p(char *, kwnames),
   39818             :                 &bigendian_obj,
   39819             :                 &ndr64_obj)) {
   39820           0 :                 return NULL;
   39821             :         }
   39822             : 
   39823           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39824           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39825             :         }
   39826           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39827           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39828             :         }
   39829             : 
   39830           0 :         return py_srvsvc_NetSessDel_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   39831             : }
   39832             : 
   39833           0 : static PyObject *py_srvsvc_NetSessDel_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39834             : {
   39835           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39836           0 :         PyObject *bigendian_obj = NULL;
   39837           0 :         PyObject *ndr64_obj = NULL;
   39838           0 :         libndr_flags ndr_push_flags = 0;
   39839             : 
   39840           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   39841             :                 discard_const_p(char *, kwnames),
   39842             :                 &bigendian_obj,
   39843             :                 &ndr64_obj)) {
   39844           0 :                 return NULL;
   39845             :         }
   39846             : 
   39847           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39848           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39849             :         }
   39850           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39851           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39852             :         }
   39853             : 
   39854           0 :         return py_srvsvc_NetSessDel_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   39855             : }
   39856             : 
   39857           0 : static PyObject *py_srvsvc_NetSessDel_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   39858             : {
   39859           0 :         const struct ndr_interface_call *call = NULL;
   39860           0 :         struct srvsvc_NetSessDel *object = pytalloc_get_ptr(py_obj);
   39861           0 :         struct ndr_pull *pull = NULL;
   39862           0 :         enum ndr_err_code err;
   39863             : 
   39864           0 :         if (ndr_table_srvsvc.num_calls < 14) {
   39865           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSessDel_ndr_unpack");
   39866           0 :                 return NULL;
   39867             :         }
   39868           0 :         call = &ndr_table_srvsvc.calls[13];
   39869             : 
   39870           0 :         pull = ndr_pull_init_blob(blob, object);
   39871           0 :         if (pull == NULL) {
   39872           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39873           0 :                 return NULL;
   39874             :         }
   39875             : 
   39876           0 :         pull->flags |= ndr_pull_flags;
   39877             : 
   39878           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   39879           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39880           0 :                 TALLOC_FREE(pull);
   39881           0 :                 PyErr_SetNdrError(err);
   39882           0 :                 return NULL;
   39883             :         }
   39884           0 :         if (!allow_remaining) {
   39885           0 :                 uint32_t highest_ofs;
   39886             : 
   39887           0 :                 if (pull->offset > pull->relative_highest_offset) {
   39888           0 :                         highest_ofs = pull->offset;
   39889             :                 } else {
   39890           0 :                         highest_ofs = pull->relative_highest_offset;
   39891             :                 }
   39892           0 :                 if (highest_ofs < pull->data_size) {
   39893           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   39894             :                                 "not all bytes consumed ofs[%u] size[%u]",
   39895             :                                 highest_ofs, pull->data_size);
   39896           0 :                         TALLOC_FREE(pull);
   39897           0 :                         PyErr_SetNdrError(err);
   39898           0 :                         return NULL;
   39899             :                 }
   39900             :         }
   39901             : 
   39902           0 :         TALLOC_FREE(pull);
   39903           0 :         Py_RETURN_NONE;
   39904             : }
   39905             : 
   39906           0 : static PyObject *py_srvsvc_NetSessDel_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39907             : {
   39908           0 :         DATA_BLOB blob;
   39909           0 :         Py_ssize_t blob_length = 0;
   39910           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39911           0 :         PyObject *bigendian_obj = NULL;
   39912           0 :         PyObject *ndr64_obj = NULL;
   39913           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39914           0 :         PyObject *allow_remaining_obj = NULL;
   39915           0 :         bool allow_remaining = false;
   39916             : 
   39917           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   39918             :                 discard_const_p(char *, kwnames),
   39919             :                 &blob.data, &blob_length,
   39920             :                 &bigendian_obj,
   39921             :                 &ndr64_obj,
   39922             :                 &allow_remaining_obj)) {
   39923           0 :                 return NULL;
   39924             :         }
   39925           0 :         blob.length = blob_length;
   39926             : 
   39927           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39928           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39929             :         }
   39930           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39931           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39932             :         }
   39933             : 
   39934           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39935           0 :                 allow_remaining = true;
   39936             :         }
   39937             : 
   39938           0 :         return py_srvsvc_NetSessDel_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   39939             : }
   39940             : 
   39941           0 : static PyObject *py_srvsvc_NetSessDel_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39942             : {
   39943           0 :         DATA_BLOB blob;
   39944           0 :         Py_ssize_t blob_length = 0;
   39945           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39946           0 :         PyObject *bigendian_obj = NULL;
   39947           0 :         PyObject *ndr64_obj = NULL;
   39948           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39949           0 :         PyObject *allow_remaining_obj = NULL;
   39950           0 :         bool allow_remaining = false;
   39951             : 
   39952           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   39953             :                 discard_const_p(char *, kwnames),
   39954             :                 &blob.data, &blob_length,
   39955             :                 &bigendian_obj,
   39956             :                 &ndr64_obj,
   39957             :                 &allow_remaining_obj)) {
   39958           0 :                 return NULL;
   39959             :         }
   39960           0 :         blob.length = blob_length;
   39961             : 
   39962           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39963           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39964             :         }
   39965           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39966           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39967             :         }
   39968             : 
   39969           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39970           0 :                 allow_remaining = true;
   39971             :         }
   39972             : 
   39973           0 :         return py_srvsvc_NetSessDel_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   39974             : }
   39975             : 
   39976           0 : static PyObject *py_srvsvc_NetSessDel_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   39977             : {
   39978           0 :         const struct ndr_interface_call *call = NULL;
   39979           0 :         struct srvsvc_NetSessDel *object = pytalloc_get_ptr(py_obj);
   39980           0 :         PyObject *ret;
   39981           0 :         char *retstr;
   39982             : 
   39983           0 :         if (ndr_table_srvsvc.num_calls < 14) {
   39984           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSessDel_ndr_print");
   39985           0 :                 return NULL;
   39986             :         }
   39987           0 :         call = &ndr_table_srvsvc.calls[13];
   39988             : 
   39989           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   39990           0 :         ret = PyUnicode_FromString(retstr);
   39991           0 :         TALLOC_FREE(retstr);
   39992             : 
   39993           0 :         return ret;
   39994             : }
   39995             : 
   39996           0 : static PyObject *py_srvsvc_NetSessDel_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39997             : {
   39998           0 :         return py_srvsvc_NetSessDel_ndr_print(py_obj, "srvsvc_NetSessDel_in", NDR_IN);
   39999             : }
   40000             : 
   40001           0 : static PyObject *py_srvsvc_NetSessDel_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40002             : {
   40003           0 :         return py_srvsvc_NetSessDel_ndr_print(py_obj, "srvsvc_NetSessDel_out", NDR_OUT);
   40004             : }
   40005             : 
   40006             : static PyMethodDef py_srvsvc_NetSessDel_methods[] = {
   40007             :         { "opnum", (PyCFunction)py_srvsvc_NetSessDel_ndr_opnum, METH_NOARGS|METH_CLASS,
   40008             :                 "srvsvc.NetSessDel.opnum() -> 13 (0x0d) " },
   40009             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessDel_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   40010             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   40011             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessDel_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   40012             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   40013             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessDel_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   40014             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   40015             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessDel_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   40016             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   40017             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetSessDel_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   40018             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetSessDel_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   40019             :         { NULL, NULL, 0, NULL }
   40020             : };
   40021             : 
   40022             : 
   40023             : static PyTypeObject srvsvc_NetSessDel_Type = {
   40024             :         PyVarObject_HEAD_INIT(NULL, 0)
   40025             :         .tp_name = "srvsvc.NetSessDel",
   40026             :         .tp_getset = py_srvsvc_NetSessDel_getsetters,
   40027             :         .tp_methods = py_srvsvc_NetSessDel_methods,
   40028             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   40029             :         .tp_new = py_srvsvc_NetSessDel_new,
   40030             : };
   40031             : 
   40032           0 : static bool pack_py_srvsvc_NetSessDel_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSessDel *r)
   40033             : {
   40034           0 :         PyObject *py_server_unc;
   40035           0 :         PyObject *py_client;
   40036           0 :         PyObject *py_user;
   40037           0 :         const char *kwnames[] = {
   40038             :                 "server_unc", "client", "user", NULL
   40039             :         };
   40040             : 
   40041           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetSessDel", discard_const_p(char *, kwnames), &py_server_unc, &py_client, &py_user)) {
   40042           0 :                 return false;
   40043             :         }
   40044             : 
   40045           0 :         if (py_server_unc == NULL) {
   40046           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   40047           0 :                 return false;
   40048             :         }
   40049           0 :         if (py_server_unc == Py_None) {
   40050           0 :                 r->in.server_unc = NULL;
   40051             :         } else {
   40052           0 :                 r->in.server_unc = NULL;
   40053             :                 {
   40054           0 :                         const char *test_str;
   40055           0 :                         const char *talloc_str;
   40056           0 :                         PyObject *unicode = NULL;
   40057           0 :                         if (PyUnicode_Check(py_server_unc)) {
   40058           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   40059           0 :                                 if (unicode == NULL) {
   40060           0 :                                         return false;
   40061             :                                 }
   40062           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   40063           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   40064           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   40065             :                         } else {
   40066           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   40067           0 :                                 return false;
   40068             :                         }
   40069           0 :                         talloc_str = talloc_strdup(r, test_str);
   40070           0 :                         if (unicode != NULL) {
   40071           0 :                                 Py_DECREF(unicode);
   40072             :                         }
   40073           0 :                         if (talloc_str == NULL) {
   40074           0 :                                 PyErr_NoMemory();
   40075           0 :                                 return false;
   40076             :                         }
   40077           0 :                         r->in.server_unc = talloc_str;
   40078             :                 }
   40079             :         }
   40080           0 :         if (py_client == NULL) {
   40081           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.client");
   40082           0 :                 return false;
   40083             :         }
   40084           0 :         if (py_client == Py_None) {
   40085           0 :                 r->in.client = NULL;
   40086             :         } else {
   40087           0 :                 r->in.client = NULL;
   40088             :                 {
   40089           0 :                         const char *test_str;
   40090           0 :                         const char *talloc_str;
   40091           0 :                         PyObject *unicode = NULL;
   40092           0 :                         if (PyUnicode_Check(py_client)) {
   40093           0 :                                 unicode = PyUnicode_AsEncodedString(py_client, "utf-8", "ignore");
   40094           0 :                                 if (unicode == NULL) {
   40095           0 :                                         return false;
   40096             :                                 }
   40097           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   40098           0 :                         } else if (PyBytes_Check(py_client)) {
   40099           0 :                                 test_str = PyBytes_AS_STRING(py_client);
   40100             :                         } else {
   40101           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client)->tp_name);
   40102           0 :                                 return false;
   40103             :                         }
   40104           0 :                         talloc_str = talloc_strdup(r, test_str);
   40105           0 :                         if (unicode != NULL) {
   40106           0 :                                 Py_DECREF(unicode);
   40107             :                         }
   40108           0 :                         if (talloc_str == NULL) {
   40109           0 :                                 PyErr_NoMemory();
   40110           0 :                                 return false;
   40111             :                         }
   40112           0 :                         r->in.client = talloc_str;
   40113             :                 }
   40114             :         }
   40115           0 :         if (py_user == NULL) {
   40116           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.user");
   40117           0 :                 return false;
   40118             :         }
   40119           0 :         if (py_user == Py_None) {
   40120           0 :                 r->in.user = NULL;
   40121             :         } else {
   40122           0 :                 r->in.user = NULL;
   40123             :                 {
   40124           0 :                         const char *test_str;
   40125           0 :                         const char *talloc_str;
   40126           0 :                         PyObject *unicode = NULL;
   40127           0 :                         if (PyUnicode_Check(py_user)) {
   40128           0 :                                 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   40129           0 :                                 if (unicode == NULL) {
   40130           0 :                                         return false;
   40131             :                                 }
   40132           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   40133           0 :                         } else if (PyBytes_Check(py_user)) {
   40134           0 :                                 test_str = PyBytes_AS_STRING(py_user);
   40135             :                         } else {
   40136           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   40137           0 :                                 return false;
   40138             :                         }
   40139           0 :                         talloc_str = talloc_strdup(r, test_str);
   40140           0 :                         if (unicode != NULL) {
   40141           0 :                                 Py_DECREF(unicode);
   40142             :                         }
   40143           0 :                         if (talloc_str == NULL) {
   40144           0 :                                 PyErr_NoMemory();
   40145           0 :                                 return false;
   40146             :                         }
   40147           0 :                         r->in.user = talloc_str;
   40148             :                 }
   40149             :         }
   40150           0 :         return true;
   40151             : }
   40152             : 
   40153           0 : static PyObject *unpack_py_srvsvc_NetSessDel_args_out(struct srvsvc_NetSessDel *r)
   40154             : {
   40155           0 :         PyObject *result;
   40156           0 :         result = Py_None;
   40157           0 :         Py_INCREF(result);
   40158           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   40159           0 :                 PyErr_SetWERROR(r->out.result);
   40160           0 :                 return NULL;
   40161             :         }
   40162             : 
   40163           0 :         return result;
   40164             : }
   40165             : 
   40166             : 
   40167           0 : static PyObject *py_srvsvc_NetShareAdd_in_get_server_unc(PyObject *obj, void *closure)
   40168             : {
   40169           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(obj);
   40170           0 :         PyObject *py_server_unc;
   40171           0 :         if (object->in.server_unc == NULL) {
   40172           0 :                 Py_RETURN_NONE;
   40173             :         }
   40174           0 :         if (object->in.server_unc == NULL) {
   40175           0 :                 py_server_unc = Py_None;
   40176           0 :                 Py_INCREF(py_server_unc);
   40177             :         } else {
   40178           0 :                 if (object->in.server_unc == NULL) {
   40179           0 :                         py_server_unc = Py_None;
   40180           0 :                         Py_INCREF(py_server_unc);
   40181             :                 } else {
   40182           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   40183             :                 }
   40184             :         }
   40185           0 :         return py_server_unc;
   40186             : }
   40187             : 
   40188           0 : static int py_srvsvc_NetShareAdd_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   40189             : {
   40190           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(py_obj);
   40191           0 :         if (value == NULL) {
   40192           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   40193           0 :                 return -1;
   40194             :         }
   40195           0 :         if (value == Py_None) {
   40196           0 :                 object->in.server_unc = NULL;
   40197             :         } else {
   40198           0 :                 object->in.server_unc = NULL;
   40199             :                 {
   40200           0 :                         const char *test_str;
   40201           0 :                         const char *talloc_str;
   40202           0 :                         PyObject *unicode = NULL;
   40203           0 :                         if (PyUnicode_Check(value)) {
   40204           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   40205           0 :                                 if (unicode == NULL) {
   40206           0 :                                         return -1;
   40207             :                                 }
   40208           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   40209           0 :                         } else if (PyBytes_Check(value)) {
   40210           0 :                                 test_str = PyBytes_AS_STRING(value);
   40211             :                         } else {
   40212           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   40213           0 :                                 return -1;
   40214             :                         }
   40215           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   40216           0 :                         if (unicode != NULL) {
   40217           0 :                                 Py_DECREF(unicode);
   40218             :                         }
   40219           0 :                         if (talloc_str == NULL) {
   40220           0 :                                 PyErr_NoMemory();
   40221           0 :                                 return -1;
   40222             :                         }
   40223           0 :                         object->in.server_unc = talloc_str;
   40224             :                 }
   40225             :         }
   40226           0 :         return 0;
   40227             : }
   40228             : 
   40229           0 : static PyObject *py_srvsvc_NetShareAdd_in_get_level(PyObject *obj, void *closure)
   40230             : {
   40231           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(obj);
   40232           0 :         PyObject *py_level;
   40233           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   40234           0 :         return py_level;
   40235             : }
   40236             : 
   40237           0 : static int py_srvsvc_NetShareAdd_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   40238             : {
   40239           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(py_obj);
   40240           0 :         if (value == NULL) {
   40241           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   40242           0 :                 return -1;
   40243             :         }
   40244             :         {
   40245           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   40246           0 :                 if (PyLong_Check(value)) {
   40247           0 :                         unsigned long long test_var;
   40248           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40249           0 :                         if (PyErr_Occurred() != NULL) {
   40250           0 :                                 return -1;
   40251             :                         }
   40252           0 :                         if (test_var > uint_max) {
   40253           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40254             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40255           0 :                                 return -1;
   40256             :                         }
   40257           0 :                         object->in.level = test_var;
   40258             :                 } else {
   40259           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40260             :                           PyLong_Type.tp_name);
   40261           0 :                         return -1;
   40262             :                 }
   40263             :         }
   40264           0 :         return 0;
   40265             : }
   40266             : 
   40267           0 : static PyObject *py_srvsvc_NetShareAdd_in_get_info(PyObject *obj, void *closure)
   40268             : {
   40269           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(obj);
   40270           0 :         PyObject *py_info;
   40271           0 :         if (object->in.info == NULL) {
   40272           0 :                 Py_RETURN_NONE;
   40273             :         }
   40274           0 :         py_info = pyrpc_import_union(&srvsvc_NetShareInfo_Type, object->in.info, object->in.level, object->in.info, "union srvsvc_NetShareInfo");
   40275           0 :         if (py_info == NULL) {
   40276           0 :                 return NULL;
   40277             :         }
   40278           0 :         return py_info;
   40279             : }
   40280             : 
   40281           0 : static int py_srvsvc_NetShareAdd_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   40282             : {
   40283           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(py_obj);
   40284           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
   40285           0 :         if (value == NULL) {
   40286           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info");
   40287           0 :                 return -1;
   40288             :         }
   40289           0 :         object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
   40290           0 :         if (object->in.info == NULL) {
   40291           0 :                 PyErr_NoMemory();
   40292           0 :                 return -1;
   40293             :         }
   40294             :         {
   40295           0 :                 union srvsvc_NetShareInfo *info_switch_1;
   40296           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");
   40297           0 :                 if (info_switch_1 == NULL) {
   40298           0 :                         return -1;
   40299             :                 }
   40300           0 :                 object->in.info = info_switch_1;
   40301             :         }
   40302           0 :         return 0;
   40303             : }
   40304             : 
   40305           0 : static PyObject *py_srvsvc_NetShareAdd_in_get_parm_error(PyObject *obj, void *closure)
   40306             : {
   40307           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(obj);
   40308           0 :         PyObject *py_parm_error;
   40309           0 :         if (object->in.parm_error == NULL) {
   40310           0 :                 Py_RETURN_NONE;
   40311             :         }
   40312           0 :         if (object->in.parm_error == NULL) {
   40313           0 :                 py_parm_error = Py_None;
   40314           0 :                 Py_INCREF(py_parm_error);
   40315             :         } else {
   40316           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.parm_error));
   40317             :         }
   40318           0 :         return py_parm_error;
   40319             : }
   40320             : 
   40321           0 : static int py_srvsvc_NetShareAdd_in_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   40322             : {
   40323           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(py_obj);
   40324           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.parm_error));
   40325           0 :         if (value == NULL) {
   40326           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.parm_error");
   40327           0 :                 return -1;
   40328             :         }
   40329           0 :         if (value == Py_None) {
   40330           0 :                 object->in.parm_error = NULL;
   40331             :         } else {
   40332           0 :                 object->in.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.parm_error);
   40333           0 :                 if (object->in.parm_error == NULL) {
   40334           0 :                         PyErr_NoMemory();
   40335           0 :                         return -1;
   40336             :                 }
   40337             :                 {
   40338           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.parm_error));
   40339           0 :                         if (PyLong_Check(value)) {
   40340           0 :                                 unsigned long long test_var;
   40341           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   40342           0 :                                 if (PyErr_Occurred() != NULL) {
   40343           0 :                                         return -1;
   40344             :                                 }
   40345           0 :                                 if (test_var > uint_max) {
   40346           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40347             :                                           PyLong_Type.tp_name, uint_max, test_var);
   40348           0 :                                         return -1;
   40349             :                                 }
   40350           0 :                                 *object->in.parm_error = test_var;
   40351             :                         } else {
   40352           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   40353             :                                   PyLong_Type.tp_name);
   40354           0 :                                 return -1;
   40355             :                         }
   40356             :                 }
   40357             :         }
   40358           0 :         return 0;
   40359             : }
   40360             : 
   40361           0 : static PyObject *py_srvsvc_NetShareAdd_out_get_parm_error(PyObject *obj, void *closure)
   40362             : {
   40363           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(obj);
   40364           0 :         PyObject *py_parm_error;
   40365           0 :         if (object->out.parm_error == NULL) {
   40366           0 :                 Py_RETURN_NONE;
   40367             :         }
   40368           0 :         if (object->out.parm_error == NULL) {
   40369           0 :                 py_parm_error = Py_None;
   40370           0 :                 Py_INCREF(py_parm_error);
   40371             :         } else {
   40372           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.parm_error));
   40373             :         }
   40374           0 :         return py_parm_error;
   40375             : }
   40376             : 
   40377           0 : static int py_srvsvc_NetShareAdd_out_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   40378             : {
   40379           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(py_obj);
   40380           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.parm_error));
   40381           0 :         if (value == NULL) {
   40382           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.parm_error");
   40383           0 :                 return -1;
   40384             :         }
   40385           0 :         if (value == Py_None) {
   40386           0 :                 object->out.parm_error = NULL;
   40387             :         } else {
   40388           0 :                 object->out.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.parm_error);
   40389           0 :                 if (object->out.parm_error == NULL) {
   40390           0 :                         PyErr_NoMemory();
   40391           0 :                         return -1;
   40392             :                 }
   40393             :                 {
   40394           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.parm_error));
   40395           0 :                         if (PyLong_Check(value)) {
   40396           0 :                                 unsigned long long test_var;
   40397           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   40398           0 :                                 if (PyErr_Occurred() != NULL) {
   40399           0 :                                         return -1;
   40400             :                                 }
   40401           0 :                                 if (test_var > uint_max) {
   40402           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40403             :                                           PyLong_Type.tp_name, uint_max, test_var);
   40404           0 :                                         return -1;
   40405             :                                 }
   40406           0 :                                 *object->out.parm_error = test_var;
   40407             :                         } else {
   40408           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   40409             :                                   PyLong_Type.tp_name);
   40410           0 :                                 return -1;
   40411             :                         }
   40412             :                 }
   40413             :         }
   40414           0 :         return 0;
   40415             : }
   40416             : 
   40417           0 : static PyObject *py_srvsvc_NetShareAdd_get_result(PyObject *obj, void *closure)
   40418             : {
   40419           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(obj);
   40420           0 :         PyObject *py_result;
   40421           0 :         py_result = PyErr_FromWERROR(object->out.result);
   40422           0 :         return py_result;
   40423             : }
   40424             : 
   40425           0 : static int py_srvsvc_NetShareAdd_set_result(PyObject *py_obj, PyObject *value, void *closure)
   40426             : {
   40427           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(py_obj);
   40428           0 :         if (value == NULL) {
   40429           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   40430           0 :                 return -1;
   40431             :         }
   40432           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   40433           0 :         return 0;
   40434             : }
   40435             : 
   40436             : static PyGetSetDef py_srvsvc_NetShareAdd_getsetters[] = {
   40437             :         {
   40438             :                 .name = discard_const_p(char, "in_server_unc"),
   40439             :                 .get = py_srvsvc_NetShareAdd_in_get_server_unc,
   40440             :                 .set = py_srvsvc_NetShareAdd_in_set_server_unc,
   40441             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   40442             :         },
   40443             :         {
   40444             :                 .name = discard_const_p(char, "in_level"),
   40445             :                 .get = py_srvsvc_NetShareAdd_in_get_level,
   40446             :                 .set = py_srvsvc_NetShareAdd_in_set_level,
   40447             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40448             :         },
   40449             :         {
   40450             :                 .name = discard_const_p(char, "in_info"),
   40451             :                 .get = py_srvsvc_NetShareAdd_in_get_info,
   40452             :                 .set = py_srvsvc_NetShareAdd_in_set_info,
   40453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo")
   40454             :         },
   40455             :         {
   40456             :                 .name = discard_const_p(char, "in_parm_error"),
   40457             :                 .get = py_srvsvc_NetShareAdd_in_get_parm_error,
   40458             :                 .set = py_srvsvc_NetShareAdd_in_set_parm_error,
   40459             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40460             :         },
   40461             :         {
   40462             :                 .name = discard_const_p(char, "out_parm_error"),
   40463             :                 .get = py_srvsvc_NetShareAdd_out_get_parm_error,
   40464             :                 .set = py_srvsvc_NetShareAdd_out_set_parm_error,
   40465             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40466             :         },
   40467             :         {
   40468             :                 .name = discard_const_p(char, "result"),
   40469             :                 .get = py_srvsvc_NetShareAdd_get_result,
   40470             :                 .set = py_srvsvc_NetShareAdd_set_result,
   40471             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   40472             :         },
   40473             :         { .name = NULL }
   40474             : };
   40475             : 
   40476           0 : static PyObject *py_srvsvc_NetShareAdd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   40477             : {
   40478           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareAdd, type);
   40479           0 :         struct srvsvc_NetShareAdd *_self = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(self);
   40480           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   40481           0 :         _self->in.info = talloc_zero(mem_ctx, union srvsvc_NetShareInfo);
   40482           0 :         return self;
   40483             : }
   40484             : 
   40485           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   40486             : {
   40487             : 
   40488             : 
   40489           0 :         return PyLong_FromLong(14);
   40490             : }
   40491             : 
   40492           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   40493             : {
   40494           0 :         const struct ndr_interface_call *call = NULL;
   40495           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(py_obj);
   40496           0 :         PyObject *ret = NULL;
   40497           0 :         struct ndr_push *push = NULL;
   40498           0 :         DATA_BLOB blob;
   40499           0 :         enum ndr_err_code err;
   40500             : 
   40501           0 :         if (ndr_table_srvsvc.num_calls < 15) {
   40502           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareAdd_ndr_pack");
   40503           0 :                 return NULL;
   40504             :         }
   40505           0 :         call = &ndr_table_srvsvc.calls[14];
   40506             : 
   40507           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   40508           0 :         if (push == NULL) {
   40509           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40510           0 :                 return NULL;
   40511             :         }
   40512             : 
   40513           0 :         push->flags |= ndr_push_flags;
   40514             : 
   40515           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   40516           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40517           0 :                 TALLOC_FREE(push);
   40518           0 :                 PyErr_SetNdrError(err);
   40519           0 :                 return NULL;
   40520             :         }
   40521           0 :         blob = ndr_push_blob(push);
   40522           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   40523           0 :         TALLOC_FREE(push);
   40524           0 :         return ret;
   40525             : }
   40526             : 
   40527           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40528             : {
   40529           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40530           0 :         PyObject *bigendian_obj = NULL;
   40531           0 :         PyObject *ndr64_obj = NULL;
   40532           0 :         libndr_flags ndr_push_flags = 0;
   40533             : 
   40534           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   40535             :                 discard_const_p(char *, kwnames),
   40536             :                 &bigendian_obj,
   40537             :                 &ndr64_obj)) {
   40538           0 :                 return NULL;
   40539             :         }
   40540             : 
   40541           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40542           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40543             :         }
   40544           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40545           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40546             :         }
   40547             : 
   40548           0 :         return py_srvsvc_NetShareAdd_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   40549             : }
   40550             : 
   40551           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40552             : {
   40553           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40554           0 :         PyObject *bigendian_obj = NULL;
   40555           0 :         PyObject *ndr64_obj = NULL;
   40556           0 :         libndr_flags ndr_push_flags = 0;
   40557             : 
   40558           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   40559             :                 discard_const_p(char *, kwnames),
   40560             :                 &bigendian_obj,
   40561             :                 &ndr64_obj)) {
   40562           0 :                 return NULL;
   40563             :         }
   40564             : 
   40565           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40566           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40567             :         }
   40568           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40569           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40570             :         }
   40571             : 
   40572           0 :         return py_srvsvc_NetShareAdd_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   40573             : }
   40574             : 
   40575           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   40576             : {
   40577           0 :         const struct ndr_interface_call *call = NULL;
   40578           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(py_obj);
   40579           0 :         struct ndr_pull *pull = NULL;
   40580           0 :         enum ndr_err_code err;
   40581             : 
   40582           0 :         if (ndr_table_srvsvc.num_calls < 15) {
   40583           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareAdd_ndr_unpack");
   40584           0 :                 return NULL;
   40585             :         }
   40586           0 :         call = &ndr_table_srvsvc.calls[14];
   40587             : 
   40588           0 :         pull = ndr_pull_init_blob(blob, object);
   40589           0 :         if (pull == NULL) {
   40590           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40591           0 :                 return NULL;
   40592             :         }
   40593             : 
   40594           0 :         pull->flags |= ndr_pull_flags;
   40595             : 
   40596           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   40597           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40598           0 :                 TALLOC_FREE(pull);
   40599           0 :                 PyErr_SetNdrError(err);
   40600           0 :                 return NULL;
   40601             :         }
   40602           0 :         if (!allow_remaining) {
   40603           0 :                 uint32_t highest_ofs;
   40604             : 
   40605           0 :                 if (pull->offset > pull->relative_highest_offset) {
   40606           0 :                         highest_ofs = pull->offset;
   40607             :                 } else {
   40608           0 :                         highest_ofs = pull->relative_highest_offset;
   40609             :                 }
   40610           0 :                 if (highest_ofs < pull->data_size) {
   40611           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   40612             :                                 "not all bytes consumed ofs[%u] size[%u]",
   40613             :                                 highest_ofs, pull->data_size);
   40614           0 :                         TALLOC_FREE(pull);
   40615           0 :                         PyErr_SetNdrError(err);
   40616           0 :                         return NULL;
   40617             :                 }
   40618             :         }
   40619             : 
   40620           0 :         TALLOC_FREE(pull);
   40621           0 :         Py_RETURN_NONE;
   40622             : }
   40623             : 
   40624           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40625             : {
   40626           0 :         DATA_BLOB blob;
   40627           0 :         Py_ssize_t blob_length = 0;
   40628           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40629           0 :         PyObject *bigendian_obj = NULL;
   40630           0 :         PyObject *ndr64_obj = NULL;
   40631           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40632           0 :         PyObject *allow_remaining_obj = NULL;
   40633           0 :         bool allow_remaining = false;
   40634             : 
   40635           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   40636             :                 discard_const_p(char *, kwnames),
   40637             :                 &blob.data, &blob_length,
   40638             :                 &bigendian_obj,
   40639             :                 &ndr64_obj,
   40640             :                 &allow_remaining_obj)) {
   40641           0 :                 return NULL;
   40642             :         }
   40643           0 :         blob.length = blob_length;
   40644             : 
   40645           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40646           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40647             :         }
   40648           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40649           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40650             :         }
   40651             : 
   40652           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40653           0 :                 allow_remaining = true;
   40654             :         }
   40655             : 
   40656           0 :         return py_srvsvc_NetShareAdd_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   40657             : }
   40658             : 
   40659           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40660             : {
   40661           0 :         DATA_BLOB blob;
   40662           0 :         Py_ssize_t blob_length = 0;
   40663           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40664           0 :         PyObject *bigendian_obj = NULL;
   40665           0 :         PyObject *ndr64_obj = NULL;
   40666           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40667           0 :         PyObject *allow_remaining_obj = NULL;
   40668           0 :         bool allow_remaining = false;
   40669             : 
   40670           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   40671             :                 discard_const_p(char *, kwnames),
   40672             :                 &blob.data, &blob_length,
   40673             :                 &bigendian_obj,
   40674             :                 &ndr64_obj,
   40675             :                 &allow_remaining_obj)) {
   40676           0 :                 return NULL;
   40677             :         }
   40678           0 :         blob.length = blob_length;
   40679             : 
   40680           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40681           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40682             :         }
   40683           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40684           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40685             :         }
   40686             : 
   40687           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40688           0 :                 allow_remaining = true;
   40689             :         }
   40690             : 
   40691           0 :         return py_srvsvc_NetShareAdd_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   40692             : }
   40693             : 
   40694           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   40695             : {
   40696           0 :         const struct ndr_interface_call *call = NULL;
   40697           0 :         struct srvsvc_NetShareAdd *object = pytalloc_get_ptr(py_obj);
   40698           0 :         PyObject *ret;
   40699           0 :         char *retstr;
   40700             : 
   40701           0 :         if (ndr_table_srvsvc.num_calls < 15) {
   40702           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareAdd_ndr_print");
   40703           0 :                 return NULL;
   40704             :         }
   40705           0 :         call = &ndr_table_srvsvc.calls[14];
   40706             : 
   40707           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   40708           0 :         ret = PyUnicode_FromString(retstr);
   40709           0 :         TALLOC_FREE(retstr);
   40710             : 
   40711           0 :         return ret;
   40712             : }
   40713             : 
   40714           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40715             : {
   40716           0 :         return py_srvsvc_NetShareAdd_ndr_print(py_obj, "srvsvc_NetShareAdd_in", NDR_IN);
   40717             : }
   40718             : 
   40719           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40720             : {
   40721           0 :         return py_srvsvc_NetShareAdd_ndr_print(py_obj, "srvsvc_NetShareAdd_out", NDR_OUT);
   40722             : }
   40723             : 
   40724             : static PyMethodDef py_srvsvc_NetShareAdd_methods[] = {
   40725             :         { "opnum", (PyCFunction)py_srvsvc_NetShareAdd_ndr_opnum, METH_NOARGS|METH_CLASS,
   40726             :                 "srvsvc.NetShareAdd.opnum() -> 14 (0x0e) " },
   40727             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareAdd_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   40728             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   40729             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareAdd_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   40730             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   40731             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareAdd_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   40732             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   40733             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareAdd_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   40734             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   40735             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareAdd_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   40736             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareAdd_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   40737             :         { NULL, NULL, 0, NULL }
   40738             : };
   40739             : 
   40740             : 
   40741             : static PyTypeObject srvsvc_NetShareAdd_Type = {
   40742             :         PyVarObject_HEAD_INIT(NULL, 0)
   40743             :         .tp_name = "srvsvc.NetShareAdd",
   40744             :         .tp_getset = py_srvsvc_NetShareAdd_getsetters,
   40745             :         .tp_methods = py_srvsvc_NetShareAdd_methods,
   40746             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   40747             :         .tp_new = py_srvsvc_NetShareAdd_new,
   40748             : };
   40749             : 
   40750           0 : static bool pack_py_srvsvc_NetShareAdd_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareAdd *r)
   40751             : {
   40752           0 :         PyObject *py_server_unc;
   40753           0 :         PyObject *py_level;
   40754           0 :         PyObject *py_info;
   40755           0 :         PyObject *py_parm_error;
   40756           0 :         const char *kwnames[] = {
   40757             :                 "server_unc", "level", "info", "parm_error", NULL
   40758             :         };
   40759             : 
   40760           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetShareAdd", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info, &py_parm_error)) {
   40761           0 :                 return false;
   40762             :         }
   40763             : 
   40764           0 :         if (py_server_unc == NULL) {
   40765           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   40766           0 :                 return false;
   40767             :         }
   40768           0 :         if (py_server_unc == Py_None) {
   40769           0 :                 r->in.server_unc = NULL;
   40770             :         } else {
   40771           0 :                 r->in.server_unc = NULL;
   40772             :                 {
   40773           0 :                         const char *test_str;
   40774           0 :                         const char *talloc_str;
   40775           0 :                         PyObject *unicode = NULL;
   40776           0 :                         if (PyUnicode_Check(py_server_unc)) {
   40777           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   40778           0 :                                 if (unicode == NULL) {
   40779           0 :                                         return false;
   40780             :                                 }
   40781           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   40782           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   40783           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   40784             :                         } else {
   40785           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   40786           0 :                                 return false;
   40787             :                         }
   40788           0 :                         talloc_str = talloc_strdup(r, test_str);
   40789           0 :                         if (unicode != NULL) {
   40790           0 :                                 Py_DECREF(unicode);
   40791             :                         }
   40792           0 :                         if (talloc_str == NULL) {
   40793           0 :                                 PyErr_NoMemory();
   40794           0 :                                 return false;
   40795             :                         }
   40796           0 :                         r->in.server_unc = talloc_str;
   40797             :                 }
   40798             :         }
   40799           0 :         if (py_level == NULL) {
   40800           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   40801           0 :                 return false;
   40802             :         }
   40803             :         {
   40804           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   40805           0 :                 if (PyLong_Check(py_level)) {
   40806           0 :                         unsigned long long test_var;
   40807           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   40808           0 :                         if (PyErr_Occurred() != NULL) {
   40809           0 :                                 return false;
   40810             :                         }
   40811           0 :                         if (test_var > uint_max) {
   40812           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40813             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40814           0 :                                 return false;
   40815             :                         }
   40816           0 :                         r->in.level = test_var;
   40817             :                 } else {
   40818           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40819             :                           PyLong_Type.tp_name);
   40820           0 :                         return false;
   40821             :                 }
   40822             :         }
   40823           0 :         if (py_info == NULL) {
   40824           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info");
   40825           0 :                 return false;
   40826             :         }
   40827           0 :         r->in.info = talloc_ptrtype(r, r->in.info);
   40828           0 :         if (r->in.info == NULL) {
   40829           0 :                 PyErr_NoMemory();
   40830           0 :                 return false;
   40831             :         }
   40832             :         {
   40833           0 :                 union srvsvc_NetShareInfo *info_switch_1;
   40834           0 :                 info_switch_1 = (union srvsvc_NetShareInfo *)pyrpc_export_union(&srvsvc_NetShareInfo_Type, r, r->in.level, py_info, "union srvsvc_NetShareInfo");
   40835           0 :                 if (info_switch_1 == NULL) {
   40836           0 :                         return false;
   40837             :                 }
   40838           0 :                 r->in.info = info_switch_1;
   40839             :         }
   40840           0 :         if (py_parm_error == NULL) {
   40841           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.parm_error");
   40842           0 :                 return false;
   40843             :         }
   40844           0 :         if (py_parm_error == Py_None) {
   40845           0 :                 r->in.parm_error = NULL;
   40846             :         } else {
   40847           0 :                 r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
   40848           0 :                 if (r->in.parm_error == NULL) {
   40849           0 :                         PyErr_NoMemory();
   40850           0 :                         return false;
   40851             :                 }
   40852             :                 {
   40853           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
   40854           0 :                         if (PyLong_Check(py_parm_error)) {
   40855           0 :                                 unsigned long long test_var;
   40856           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_parm_error);
   40857           0 :                                 if (PyErr_Occurred() != NULL) {
   40858           0 :                                         return false;
   40859             :                                 }
   40860           0 :                                 if (test_var > uint_max) {
   40861           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40862             :                                           PyLong_Type.tp_name, uint_max, test_var);
   40863           0 :                                         return false;
   40864             :                                 }
   40865           0 :                                 *r->in.parm_error = test_var;
   40866             :                         } else {
   40867           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   40868             :                                   PyLong_Type.tp_name);
   40869           0 :                                 return false;
   40870             :                         }
   40871             :                 }
   40872             :         }
   40873           0 :         return true;
   40874             : }
   40875             : 
   40876           0 : static PyObject *unpack_py_srvsvc_NetShareAdd_args_out(struct srvsvc_NetShareAdd *r)
   40877             : {
   40878           0 :         PyObject *result;
   40879           0 :         PyObject *py_parm_error;
   40880           0 :         if (r->out.parm_error == NULL) {
   40881           0 :                 py_parm_error = Py_None;
   40882           0 :                 Py_INCREF(py_parm_error);
   40883             :         } else {
   40884           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.parm_error));
   40885             :         }
   40886           0 :         result = py_parm_error;
   40887           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   40888           0 :                 PyErr_SetWERROR(r->out.result);
   40889           0 :                 return NULL;
   40890             :         }
   40891             : 
   40892           0 :         return result;
   40893             : }
   40894             : 
   40895             : 
   40896           0 : static PyObject *py_srvsvc_NetShareEnumAll_in_get_server_unc(PyObject *obj, void *closure)
   40897             : {
   40898           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(obj);
   40899           0 :         PyObject *py_server_unc;
   40900           0 :         if (object->in.server_unc == NULL) {
   40901           0 :                 Py_RETURN_NONE;
   40902             :         }
   40903           0 :         if (object->in.server_unc == NULL) {
   40904           0 :                 py_server_unc = Py_None;
   40905           0 :                 Py_INCREF(py_server_unc);
   40906             :         } else {
   40907           0 :                 if (object->in.server_unc == NULL) {
   40908           0 :                         py_server_unc = Py_None;
   40909           0 :                         Py_INCREF(py_server_unc);
   40910             :                 } else {
   40911           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   40912             :                 }
   40913             :         }
   40914           0 :         return py_server_unc;
   40915             : }
   40916             : 
   40917           0 : static int py_srvsvc_NetShareEnumAll_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   40918             : {
   40919           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(py_obj);
   40920           0 :         if (value == NULL) {
   40921           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   40922           0 :                 return -1;
   40923             :         }
   40924           0 :         if (value == Py_None) {
   40925           0 :                 object->in.server_unc = NULL;
   40926             :         } else {
   40927           0 :                 object->in.server_unc = NULL;
   40928             :                 {
   40929           0 :                         const char *test_str;
   40930           0 :                         const char *talloc_str;
   40931           0 :                         PyObject *unicode = NULL;
   40932           0 :                         if (PyUnicode_Check(value)) {
   40933           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   40934           0 :                                 if (unicode == NULL) {
   40935           0 :                                         return -1;
   40936             :                                 }
   40937           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   40938           0 :                         } else if (PyBytes_Check(value)) {
   40939           0 :                                 test_str = PyBytes_AS_STRING(value);
   40940             :                         } else {
   40941           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   40942           0 :                                 return -1;
   40943             :                         }
   40944           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   40945           0 :                         if (unicode != NULL) {
   40946           0 :                                 Py_DECREF(unicode);
   40947             :                         }
   40948           0 :                         if (talloc_str == NULL) {
   40949           0 :                                 PyErr_NoMemory();
   40950           0 :                                 return -1;
   40951             :                         }
   40952           0 :                         object->in.server_unc = talloc_str;
   40953             :                 }
   40954             :         }
   40955           0 :         return 0;
   40956             : }
   40957             : 
   40958           0 : static PyObject *py_srvsvc_NetShareEnumAll_in_get_info_ctr(PyObject *obj, void *closure)
   40959             : {
   40960           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(obj);
   40961           0 :         PyObject *py_info_ctr;
   40962           0 :         if (object->in.info_ctr == NULL) {
   40963           0 :                 Py_RETURN_NONE;
   40964             :         }
   40965           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   40966           0 :         return py_info_ctr;
   40967             : }
   40968             : 
   40969           0 : static int py_srvsvc_NetShareEnumAll_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   40970             : {
   40971           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(py_obj);
   40972           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   40973           0 :         if (value == NULL) {
   40974           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info_ctr");
   40975           0 :                 return -1;
   40976             :         }
   40977           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   40978           0 :         if (object->in.info_ctr == NULL) {
   40979           0 :                 PyErr_NoMemory();
   40980           0 :                 return -1;
   40981             :         }
   40982           0 :         PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, value, return -1;);
   40983           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40984           0 :                 PyErr_NoMemory();
   40985           0 :                 return -1;
   40986             :         }
   40987           0 :         object->in.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(value);
   40988           0 :         return 0;
   40989             : }
   40990             : 
   40991           0 : static PyObject *py_srvsvc_NetShareEnumAll_out_get_info_ctr(PyObject *obj, void *closure)
   40992             : {
   40993           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(obj);
   40994           0 :         PyObject *py_info_ctr;
   40995           0 :         if (object->out.info_ctr == NULL) {
   40996           0 :                 Py_RETURN_NONE;
   40997             :         }
   40998           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   40999           0 :         return py_info_ctr;
   41000             : }
   41001             : 
   41002           0 : static int py_srvsvc_NetShareEnumAll_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   41003             : {
   41004           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(py_obj);
   41005           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   41006           0 :         if (value == NULL) {
   41007           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info_ctr");
   41008           0 :                 return -1;
   41009             :         }
   41010           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   41011           0 :         if (object->out.info_ctr == NULL) {
   41012           0 :                 PyErr_NoMemory();
   41013           0 :                 return -1;
   41014             :         }
   41015           0 :         PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, value, return -1;);
   41016           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   41017           0 :                 PyErr_NoMemory();
   41018           0 :                 return -1;
   41019             :         }
   41020           0 :         object->out.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(value);
   41021           0 :         return 0;
   41022             : }
   41023             : 
   41024           0 : static PyObject *py_srvsvc_NetShareEnumAll_in_get_max_buffer(PyObject *obj, void *closure)
   41025             : {
   41026           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(obj);
   41027           0 :         PyObject *py_max_buffer;
   41028           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)(object->in.max_buffer));
   41029           0 :         return py_max_buffer;
   41030             : }
   41031             : 
   41032           0 : static int py_srvsvc_NetShareEnumAll_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   41033             : {
   41034           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(py_obj);
   41035           0 :         if (value == NULL) {
   41036           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.max_buffer");
   41037           0 :                 return -1;
   41038             :         }
   41039             :         {
   41040           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   41041           0 :                 if (PyLong_Check(value)) {
   41042           0 :                         unsigned long long test_var;
   41043           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41044           0 :                         if (PyErr_Occurred() != NULL) {
   41045           0 :                                 return -1;
   41046             :                         }
   41047           0 :                         if (test_var > uint_max) {
   41048           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41049             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41050           0 :                                 return -1;
   41051             :                         }
   41052           0 :                         object->in.max_buffer = test_var;
   41053             :                 } else {
   41054           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41055             :                           PyLong_Type.tp_name);
   41056           0 :                         return -1;
   41057             :                 }
   41058             :         }
   41059           0 :         return 0;
   41060             : }
   41061             : 
   41062           0 : static PyObject *py_srvsvc_NetShareEnumAll_out_get_totalentries(PyObject *obj, void *closure)
   41063             : {
   41064           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(obj);
   41065           0 :         PyObject *py_totalentries;
   41066           0 :         if (object->out.totalentries == NULL) {
   41067           0 :                 Py_RETURN_NONE;
   41068             :         }
   41069           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.totalentries));
   41070           0 :         return py_totalentries;
   41071             : }
   41072             : 
   41073           0 : static int py_srvsvc_NetShareEnumAll_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   41074             : {
   41075           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(py_obj);
   41076           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   41077           0 :         if (value == NULL) {
   41078           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.totalentries");
   41079           0 :                 return -1;
   41080             :         }
   41081           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   41082           0 :         if (object->out.totalentries == NULL) {
   41083           0 :                 PyErr_NoMemory();
   41084           0 :                 return -1;
   41085             :         }
   41086             :         {
   41087           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   41088           0 :                 if (PyLong_Check(value)) {
   41089           0 :                         unsigned long long test_var;
   41090           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41091           0 :                         if (PyErr_Occurred() != NULL) {
   41092           0 :                                 return -1;
   41093             :                         }
   41094           0 :                         if (test_var > uint_max) {
   41095           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41096             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41097           0 :                                 return -1;
   41098             :                         }
   41099           0 :                         *object->out.totalentries = test_var;
   41100             :                 } else {
   41101           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41102             :                           PyLong_Type.tp_name);
   41103           0 :                         return -1;
   41104             :                 }
   41105             :         }
   41106           0 :         return 0;
   41107             : }
   41108             : 
   41109           0 : static PyObject *py_srvsvc_NetShareEnumAll_in_get_resume_handle(PyObject *obj, void *closure)
   41110             : {
   41111           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(obj);
   41112           0 :         PyObject *py_resume_handle;
   41113           0 :         if (object->in.resume_handle == NULL) {
   41114           0 :                 Py_RETURN_NONE;
   41115             :         }
   41116           0 :         if (object->in.resume_handle == NULL) {
   41117           0 :                 py_resume_handle = Py_None;
   41118           0 :                 Py_INCREF(py_resume_handle);
   41119             :         } else {
   41120           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.resume_handle));
   41121             :         }
   41122           0 :         return py_resume_handle;
   41123             : }
   41124             : 
   41125           0 : static int py_srvsvc_NetShareEnumAll_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   41126             : {
   41127           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(py_obj);
   41128           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   41129           0 :         if (value == NULL) {
   41130           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.resume_handle");
   41131           0 :                 return -1;
   41132             :         }
   41133           0 :         if (value == Py_None) {
   41134           0 :                 object->in.resume_handle = NULL;
   41135             :         } else {
   41136           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   41137           0 :                 if (object->in.resume_handle == NULL) {
   41138           0 :                         PyErr_NoMemory();
   41139           0 :                         return -1;
   41140             :                 }
   41141             :                 {
   41142           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   41143           0 :                         if (PyLong_Check(value)) {
   41144           0 :                                 unsigned long long test_var;
   41145           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   41146           0 :                                 if (PyErr_Occurred() != NULL) {
   41147           0 :                                         return -1;
   41148             :                                 }
   41149           0 :                                 if (test_var > uint_max) {
   41150           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41151             :                                           PyLong_Type.tp_name, uint_max, test_var);
   41152           0 :                                         return -1;
   41153             :                                 }
   41154           0 :                                 *object->in.resume_handle = test_var;
   41155             :                         } else {
   41156           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   41157             :                                   PyLong_Type.tp_name);
   41158           0 :                                 return -1;
   41159             :                         }
   41160             :                 }
   41161             :         }
   41162           0 :         return 0;
   41163             : }
   41164             : 
   41165           0 : static PyObject *py_srvsvc_NetShareEnumAll_out_get_resume_handle(PyObject *obj, void *closure)
   41166             : {
   41167           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(obj);
   41168           0 :         PyObject *py_resume_handle;
   41169           0 :         if (object->out.resume_handle == NULL) {
   41170           0 :                 Py_RETURN_NONE;
   41171             :         }
   41172           0 :         if (object->out.resume_handle == NULL) {
   41173           0 :                 py_resume_handle = Py_None;
   41174           0 :                 Py_INCREF(py_resume_handle);
   41175             :         } else {
   41176           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.resume_handle));
   41177             :         }
   41178           0 :         return py_resume_handle;
   41179             : }
   41180             : 
   41181           0 : static int py_srvsvc_NetShareEnumAll_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   41182             : {
   41183           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(py_obj);
   41184           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   41185           0 :         if (value == NULL) {
   41186           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.resume_handle");
   41187           0 :                 return -1;
   41188             :         }
   41189           0 :         if (value == Py_None) {
   41190           0 :                 object->out.resume_handle = NULL;
   41191             :         } else {
   41192           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   41193           0 :                 if (object->out.resume_handle == NULL) {
   41194           0 :                         PyErr_NoMemory();
   41195           0 :                         return -1;
   41196             :                 }
   41197             :                 {
   41198           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   41199           0 :                         if (PyLong_Check(value)) {
   41200           0 :                                 unsigned long long test_var;
   41201           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   41202           0 :                                 if (PyErr_Occurred() != NULL) {
   41203           0 :                                         return -1;
   41204             :                                 }
   41205           0 :                                 if (test_var > uint_max) {
   41206           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41207             :                                           PyLong_Type.tp_name, uint_max, test_var);
   41208           0 :                                         return -1;
   41209             :                                 }
   41210           0 :                                 *object->out.resume_handle = test_var;
   41211             :                         } else {
   41212           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   41213             :                                   PyLong_Type.tp_name);
   41214           0 :                                 return -1;
   41215             :                         }
   41216             :                 }
   41217             :         }
   41218           0 :         return 0;
   41219             : }
   41220             : 
   41221           0 : static PyObject *py_srvsvc_NetShareEnumAll_get_result(PyObject *obj, void *closure)
   41222             : {
   41223           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(obj);
   41224           0 :         PyObject *py_result;
   41225           0 :         py_result = PyErr_FromWERROR(object->out.result);
   41226           0 :         return py_result;
   41227             : }
   41228             : 
   41229           0 : static int py_srvsvc_NetShareEnumAll_set_result(PyObject *py_obj, PyObject *value, void *closure)
   41230             : {
   41231           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(py_obj);
   41232           0 :         if (value == NULL) {
   41233           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   41234           0 :                 return -1;
   41235             :         }
   41236           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   41237           0 :         return 0;
   41238             : }
   41239             : 
   41240             : static PyGetSetDef py_srvsvc_NetShareEnumAll_getsetters[] = {
   41241             :         {
   41242             :                 .name = discard_const_p(char, "in_server_unc"),
   41243             :                 .get = py_srvsvc_NetShareEnumAll_in_get_server_unc,
   41244             :                 .set = py_srvsvc_NetShareEnumAll_in_set_server_unc,
   41245             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   41246             :         },
   41247             :         {
   41248             :                 .name = discard_const_p(char, "in_info_ctr"),
   41249             :                 .get = py_srvsvc_NetShareEnumAll_in_get_info_ctr,
   41250             :                 .set = py_srvsvc_NetShareEnumAll_in_set_info_ctr,
   41251             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfoCtr")
   41252             :         },
   41253             :         {
   41254             :                 .name = discard_const_p(char, "out_info_ctr"),
   41255             :                 .get = py_srvsvc_NetShareEnumAll_out_get_info_ctr,
   41256             :                 .set = py_srvsvc_NetShareEnumAll_out_set_info_ctr,
   41257             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfoCtr")
   41258             :         },
   41259             :         {
   41260             :                 .name = discard_const_p(char, "in_max_buffer"),
   41261             :                 .get = py_srvsvc_NetShareEnumAll_in_get_max_buffer,
   41262             :                 .set = py_srvsvc_NetShareEnumAll_in_set_max_buffer,
   41263             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41264             :         },
   41265             :         {
   41266             :                 .name = discard_const_p(char, "out_totalentries"),
   41267             :                 .get = py_srvsvc_NetShareEnumAll_out_get_totalentries,
   41268             :                 .set = py_srvsvc_NetShareEnumAll_out_set_totalentries,
   41269             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41270             :         },
   41271             :         {
   41272             :                 .name = discard_const_p(char, "in_resume_handle"),
   41273             :                 .get = py_srvsvc_NetShareEnumAll_in_get_resume_handle,
   41274             :                 .set = py_srvsvc_NetShareEnumAll_in_set_resume_handle,
   41275             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41276             :         },
   41277             :         {
   41278             :                 .name = discard_const_p(char, "out_resume_handle"),
   41279             :                 .get = py_srvsvc_NetShareEnumAll_out_get_resume_handle,
   41280             :                 .set = py_srvsvc_NetShareEnumAll_out_set_resume_handle,
   41281             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41282             :         },
   41283             :         {
   41284             :                 .name = discard_const_p(char, "result"),
   41285             :                 .get = py_srvsvc_NetShareEnumAll_get_result,
   41286             :                 .set = py_srvsvc_NetShareEnumAll_set_result,
   41287             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   41288             :         },
   41289             :         { .name = NULL }
   41290             : };
   41291             : 
   41292           0 : static PyObject *py_srvsvc_NetShareEnumAll_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   41293             : {
   41294           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareEnumAll, type);
   41295           0 :         struct srvsvc_NetShareEnumAll *_self = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(self);
   41296           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   41297           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetShareInfoCtr);
   41298           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetShareInfoCtr);
   41299           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   41300           0 :         return self;
   41301             : }
   41302             : 
   41303           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   41304             : {
   41305             : 
   41306             : 
   41307           0 :         return PyLong_FromLong(15);
   41308             : }
   41309             : 
   41310           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   41311             : {
   41312           0 :         const struct ndr_interface_call *call = NULL;
   41313           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(py_obj);
   41314           0 :         PyObject *ret = NULL;
   41315           0 :         struct ndr_push *push = NULL;
   41316           0 :         DATA_BLOB blob;
   41317           0 :         enum ndr_err_code err;
   41318             : 
   41319           0 :         if (ndr_table_srvsvc.num_calls < 16) {
   41320           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareEnumAll_ndr_pack");
   41321           0 :                 return NULL;
   41322             :         }
   41323           0 :         call = &ndr_table_srvsvc.calls[15];
   41324             : 
   41325           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   41326           0 :         if (push == NULL) {
   41327           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41328           0 :                 return NULL;
   41329             :         }
   41330             : 
   41331           0 :         push->flags |= ndr_push_flags;
   41332             : 
   41333           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   41334           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41335           0 :                 TALLOC_FREE(push);
   41336           0 :                 PyErr_SetNdrError(err);
   41337           0 :                 return NULL;
   41338             :         }
   41339           0 :         blob = ndr_push_blob(push);
   41340           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   41341           0 :         TALLOC_FREE(push);
   41342           0 :         return ret;
   41343             : }
   41344             : 
   41345           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41346             : {
   41347           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41348           0 :         PyObject *bigendian_obj = NULL;
   41349           0 :         PyObject *ndr64_obj = NULL;
   41350           0 :         libndr_flags ndr_push_flags = 0;
   41351             : 
   41352           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   41353             :                 discard_const_p(char *, kwnames),
   41354             :                 &bigendian_obj,
   41355             :                 &ndr64_obj)) {
   41356           0 :                 return NULL;
   41357             :         }
   41358             : 
   41359           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41360           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41361             :         }
   41362           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41363           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41364             :         }
   41365             : 
   41366           0 :         return py_srvsvc_NetShareEnumAll_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   41367             : }
   41368             : 
   41369           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41370             : {
   41371           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41372           0 :         PyObject *bigendian_obj = NULL;
   41373           0 :         PyObject *ndr64_obj = NULL;
   41374           0 :         libndr_flags ndr_push_flags = 0;
   41375             : 
   41376           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   41377             :                 discard_const_p(char *, kwnames),
   41378             :                 &bigendian_obj,
   41379             :                 &ndr64_obj)) {
   41380           0 :                 return NULL;
   41381             :         }
   41382             : 
   41383           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41384           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41385             :         }
   41386           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41387           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41388             :         }
   41389             : 
   41390           0 :         return py_srvsvc_NetShareEnumAll_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   41391             : }
   41392             : 
   41393           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   41394             : {
   41395           0 :         const struct ndr_interface_call *call = NULL;
   41396           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(py_obj);
   41397           0 :         struct ndr_pull *pull = NULL;
   41398           0 :         enum ndr_err_code err;
   41399             : 
   41400           0 :         if (ndr_table_srvsvc.num_calls < 16) {
   41401           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareEnumAll_ndr_unpack");
   41402           0 :                 return NULL;
   41403             :         }
   41404           0 :         call = &ndr_table_srvsvc.calls[15];
   41405             : 
   41406           0 :         pull = ndr_pull_init_blob(blob, object);
   41407           0 :         if (pull == NULL) {
   41408           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41409           0 :                 return NULL;
   41410             :         }
   41411             : 
   41412           0 :         pull->flags |= ndr_pull_flags;
   41413             : 
   41414           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   41415           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41416           0 :                 TALLOC_FREE(pull);
   41417           0 :                 PyErr_SetNdrError(err);
   41418           0 :                 return NULL;
   41419             :         }
   41420           0 :         if (!allow_remaining) {
   41421           0 :                 uint32_t highest_ofs;
   41422             : 
   41423           0 :                 if (pull->offset > pull->relative_highest_offset) {
   41424           0 :                         highest_ofs = pull->offset;
   41425             :                 } else {
   41426           0 :                         highest_ofs = pull->relative_highest_offset;
   41427             :                 }
   41428           0 :                 if (highest_ofs < pull->data_size) {
   41429           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   41430             :                                 "not all bytes consumed ofs[%u] size[%u]",
   41431             :                                 highest_ofs, pull->data_size);
   41432           0 :                         TALLOC_FREE(pull);
   41433           0 :                         PyErr_SetNdrError(err);
   41434           0 :                         return NULL;
   41435             :                 }
   41436             :         }
   41437             : 
   41438           0 :         TALLOC_FREE(pull);
   41439           0 :         Py_RETURN_NONE;
   41440             : }
   41441             : 
   41442           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41443             : {
   41444           0 :         DATA_BLOB blob;
   41445           0 :         Py_ssize_t blob_length = 0;
   41446           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41447           0 :         PyObject *bigendian_obj = NULL;
   41448           0 :         PyObject *ndr64_obj = NULL;
   41449           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41450           0 :         PyObject *allow_remaining_obj = NULL;
   41451           0 :         bool allow_remaining = false;
   41452             : 
   41453           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   41454             :                 discard_const_p(char *, kwnames),
   41455             :                 &blob.data, &blob_length,
   41456             :                 &bigendian_obj,
   41457             :                 &ndr64_obj,
   41458             :                 &allow_remaining_obj)) {
   41459           0 :                 return NULL;
   41460             :         }
   41461           0 :         blob.length = blob_length;
   41462             : 
   41463           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41464           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41465             :         }
   41466           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41467           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41468             :         }
   41469             : 
   41470           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41471           0 :                 allow_remaining = true;
   41472             :         }
   41473             : 
   41474           0 :         return py_srvsvc_NetShareEnumAll_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   41475             : }
   41476             : 
   41477           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41478             : {
   41479           0 :         DATA_BLOB blob;
   41480           0 :         Py_ssize_t blob_length = 0;
   41481           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41482           0 :         PyObject *bigendian_obj = NULL;
   41483           0 :         PyObject *ndr64_obj = NULL;
   41484           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41485           0 :         PyObject *allow_remaining_obj = NULL;
   41486           0 :         bool allow_remaining = false;
   41487             : 
   41488           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   41489             :                 discard_const_p(char *, kwnames),
   41490             :                 &blob.data, &blob_length,
   41491             :                 &bigendian_obj,
   41492             :                 &ndr64_obj,
   41493             :                 &allow_remaining_obj)) {
   41494           0 :                 return NULL;
   41495             :         }
   41496           0 :         blob.length = blob_length;
   41497             : 
   41498           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41499           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41500             :         }
   41501           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41502           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41503             :         }
   41504             : 
   41505           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41506           0 :                 allow_remaining = true;
   41507             :         }
   41508             : 
   41509           0 :         return py_srvsvc_NetShareEnumAll_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   41510             : }
   41511             : 
   41512           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   41513             : {
   41514           0 :         const struct ndr_interface_call *call = NULL;
   41515           0 :         struct srvsvc_NetShareEnumAll *object = pytalloc_get_ptr(py_obj);
   41516           0 :         PyObject *ret;
   41517           0 :         char *retstr;
   41518             : 
   41519           0 :         if (ndr_table_srvsvc.num_calls < 16) {
   41520           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareEnumAll_ndr_print");
   41521           0 :                 return NULL;
   41522             :         }
   41523           0 :         call = &ndr_table_srvsvc.calls[15];
   41524             : 
   41525           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   41526           0 :         ret = PyUnicode_FromString(retstr);
   41527           0 :         TALLOC_FREE(retstr);
   41528             : 
   41529           0 :         return ret;
   41530             : }
   41531             : 
   41532           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41533             : {
   41534           0 :         return py_srvsvc_NetShareEnumAll_ndr_print(py_obj, "srvsvc_NetShareEnumAll_in", NDR_IN);
   41535             : }
   41536             : 
   41537           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41538             : {
   41539           0 :         return py_srvsvc_NetShareEnumAll_ndr_print(py_obj, "srvsvc_NetShareEnumAll_out", NDR_OUT);
   41540             : }
   41541             : 
   41542             : static PyMethodDef py_srvsvc_NetShareEnumAll_methods[] = {
   41543             :         { "opnum", (PyCFunction)py_srvsvc_NetShareEnumAll_ndr_opnum, METH_NOARGS|METH_CLASS,
   41544             :                 "srvsvc.NetShareEnumAll.opnum() -> 15 (0x0f) " },
   41545             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnumAll_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   41546             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   41547             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnumAll_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   41548             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   41549             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnumAll_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   41550             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   41551             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnumAll_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   41552             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   41553             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareEnumAll_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   41554             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareEnumAll_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   41555             :         { NULL, NULL, 0, NULL }
   41556             : };
   41557             : 
   41558             : 
   41559             : static PyTypeObject srvsvc_NetShareEnumAll_Type = {
   41560             :         PyVarObject_HEAD_INIT(NULL, 0)
   41561             :         .tp_name = "srvsvc.NetShareEnumAll",
   41562             :         .tp_getset = py_srvsvc_NetShareEnumAll_getsetters,
   41563             :         .tp_methods = py_srvsvc_NetShareEnumAll_methods,
   41564             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   41565             :         .tp_new = py_srvsvc_NetShareEnumAll_new,
   41566             : };
   41567             : 
   41568           0 : static bool pack_py_srvsvc_NetShareEnumAll_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareEnumAll *r)
   41569             : {
   41570           0 :         PyObject *py_server_unc;
   41571           0 :         PyObject *py_info_ctr;
   41572           0 :         PyObject *py_max_buffer;
   41573           0 :         PyObject *py_resume_handle;
   41574           0 :         const char *kwnames[] = {
   41575             :                 "server_unc", "info_ctr", "max_buffer", "resume_handle", NULL
   41576             :         };
   41577             : 
   41578           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)) {
   41579           0 :                 return false;
   41580             :         }
   41581             : 
   41582           0 :         if (py_server_unc == NULL) {
   41583           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   41584           0 :                 return false;
   41585             :         }
   41586           0 :         if (py_server_unc == Py_None) {
   41587           0 :                 r->in.server_unc = NULL;
   41588             :         } else {
   41589           0 :                 r->in.server_unc = NULL;
   41590             :                 {
   41591           0 :                         const char *test_str;
   41592           0 :                         const char *talloc_str;
   41593           0 :                         PyObject *unicode = NULL;
   41594           0 :                         if (PyUnicode_Check(py_server_unc)) {
   41595           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   41596           0 :                                 if (unicode == NULL) {
   41597           0 :                                         return false;
   41598             :                                 }
   41599           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   41600           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   41601           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   41602             :                         } else {
   41603           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   41604           0 :                                 return false;
   41605             :                         }
   41606           0 :                         talloc_str = talloc_strdup(r, test_str);
   41607           0 :                         if (unicode != NULL) {
   41608           0 :                                 Py_DECREF(unicode);
   41609             :                         }
   41610           0 :                         if (talloc_str == NULL) {
   41611           0 :                                 PyErr_NoMemory();
   41612           0 :                                 return false;
   41613             :                         }
   41614           0 :                         r->in.server_unc = talloc_str;
   41615             :                 }
   41616             :         }
   41617           0 :         if (py_info_ctr == NULL) {
   41618           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info_ctr");
   41619           0 :                 return false;
   41620             :         }
   41621           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   41622           0 :         if (r->in.info_ctr == NULL) {
   41623           0 :                 PyErr_NoMemory();
   41624           0 :                 return false;
   41625             :         }
   41626           0 :         PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, py_info_ctr, return false;);
   41627           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   41628           0 :                 PyErr_NoMemory();
   41629           0 :                 return false;
   41630             :         }
   41631           0 :         r->in.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   41632           0 :         if (py_max_buffer == NULL) {
   41633           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.max_buffer");
   41634           0 :                 return false;
   41635             :         }
   41636             :         {
   41637           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   41638           0 :                 if (PyLong_Check(py_max_buffer)) {
   41639           0 :                         unsigned long long test_var;
   41640           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   41641           0 :                         if (PyErr_Occurred() != NULL) {
   41642           0 :                                 return false;
   41643             :                         }
   41644           0 :                         if (test_var > uint_max) {
   41645           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41646             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41647           0 :                                 return false;
   41648             :                         }
   41649           0 :                         r->in.max_buffer = test_var;
   41650             :                 } else {
   41651           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41652             :                           PyLong_Type.tp_name);
   41653           0 :                         return false;
   41654             :                 }
   41655             :         }
   41656           0 :         if (py_resume_handle == NULL) {
   41657           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.resume_handle");
   41658           0 :                 return false;
   41659             :         }
   41660           0 :         if (py_resume_handle == Py_None) {
   41661           0 :                 r->in.resume_handle = NULL;
   41662             :         } else {
   41663           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   41664           0 :                 if (r->in.resume_handle == NULL) {
   41665           0 :                         PyErr_NoMemory();
   41666           0 :                         return false;
   41667             :                 }
   41668             :                 {
   41669           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   41670           0 :                         if (PyLong_Check(py_resume_handle)) {
   41671           0 :                                 unsigned long long test_var;
   41672           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   41673           0 :                                 if (PyErr_Occurred() != NULL) {
   41674           0 :                                         return false;
   41675             :                                 }
   41676           0 :                                 if (test_var > uint_max) {
   41677           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41678             :                                           PyLong_Type.tp_name, uint_max, test_var);
   41679           0 :                                         return false;
   41680             :                                 }
   41681           0 :                                 *r->in.resume_handle = test_var;
   41682             :                         } else {
   41683           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   41684             :                                   PyLong_Type.tp_name);
   41685           0 :                                 return false;
   41686             :                         }
   41687             :                 }
   41688             :         }
   41689           0 :         return true;
   41690             : }
   41691             : 
   41692           0 : static PyObject *unpack_py_srvsvc_NetShareEnumAll_args_out(struct srvsvc_NetShareEnumAll *r)
   41693             : {
   41694           0 :         PyObject *result;
   41695           0 :         PyObject *py_info_ctr;
   41696           0 :         PyObject *py_totalentries;
   41697           0 :         PyObject *py_resume_handle;
   41698           0 :         result = PyTuple_New(3);
   41699           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   41700           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   41701           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.totalentries));
   41702           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   41703           0 :         if (r->out.resume_handle == NULL) {
   41704           0 :                 py_resume_handle = Py_None;
   41705           0 :                 Py_INCREF(py_resume_handle);
   41706             :         } else {
   41707           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.resume_handle));
   41708             :         }
   41709           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   41710           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   41711           0 :                 PyErr_SetWERROR(r->out.result);
   41712           0 :                 return NULL;
   41713             :         }
   41714             : 
   41715           0 :         return result;
   41716             : }
   41717             : 
   41718             : 
   41719           0 : static PyObject *py_srvsvc_NetShareGetInfo_in_get_server_unc(PyObject *obj, void *closure)
   41720             : {
   41721           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(obj);
   41722           0 :         PyObject *py_server_unc;
   41723           0 :         if (object->in.server_unc == NULL) {
   41724           0 :                 Py_RETURN_NONE;
   41725             :         }
   41726           0 :         if (object->in.server_unc == NULL) {
   41727           0 :                 py_server_unc = Py_None;
   41728           0 :                 Py_INCREF(py_server_unc);
   41729             :         } else {
   41730           0 :                 if (object->in.server_unc == NULL) {
   41731           0 :                         py_server_unc = Py_None;
   41732           0 :                         Py_INCREF(py_server_unc);
   41733             :                 } else {
   41734           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   41735             :                 }
   41736             :         }
   41737           0 :         return py_server_unc;
   41738             : }
   41739             : 
   41740           0 : static int py_srvsvc_NetShareGetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   41741             : {
   41742           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(py_obj);
   41743           0 :         if (value == NULL) {
   41744           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   41745           0 :                 return -1;
   41746             :         }
   41747           0 :         if (value == Py_None) {
   41748           0 :                 object->in.server_unc = NULL;
   41749             :         } else {
   41750           0 :                 object->in.server_unc = NULL;
   41751             :                 {
   41752           0 :                         const char *test_str;
   41753           0 :                         const char *talloc_str;
   41754           0 :                         PyObject *unicode = NULL;
   41755           0 :                         if (PyUnicode_Check(value)) {
   41756           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   41757           0 :                                 if (unicode == NULL) {
   41758           0 :                                         return -1;
   41759             :                                 }
   41760           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   41761           0 :                         } else if (PyBytes_Check(value)) {
   41762           0 :                                 test_str = PyBytes_AS_STRING(value);
   41763             :                         } else {
   41764           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   41765           0 :                                 return -1;
   41766             :                         }
   41767           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   41768           0 :                         if (unicode != NULL) {
   41769           0 :                                 Py_DECREF(unicode);
   41770             :                         }
   41771           0 :                         if (talloc_str == NULL) {
   41772           0 :                                 PyErr_NoMemory();
   41773           0 :                                 return -1;
   41774             :                         }
   41775           0 :                         object->in.server_unc = talloc_str;
   41776             :                 }
   41777             :         }
   41778           0 :         return 0;
   41779             : }
   41780             : 
   41781           0 : static PyObject *py_srvsvc_NetShareGetInfo_in_get_share_name(PyObject *obj, void *closure)
   41782             : {
   41783           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(obj);
   41784           0 :         PyObject *py_share_name;
   41785           0 :         if (object->in.share_name == NULL) {
   41786           0 :                 py_share_name = Py_None;
   41787           0 :                 Py_INCREF(py_share_name);
   41788             :         } else {
   41789           0 :                 py_share_name = PyUnicode_Decode(object->in.share_name, strlen(object->in.share_name), "utf-8", "ignore");
   41790             :         }
   41791           0 :         return py_share_name;
   41792             : }
   41793             : 
   41794           0 : static int py_srvsvc_NetShareGetInfo_in_set_share_name(PyObject *py_obj, PyObject *value, void *closure)
   41795             : {
   41796           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(py_obj);
   41797           0 :         if (value == NULL) {
   41798           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.share_name");
   41799           0 :                 return -1;
   41800             :         }
   41801             :         {
   41802           0 :                 const char *test_str;
   41803           0 :                 const char *talloc_str;
   41804           0 :                 PyObject *unicode = NULL;
   41805           0 :                 if (PyUnicode_Check(value)) {
   41806           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   41807           0 :                         if (unicode == NULL) {
   41808           0 :                                 return -1;
   41809             :                         }
   41810           0 :                         test_str = PyBytes_AS_STRING(unicode);
   41811           0 :                 } else if (PyBytes_Check(value)) {
   41812           0 :                         test_str = PyBytes_AS_STRING(value);
   41813             :                 } else {
   41814           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   41815           0 :                         return -1;
   41816             :                 }
   41817           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   41818           0 :                 if (unicode != NULL) {
   41819           0 :                         Py_DECREF(unicode);
   41820             :                 }
   41821           0 :                 if (talloc_str == NULL) {
   41822           0 :                         PyErr_NoMemory();
   41823           0 :                         return -1;
   41824             :                 }
   41825           0 :                 object->in.share_name = talloc_str;
   41826             :         }
   41827           0 :         return 0;
   41828             : }
   41829             : 
   41830           0 : static PyObject *py_srvsvc_NetShareGetInfo_in_get_level(PyObject *obj, void *closure)
   41831             : {
   41832           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(obj);
   41833           0 :         PyObject *py_level;
   41834           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   41835           0 :         return py_level;
   41836             : }
   41837             : 
   41838           0 : static int py_srvsvc_NetShareGetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   41839             : {
   41840           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(py_obj);
   41841           0 :         if (value == NULL) {
   41842           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   41843           0 :                 return -1;
   41844             :         }
   41845             :         {
   41846           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   41847           0 :                 if (PyLong_Check(value)) {
   41848           0 :                         unsigned long long test_var;
   41849           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41850           0 :                         if (PyErr_Occurred() != NULL) {
   41851           0 :                                 return -1;
   41852             :                         }
   41853           0 :                         if (test_var > uint_max) {
   41854           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41855             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41856           0 :                                 return -1;
   41857             :                         }
   41858           0 :                         object->in.level = test_var;
   41859             :                 } else {
   41860           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41861             :                           PyLong_Type.tp_name);
   41862           0 :                         return -1;
   41863             :                 }
   41864             :         }
   41865           0 :         return 0;
   41866             : }
   41867             : 
   41868           0 : static PyObject *py_srvsvc_NetShareGetInfo_out_get_info(PyObject *obj, void *closure)
   41869             : {
   41870           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(obj);
   41871           0 :         PyObject *py_info;
   41872           0 :         if (object->out.info == NULL) {
   41873           0 :                 Py_RETURN_NONE;
   41874             :         }
   41875           0 :         py_info = pyrpc_import_union(&srvsvc_NetShareInfo_Type, object->out.info, object->in.level, object->out.info, "union srvsvc_NetShareInfo");
   41876           0 :         if (py_info == NULL) {
   41877           0 :                 return NULL;
   41878             :         }
   41879           0 :         return py_info;
   41880             : }
   41881             : 
   41882           0 : static int py_srvsvc_NetShareGetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   41883             : {
   41884           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(py_obj);
   41885           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   41886           0 :         if (value == NULL) {
   41887           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   41888           0 :                 return -1;
   41889             :         }
   41890           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   41891           0 :         if (object->out.info == NULL) {
   41892           0 :                 PyErr_NoMemory();
   41893           0 :                 return -1;
   41894             :         }
   41895             :         {
   41896           0 :                 union srvsvc_NetShareInfo *info_switch_1;
   41897           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");
   41898           0 :                 if (info_switch_1 == NULL) {
   41899           0 :                         return -1;
   41900             :                 }
   41901           0 :                 object->out.info = info_switch_1;
   41902             :         }
   41903           0 :         return 0;
   41904             : }
   41905             : 
   41906           0 : static PyObject *py_srvsvc_NetShareGetInfo_get_result(PyObject *obj, void *closure)
   41907             : {
   41908           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(obj);
   41909           0 :         PyObject *py_result;
   41910           0 :         py_result = PyErr_FromWERROR(object->out.result);
   41911           0 :         return py_result;
   41912             : }
   41913             : 
   41914           0 : static int py_srvsvc_NetShareGetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   41915             : {
   41916           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(py_obj);
   41917           0 :         if (value == NULL) {
   41918           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   41919           0 :                 return -1;
   41920             :         }
   41921           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   41922           0 :         return 0;
   41923             : }
   41924             : 
   41925             : static PyGetSetDef py_srvsvc_NetShareGetInfo_getsetters[] = {
   41926             :         {
   41927             :                 .name = discard_const_p(char, "in_server_unc"),
   41928             :                 .get = py_srvsvc_NetShareGetInfo_in_get_server_unc,
   41929             :                 .set = py_srvsvc_NetShareGetInfo_in_set_server_unc,
   41930             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   41931             :         },
   41932             :         {
   41933             :                 .name = discard_const_p(char, "in_share_name"),
   41934             :                 .get = py_srvsvc_NetShareGetInfo_in_get_share_name,
   41935             :                 .set = py_srvsvc_NetShareGetInfo_in_set_share_name,
   41936             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   41937             :         },
   41938             :         {
   41939             :                 .name = discard_const_p(char, "in_level"),
   41940             :                 .get = py_srvsvc_NetShareGetInfo_in_get_level,
   41941             :                 .set = py_srvsvc_NetShareGetInfo_in_set_level,
   41942             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41943             :         },
   41944             :         {
   41945             :                 .name = discard_const_p(char, "out_info"),
   41946             :                 .get = py_srvsvc_NetShareGetInfo_out_get_info,
   41947             :                 .set = py_srvsvc_NetShareGetInfo_out_set_info,
   41948             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo")
   41949             :         },
   41950             :         {
   41951             :                 .name = discard_const_p(char, "result"),
   41952             :                 .get = py_srvsvc_NetShareGetInfo_get_result,
   41953             :                 .set = py_srvsvc_NetShareGetInfo_set_result,
   41954             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   41955             :         },
   41956             :         { .name = NULL }
   41957             : };
   41958             : 
   41959           0 : static PyObject *py_srvsvc_NetShareGetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   41960             : {
   41961           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareGetInfo, type);
   41962           0 :         struct srvsvc_NetShareGetInfo *_self = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(self);
   41963           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   41964           0 :         _self->out.info = talloc_zero(mem_ctx, union srvsvc_NetShareInfo);
   41965           0 :         return self;
   41966             : }
   41967             : 
   41968           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   41969             : {
   41970             : 
   41971             : 
   41972           0 :         return PyLong_FromLong(16);
   41973             : }
   41974             : 
   41975           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   41976             : {
   41977           0 :         const struct ndr_interface_call *call = NULL;
   41978           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(py_obj);
   41979           0 :         PyObject *ret = NULL;
   41980           0 :         struct ndr_push *push = NULL;
   41981           0 :         DATA_BLOB blob;
   41982           0 :         enum ndr_err_code err;
   41983             : 
   41984           0 :         if (ndr_table_srvsvc.num_calls < 17) {
   41985           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareGetInfo_ndr_pack");
   41986           0 :                 return NULL;
   41987             :         }
   41988           0 :         call = &ndr_table_srvsvc.calls[16];
   41989             : 
   41990           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   41991           0 :         if (push == NULL) {
   41992           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41993           0 :                 return NULL;
   41994             :         }
   41995             : 
   41996           0 :         push->flags |= ndr_push_flags;
   41997             : 
   41998           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   41999           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42000           0 :                 TALLOC_FREE(push);
   42001           0 :                 PyErr_SetNdrError(err);
   42002           0 :                 return NULL;
   42003             :         }
   42004           0 :         blob = ndr_push_blob(push);
   42005           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   42006           0 :         TALLOC_FREE(push);
   42007           0 :         return ret;
   42008             : }
   42009             : 
   42010           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42011             : {
   42012           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42013           0 :         PyObject *bigendian_obj = NULL;
   42014           0 :         PyObject *ndr64_obj = NULL;
   42015           0 :         libndr_flags ndr_push_flags = 0;
   42016             : 
   42017           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   42018             :                 discard_const_p(char *, kwnames),
   42019             :                 &bigendian_obj,
   42020             :                 &ndr64_obj)) {
   42021           0 :                 return NULL;
   42022             :         }
   42023             : 
   42024           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42025           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42026             :         }
   42027           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42028           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42029             :         }
   42030             : 
   42031           0 :         return py_srvsvc_NetShareGetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   42032             : }
   42033             : 
   42034           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42035             : {
   42036           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42037           0 :         PyObject *bigendian_obj = NULL;
   42038           0 :         PyObject *ndr64_obj = NULL;
   42039           0 :         libndr_flags ndr_push_flags = 0;
   42040             : 
   42041           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   42042             :                 discard_const_p(char *, kwnames),
   42043             :                 &bigendian_obj,
   42044             :                 &ndr64_obj)) {
   42045           0 :                 return NULL;
   42046             :         }
   42047             : 
   42048           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42049           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42050             :         }
   42051           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42052           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42053             :         }
   42054             : 
   42055           0 :         return py_srvsvc_NetShareGetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   42056             : }
   42057             : 
   42058           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   42059             : {
   42060           0 :         const struct ndr_interface_call *call = NULL;
   42061           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(py_obj);
   42062           0 :         struct ndr_pull *pull = NULL;
   42063           0 :         enum ndr_err_code err;
   42064             : 
   42065           0 :         if (ndr_table_srvsvc.num_calls < 17) {
   42066           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareGetInfo_ndr_unpack");
   42067           0 :                 return NULL;
   42068             :         }
   42069           0 :         call = &ndr_table_srvsvc.calls[16];
   42070             : 
   42071           0 :         pull = ndr_pull_init_blob(blob, object);
   42072           0 :         if (pull == NULL) {
   42073           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42074           0 :                 return NULL;
   42075             :         }
   42076             : 
   42077           0 :         pull->flags |= ndr_pull_flags;
   42078             : 
   42079           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   42080           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42081           0 :                 TALLOC_FREE(pull);
   42082           0 :                 PyErr_SetNdrError(err);
   42083           0 :                 return NULL;
   42084             :         }
   42085           0 :         if (!allow_remaining) {
   42086           0 :                 uint32_t highest_ofs;
   42087             : 
   42088           0 :                 if (pull->offset > pull->relative_highest_offset) {
   42089           0 :                         highest_ofs = pull->offset;
   42090             :                 } else {
   42091           0 :                         highest_ofs = pull->relative_highest_offset;
   42092             :                 }
   42093           0 :                 if (highest_ofs < pull->data_size) {
   42094           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   42095             :                                 "not all bytes consumed ofs[%u] size[%u]",
   42096             :                                 highest_ofs, pull->data_size);
   42097           0 :                         TALLOC_FREE(pull);
   42098           0 :                         PyErr_SetNdrError(err);
   42099           0 :                         return NULL;
   42100             :                 }
   42101             :         }
   42102             : 
   42103           0 :         TALLOC_FREE(pull);
   42104           0 :         Py_RETURN_NONE;
   42105             : }
   42106             : 
   42107           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42108             : {
   42109           0 :         DATA_BLOB blob;
   42110           0 :         Py_ssize_t blob_length = 0;
   42111           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42112           0 :         PyObject *bigendian_obj = NULL;
   42113           0 :         PyObject *ndr64_obj = NULL;
   42114           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42115           0 :         PyObject *allow_remaining_obj = NULL;
   42116           0 :         bool allow_remaining = false;
   42117             : 
   42118           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   42119             :                 discard_const_p(char *, kwnames),
   42120             :                 &blob.data, &blob_length,
   42121             :                 &bigendian_obj,
   42122             :                 &ndr64_obj,
   42123             :                 &allow_remaining_obj)) {
   42124           0 :                 return NULL;
   42125             :         }
   42126           0 :         blob.length = blob_length;
   42127             : 
   42128           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42129           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42130             :         }
   42131           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42132           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42133             :         }
   42134             : 
   42135           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42136           0 :                 allow_remaining = true;
   42137             :         }
   42138             : 
   42139           0 :         return py_srvsvc_NetShareGetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   42140             : }
   42141             : 
   42142           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42143             : {
   42144           0 :         DATA_BLOB blob;
   42145           0 :         Py_ssize_t blob_length = 0;
   42146           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42147           0 :         PyObject *bigendian_obj = NULL;
   42148           0 :         PyObject *ndr64_obj = NULL;
   42149           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42150           0 :         PyObject *allow_remaining_obj = NULL;
   42151           0 :         bool allow_remaining = false;
   42152             : 
   42153           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   42154             :                 discard_const_p(char *, kwnames),
   42155             :                 &blob.data, &blob_length,
   42156             :                 &bigendian_obj,
   42157             :                 &ndr64_obj,
   42158             :                 &allow_remaining_obj)) {
   42159           0 :                 return NULL;
   42160             :         }
   42161           0 :         blob.length = blob_length;
   42162             : 
   42163           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42164           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42165             :         }
   42166           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42167           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42168             :         }
   42169             : 
   42170           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42171           0 :                 allow_remaining = true;
   42172             :         }
   42173             : 
   42174           0 :         return py_srvsvc_NetShareGetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   42175             : }
   42176             : 
   42177           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   42178             : {
   42179           0 :         const struct ndr_interface_call *call = NULL;
   42180           0 :         struct srvsvc_NetShareGetInfo *object = pytalloc_get_ptr(py_obj);
   42181           0 :         PyObject *ret;
   42182           0 :         char *retstr;
   42183             : 
   42184           0 :         if (ndr_table_srvsvc.num_calls < 17) {
   42185           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareGetInfo_ndr_print");
   42186           0 :                 return NULL;
   42187             :         }
   42188           0 :         call = &ndr_table_srvsvc.calls[16];
   42189             : 
   42190           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   42191           0 :         ret = PyUnicode_FromString(retstr);
   42192           0 :         TALLOC_FREE(retstr);
   42193             : 
   42194           0 :         return ret;
   42195             : }
   42196             : 
   42197           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42198             : {
   42199           0 :         return py_srvsvc_NetShareGetInfo_ndr_print(py_obj, "srvsvc_NetShareGetInfo_in", NDR_IN);
   42200             : }
   42201             : 
   42202           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42203             : {
   42204           0 :         return py_srvsvc_NetShareGetInfo_ndr_print(py_obj, "srvsvc_NetShareGetInfo_out", NDR_OUT);
   42205             : }
   42206             : 
   42207             : static PyMethodDef py_srvsvc_NetShareGetInfo_methods[] = {
   42208             :         { "opnum", (PyCFunction)py_srvsvc_NetShareGetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   42209             :                 "srvsvc.NetShareGetInfo.opnum() -> 16 (0x10) " },
   42210             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareGetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   42211             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   42212             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareGetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   42213             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   42214             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareGetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   42215             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   42216             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareGetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   42217             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   42218             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareGetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   42219             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareGetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   42220             :         { NULL, NULL, 0, NULL }
   42221             : };
   42222             : 
   42223             : 
   42224             : static PyTypeObject srvsvc_NetShareGetInfo_Type = {
   42225             :         PyVarObject_HEAD_INIT(NULL, 0)
   42226             :         .tp_name = "srvsvc.NetShareGetInfo",
   42227             :         .tp_getset = py_srvsvc_NetShareGetInfo_getsetters,
   42228             :         .tp_methods = py_srvsvc_NetShareGetInfo_methods,
   42229             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   42230             :         .tp_new = py_srvsvc_NetShareGetInfo_new,
   42231             : };
   42232             : 
   42233           1 : static bool pack_py_srvsvc_NetShareGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareGetInfo *r)
   42234             : {
   42235           0 :         PyObject *py_server_unc;
   42236           0 :         PyObject *py_share_name;
   42237           0 :         PyObject *py_level;
   42238           1 :         const char *kwnames[] = {
   42239             :                 "server_unc", "share_name", "level", NULL
   42240             :         };
   42241             : 
   42242           1 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetShareGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_share_name, &py_level)) {
   42243           0 :                 return false;
   42244             :         }
   42245             : 
   42246           1 :         if (py_server_unc == NULL) {
   42247           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   42248           0 :                 return false;
   42249             :         }
   42250           1 :         if (py_server_unc == Py_None) {
   42251           0 :                 r->in.server_unc = NULL;
   42252             :         } else {
   42253           1 :                 r->in.server_unc = NULL;
   42254             :                 {
   42255           0 :                         const char *test_str;
   42256           0 :                         const char *talloc_str;
   42257           1 :                         PyObject *unicode = NULL;
   42258           1 :                         if (PyUnicode_Check(py_server_unc)) {
   42259           1 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   42260           1 :                                 if (unicode == NULL) {
   42261           0 :                                         return false;
   42262             :                                 }
   42263           1 :                                 test_str = PyBytes_AS_STRING(unicode);
   42264           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   42265           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   42266             :                         } else {
   42267           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   42268           0 :                                 return false;
   42269             :                         }
   42270           1 :                         talloc_str = talloc_strdup(r, test_str);
   42271           1 :                         if (unicode != NULL) {
   42272           1 :                                 Py_DECREF(unicode);
   42273             :                         }
   42274           1 :                         if (talloc_str == NULL) {
   42275           0 :                                 PyErr_NoMemory();
   42276           0 :                                 return false;
   42277             :                         }
   42278           1 :                         r->in.server_unc = talloc_str;
   42279             :                 }
   42280             :         }
   42281           1 :         if (py_share_name == NULL) {
   42282           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.share_name");
   42283           0 :                 return false;
   42284             :         }
   42285             :         {
   42286           0 :                 const char *test_str;
   42287           0 :                 const char *talloc_str;
   42288           1 :                 PyObject *unicode = NULL;
   42289           1 :                 if (PyUnicode_Check(py_share_name)) {
   42290           1 :                         unicode = PyUnicode_AsEncodedString(py_share_name, "utf-8", "ignore");
   42291           1 :                         if (unicode == NULL) {
   42292           0 :                                 return false;
   42293             :                         }
   42294           1 :                         test_str = PyBytes_AS_STRING(unicode);
   42295           0 :                 } else if (PyBytes_Check(py_share_name)) {
   42296           0 :                         test_str = PyBytes_AS_STRING(py_share_name);
   42297             :                 } else {
   42298           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
   42299           0 :                         return false;
   42300             :                 }
   42301           1 :                 talloc_str = talloc_strdup(r, test_str);
   42302           1 :                 if (unicode != NULL) {
   42303           1 :                         Py_DECREF(unicode);
   42304             :                 }
   42305           1 :                 if (talloc_str == NULL) {
   42306           0 :                         PyErr_NoMemory();
   42307           0 :                         return false;
   42308             :                 }
   42309           1 :                 r->in.share_name = talloc_str;
   42310             :         }
   42311           1 :         if (py_level == NULL) {
   42312           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   42313           0 :                 return false;
   42314             :         }
   42315             :         {
   42316           1 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   42317           1 :                 if (PyLong_Check(py_level)) {
   42318           0 :                         unsigned long long test_var;
   42319           1 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   42320           1 :                         if (PyErr_Occurred() != NULL) {
   42321           0 :                                 return false;
   42322             :                         }
   42323           1 :                         if (test_var > uint_max) {
   42324           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42325             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42326           0 :                                 return false;
   42327             :                         }
   42328           1 :                         r->in.level = test_var;
   42329             :                 } else {
   42330           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42331             :                           PyLong_Type.tp_name);
   42332           0 :                         return false;
   42333             :                 }
   42334             :         }
   42335           1 :         return true;
   42336             : }
   42337             : 
   42338           1 : static PyObject *unpack_py_srvsvc_NetShareGetInfo_args_out(struct srvsvc_NetShareGetInfo *r)
   42339             : {
   42340           0 :         PyObject *result;
   42341           0 :         PyObject *py_info;
   42342           1 :         py_info = pyrpc_import_union(&srvsvc_NetShareInfo_Type, r->out.info, r->in.level, r->out.info, "union srvsvc_NetShareInfo");
   42343           1 :         if (py_info == NULL) {
   42344           0 :                 return NULL;
   42345             :         }
   42346           1 :         result = py_info;
   42347           1 :         if (!W_ERROR_IS_OK(r->out.result)) {
   42348           0 :                 PyErr_SetWERROR(r->out.result);
   42349           0 :                 return NULL;
   42350             :         }
   42351             : 
   42352           1 :         return result;
   42353             : }
   42354             : 
   42355             : 
   42356           0 : static PyObject *py_srvsvc_NetShareSetInfo_in_get_server_unc(PyObject *obj, void *closure)
   42357             : {
   42358           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(obj);
   42359           0 :         PyObject *py_server_unc;
   42360           0 :         if (object->in.server_unc == NULL) {
   42361           0 :                 Py_RETURN_NONE;
   42362             :         }
   42363           0 :         if (object->in.server_unc == NULL) {
   42364           0 :                 py_server_unc = Py_None;
   42365           0 :                 Py_INCREF(py_server_unc);
   42366             :         } else {
   42367           0 :                 if (object->in.server_unc == NULL) {
   42368           0 :                         py_server_unc = Py_None;
   42369           0 :                         Py_INCREF(py_server_unc);
   42370             :                 } else {
   42371           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   42372             :                 }
   42373             :         }
   42374           0 :         return py_server_unc;
   42375             : }
   42376             : 
   42377           0 : static int py_srvsvc_NetShareSetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   42378             : {
   42379           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(py_obj);
   42380           0 :         if (value == NULL) {
   42381           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   42382           0 :                 return -1;
   42383             :         }
   42384           0 :         if (value == Py_None) {
   42385           0 :                 object->in.server_unc = NULL;
   42386             :         } else {
   42387           0 :                 object->in.server_unc = NULL;
   42388             :                 {
   42389           0 :                         const char *test_str;
   42390           0 :                         const char *talloc_str;
   42391           0 :                         PyObject *unicode = NULL;
   42392           0 :                         if (PyUnicode_Check(value)) {
   42393           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42394           0 :                                 if (unicode == NULL) {
   42395           0 :                                         return -1;
   42396             :                                 }
   42397           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42398           0 :                         } else if (PyBytes_Check(value)) {
   42399           0 :                                 test_str = PyBytes_AS_STRING(value);
   42400             :                         } else {
   42401           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42402           0 :                                 return -1;
   42403             :                         }
   42404           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42405           0 :                         if (unicode != NULL) {
   42406           0 :                                 Py_DECREF(unicode);
   42407             :                         }
   42408           0 :                         if (talloc_str == NULL) {
   42409           0 :                                 PyErr_NoMemory();
   42410           0 :                                 return -1;
   42411             :                         }
   42412           0 :                         object->in.server_unc = talloc_str;
   42413             :                 }
   42414             :         }
   42415           0 :         return 0;
   42416             : }
   42417             : 
   42418           0 : static PyObject *py_srvsvc_NetShareSetInfo_in_get_share_name(PyObject *obj, void *closure)
   42419             : {
   42420           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(obj);
   42421           0 :         PyObject *py_share_name;
   42422           0 :         if (object->in.share_name == NULL) {
   42423           0 :                 py_share_name = Py_None;
   42424           0 :                 Py_INCREF(py_share_name);
   42425             :         } else {
   42426           0 :                 py_share_name = PyUnicode_Decode(object->in.share_name, strlen(object->in.share_name), "utf-8", "ignore");
   42427             :         }
   42428           0 :         return py_share_name;
   42429             : }
   42430             : 
   42431           0 : static int py_srvsvc_NetShareSetInfo_in_set_share_name(PyObject *py_obj, PyObject *value, void *closure)
   42432             : {
   42433           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(py_obj);
   42434           0 :         if (value == NULL) {
   42435           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.share_name");
   42436           0 :                 return -1;
   42437             :         }
   42438             :         {
   42439           0 :                 const char *test_str;
   42440           0 :                 const char *talloc_str;
   42441           0 :                 PyObject *unicode = NULL;
   42442           0 :                 if (PyUnicode_Check(value)) {
   42443           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42444           0 :                         if (unicode == NULL) {
   42445           0 :                                 return -1;
   42446             :                         }
   42447           0 :                         test_str = PyBytes_AS_STRING(unicode);
   42448           0 :                 } else if (PyBytes_Check(value)) {
   42449           0 :                         test_str = PyBytes_AS_STRING(value);
   42450             :                 } else {
   42451           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42452           0 :                         return -1;
   42453             :                 }
   42454           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42455           0 :                 if (unicode != NULL) {
   42456           0 :                         Py_DECREF(unicode);
   42457             :                 }
   42458           0 :                 if (talloc_str == NULL) {
   42459           0 :                         PyErr_NoMemory();
   42460           0 :                         return -1;
   42461             :                 }
   42462           0 :                 object->in.share_name = talloc_str;
   42463             :         }
   42464           0 :         return 0;
   42465             : }
   42466             : 
   42467           0 : static PyObject *py_srvsvc_NetShareSetInfo_in_get_level(PyObject *obj, void *closure)
   42468             : {
   42469           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(obj);
   42470           0 :         PyObject *py_level;
   42471           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   42472           0 :         return py_level;
   42473             : }
   42474             : 
   42475           0 : static int py_srvsvc_NetShareSetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   42476             : {
   42477           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(py_obj);
   42478           0 :         if (value == NULL) {
   42479           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   42480           0 :                 return -1;
   42481             :         }
   42482             :         {
   42483           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   42484           0 :                 if (PyLong_Check(value)) {
   42485           0 :                         unsigned long long test_var;
   42486           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   42487           0 :                         if (PyErr_Occurred() != NULL) {
   42488           0 :                                 return -1;
   42489             :                         }
   42490           0 :                         if (test_var > uint_max) {
   42491           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42492             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42493           0 :                                 return -1;
   42494             :                         }
   42495           0 :                         object->in.level = test_var;
   42496             :                 } else {
   42497           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42498             :                           PyLong_Type.tp_name);
   42499           0 :                         return -1;
   42500             :                 }
   42501             :         }
   42502           0 :         return 0;
   42503             : }
   42504             : 
   42505           0 : static PyObject *py_srvsvc_NetShareSetInfo_in_get_info(PyObject *obj, void *closure)
   42506             : {
   42507           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(obj);
   42508           0 :         PyObject *py_info;
   42509           0 :         if (object->in.info == NULL) {
   42510           0 :                 Py_RETURN_NONE;
   42511             :         }
   42512           0 :         py_info = pyrpc_import_union(&srvsvc_NetShareInfo_Type, object->in.info, object->in.level, object->in.info, "union srvsvc_NetShareInfo");
   42513           0 :         if (py_info == NULL) {
   42514           0 :                 return NULL;
   42515             :         }
   42516           0 :         return py_info;
   42517             : }
   42518             : 
   42519           0 : static int py_srvsvc_NetShareSetInfo_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   42520             : {
   42521           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(py_obj);
   42522           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
   42523           0 :         if (value == NULL) {
   42524           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info");
   42525           0 :                 return -1;
   42526             :         }
   42527           0 :         object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
   42528           0 :         if (object->in.info == NULL) {
   42529           0 :                 PyErr_NoMemory();
   42530           0 :                 return -1;
   42531             :         }
   42532             :         {
   42533           0 :                 union srvsvc_NetShareInfo *info_switch_1;
   42534           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");
   42535           0 :                 if (info_switch_1 == NULL) {
   42536           0 :                         return -1;
   42537             :                 }
   42538           0 :                 object->in.info = info_switch_1;
   42539             :         }
   42540           0 :         return 0;
   42541             : }
   42542             : 
   42543           0 : static PyObject *py_srvsvc_NetShareSetInfo_in_get_parm_error(PyObject *obj, void *closure)
   42544             : {
   42545           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(obj);
   42546           0 :         PyObject *py_parm_error;
   42547           0 :         if (object->in.parm_error == NULL) {
   42548           0 :                 Py_RETURN_NONE;
   42549             :         }
   42550           0 :         if (object->in.parm_error == NULL) {
   42551           0 :                 py_parm_error = Py_None;
   42552           0 :                 Py_INCREF(py_parm_error);
   42553             :         } else {
   42554           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.parm_error));
   42555             :         }
   42556           0 :         return py_parm_error;
   42557             : }
   42558             : 
   42559           0 : static int py_srvsvc_NetShareSetInfo_in_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   42560             : {
   42561           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(py_obj);
   42562           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.parm_error));
   42563           0 :         if (value == NULL) {
   42564           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.parm_error");
   42565           0 :                 return -1;
   42566             :         }
   42567           0 :         if (value == Py_None) {
   42568           0 :                 object->in.parm_error = NULL;
   42569             :         } else {
   42570           0 :                 object->in.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.parm_error);
   42571           0 :                 if (object->in.parm_error == NULL) {
   42572           0 :                         PyErr_NoMemory();
   42573           0 :                         return -1;
   42574             :                 }
   42575             :                 {
   42576           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.parm_error));
   42577           0 :                         if (PyLong_Check(value)) {
   42578           0 :                                 unsigned long long test_var;
   42579           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   42580           0 :                                 if (PyErr_Occurred() != NULL) {
   42581           0 :                                         return -1;
   42582             :                                 }
   42583           0 :                                 if (test_var > uint_max) {
   42584           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42585             :                                           PyLong_Type.tp_name, uint_max, test_var);
   42586           0 :                                         return -1;
   42587             :                                 }
   42588           0 :                                 *object->in.parm_error = test_var;
   42589             :                         } else {
   42590           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   42591             :                                   PyLong_Type.tp_name);
   42592           0 :                                 return -1;
   42593             :                         }
   42594             :                 }
   42595             :         }
   42596           0 :         return 0;
   42597             : }
   42598             : 
   42599           0 : static PyObject *py_srvsvc_NetShareSetInfo_out_get_parm_error(PyObject *obj, void *closure)
   42600             : {
   42601           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(obj);
   42602           0 :         PyObject *py_parm_error;
   42603           0 :         if (object->out.parm_error == NULL) {
   42604           0 :                 Py_RETURN_NONE;
   42605             :         }
   42606           0 :         if (object->out.parm_error == NULL) {
   42607           0 :                 py_parm_error = Py_None;
   42608           0 :                 Py_INCREF(py_parm_error);
   42609             :         } else {
   42610           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.parm_error));
   42611             :         }
   42612           0 :         return py_parm_error;
   42613             : }
   42614             : 
   42615           0 : static int py_srvsvc_NetShareSetInfo_out_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   42616             : {
   42617           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(py_obj);
   42618           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.parm_error));
   42619           0 :         if (value == NULL) {
   42620           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.parm_error");
   42621           0 :                 return -1;
   42622             :         }
   42623           0 :         if (value == Py_None) {
   42624           0 :                 object->out.parm_error = NULL;
   42625             :         } else {
   42626           0 :                 object->out.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.parm_error);
   42627           0 :                 if (object->out.parm_error == NULL) {
   42628           0 :                         PyErr_NoMemory();
   42629           0 :                         return -1;
   42630             :                 }
   42631             :                 {
   42632           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.parm_error));
   42633           0 :                         if (PyLong_Check(value)) {
   42634           0 :                                 unsigned long long test_var;
   42635           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   42636           0 :                                 if (PyErr_Occurred() != NULL) {
   42637           0 :                                         return -1;
   42638             :                                 }
   42639           0 :                                 if (test_var > uint_max) {
   42640           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42641             :                                           PyLong_Type.tp_name, uint_max, test_var);
   42642           0 :                                         return -1;
   42643             :                                 }
   42644           0 :                                 *object->out.parm_error = test_var;
   42645             :                         } else {
   42646           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   42647             :                                   PyLong_Type.tp_name);
   42648           0 :                                 return -1;
   42649             :                         }
   42650             :                 }
   42651             :         }
   42652           0 :         return 0;
   42653             : }
   42654             : 
   42655           0 : static PyObject *py_srvsvc_NetShareSetInfo_get_result(PyObject *obj, void *closure)
   42656             : {
   42657           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(obj);
   42658           0 :         PyObject *py_result;
   42659           0 :         py_result = PyErr_FromWERROR(object->out.result);
   42660           0 :         return py_result;
   42661             : }
   42662             : 
   42663           0 : static int py_srvsvc_NetShareSetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   42664             : {
   42665           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(py_obj);
   42666           0 :         if (value == NULL) {
   42667           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   42668           0 :                 return -1;
   42669             :         }
   42670           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   42671           0 :         return 0;
   42672             : }
   42673             : 
   42674             : static PyGetSetDef py_srvsvc_NetShareSetInfo_getsetters[] = {
   42675             :         {
   42676             :                 .name = discard_const_p(char, "in_server_unc"),
   42677             :                 .get = py_srvsvc_NetShareSetInfo_in_get_server_unc,
   42678             :                 .set = py_srvsvc_NetShareSetInfo_in_set_server_unc,
   42679             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   42680             :         },
   42681             :         {
   42682             :                 .name = discard_const_p(char, "in_share_name"),
   42683             :                 .get = py_srvsvc_NetShareSetInfo_in_get_share_name,
   42684             :                 .set = py_srvsvc_NetShareSetInfo_in_set_share_name,
   42685             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   42686             :         },
   42687             :         {
   42688             :                 .name = discard_const_p(char, "in_level"),
   42689             :                 .get = py_srvsvc_NetShareSetInfo_in_get_level,
   42690             :                 .set = py_srvsvc_NetShareSetInfo_in_set_level,
   42691             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   42692             :         },
   42693             :         {
   42694             :                 .name = discard_const_p(char, "in_info"),
   42695             :                 .get = py_srvsvc_NetShareSetInfo_in_get_info,
   42696             :                 .set = py_srvsvc_NetShareSetInfo_in_set_info,
   42697             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo")
   42698             :         },
   42699             :         {
   42700             :                 .name = discard_const_p(char, "in_parm_error"),
   42701             :                 .get = py_srvsvc_NetShareSetInfo_in_get_parm_error,
   42702             :                 .set = py_srvsvc_NetShareSetInfo_in_set_parm_error,
   42703             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   42704             :         },
   42705             :         {
   42706             :                 .name = discard_const_p(char, "out_parm_error"),
   42707             :                 .get = py_srvsvc_NetShareSetInfo_out_get_parm_error,
   42708             :                 .set = py_srvsvc_NetShareSetInfo_out_set_parm_error,
   42709             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   42710             :         },
   42711             :         {
   42712             :                 .name = discard_const_p(char, "result"),
   42713             :                 .get = py_srvsvc_NetShareSetInfo_get_result,
   42714             :                 .set = py_srvsvc_NetShareSetInfo_set_result,
   42715             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   42716             :         },
   42717             :         { .name = NULL }
   42718             : };
   42719             : 
   42720           0 : static PyObject *py_srvsvc_NetShareSetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   42721             : {
   42722           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareSetInfo, type);
   42723           0 :         struct srvsvc_NetShareSetInfo *_self = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(self);
   42724           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   42725           0 :         _self->in.info = talloc_zero(mem_ctx, union srvsvc_NetShareInfo);
   42726           0 :         return self;
   42727             : }
   42728             : 
   42729           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   42730             : {
   42731             : 
   42732             : 
   42733           0 :         return PyLong_FromLong(17);
   42734             : }
   42735             : 
   42736           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   42737             : {
   42738           0 :         const struct ndr_interface_call *call = NULL;
   42739           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(py_obj);
   42740           0 :         PyObject *ret = NULL;
   42741           0 :         struct ndr_push *push = NULL;
   42742           0 :         DATA_BLOB blob;
   42743           0 :         enum ndr_err_code err;
   42744             : 
   42745           0 :         if (ndr_table_srvsvc.num_calls < 18) {
   42746           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareSetInfo_ndr_pack");
   42747           0 :                 return NULL;
   42748             :         }
   42749           0 :         call = &ndr_table_srvsvc.calls[17];
   42750             : 
   42751           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   42752           0 :         if (push == NULL) {
   42753           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42754           0 :                 return NULL;
   42755             :         }
   42756             : 
   42757           0 :         push->flags |= ndr_push_flags;
   42758             : 
   42759           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   42760           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42761           0 :                 TALLOC_FREE(push);
   42762           0 :                 PyErr_SetNdrError(err);
   42763           0 :                 return NULL;
   42764             :         }
   42765           0 :         blob = ndr_push_blob(push);
   42766           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   42767           0 :         TALLOC_FREE(push);
   42768           0 :         return ret;
   42769             : }
   42770             : 
   42771           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42772             : {
   42773           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42774           0 :         PyObject *bigendian_obj = NULL;
   42775           0 :         PyObject *ndr64_obj = NULL;
   42776           0 :         libndr_flags ndr_push_flags = 0;
   42777             : 
   42778           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   42779             :                 discard_const_p(char *, kwnames),
   42780             :                 &bigendian_obj,
   42781             :                 &ndr64_obj)) {
   42782           0 :                 return NULL;
   42783             :         }
   42784             : 
   42785           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42786           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42787             :         }
   42788           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42789           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42790             :         }
   42791             : 
   42792           0 :         return py_srvsvc_NetShareSetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   42793             : }
   42794             : 
   42795           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42796             : {
   42797           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42798           0 :         PyObject *bigendian_obj = NULL;
   42799           0 :         PyObject *ndr64_obj = NULL;
   42800           0 :         libndr_flags ndr_push_flags = 0;
   42801             : 
   42802           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   42803             :                 discard_const_p(char *, kwnames),
   42804             :                 &bigendian_obj,
   42805             :                 &ndr64_obj)) {
   42806           0 :                 return NULL;
   42807             :         }
   42808             : 
   42809           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42810           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42811             :         }
   42812           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42813           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42814             :         }
   42815             : 
   42816           0 :         return py_srvsvc_NetShareSetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   42817             : }
   42818             : 
   42819           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   42820             : {
   42821           0 :         const struct ndr_interface_call *call = NULL;
   42822           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(py_obj);
   42823           0 :         struct ndr_pull *pull = NULL;
   42824           0 :         enum ndr_err_code err;
   42825             : 
   42826           0 :         if (ndr_table_srvsvc.num_calls < 18) {
   42827           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareSetInfo_ndr_unpack");
   42828           0 :                 return NULL;
   42829             :         }
   42830           0 :         call = &ndr_table_srvsvc.calls[17];
   42831             : 
   42832           0 :         pull = ndr_pull_init_blob(blob, object);
   42833           0 :         if (pull == NULL) {
   42834           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42835           0 :                 return NULL;
   42836             :         }
   42837             : 
   42838           0 :         pull->flags |= ndr_pull_flags;
   42839             : 
   42840           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   42841           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42842           0 :                 TALLOC_FREE(pull);
   42843           0 :                 PyErr_SetNdrError(err);
   42844           0 :                 return NULL;
   42845             :         }
   42846           0 :         if (!allow_remaining) {
   42847           0 :                 uint32_t highest_ofs;
   42848             : 
   42849           0 :                 if (pull->offset > pull->relative_highest_offset) {
   42850           0 :                         highest_ofs = pull->offset;
   42851             :                 } else {
   42852           0 :                         highest_ofs = pull->relative_highest_offset;
   42853             :                 }
   42854           0 :                 if (highest_ofs < pull->data_size) {
   42855           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   42856             :                                 "not all bytes consumed ofs[%u] size[%u]",
   42857             :                                 highest_ofs, pull->data_size);
   42858           0 :                         TALLOC_FREE(pull);
   42859           0 :                         PyErr_SetNdrError(err);
   42860           0 :                         return NULL;
   42861             :                 }
   42862             :         }
   42863             : 
   42864           0 :         TALLOC_FREE(pull);
   42865           0 :         Py_RETURN_NONE;
   42866             : }
   42867             : 
   42868           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42869             : {
   42870           0 :         DATA_BLOB blob;
   42871           0 :         Py_ssize_t blob_length = 0;
   42872           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42873           0 :         PyObject *bigendian_obj = NULL;
   42874           0 :         PyObject *ndr64_obj = NULL;
   42875           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42876           0 :         PyObject *allow_remaining_obj = NULL;
   42877           0 :         bool allow_remaining = false;
   42878             : 
   42879           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   42880             :                 discard_const_p(char *, kwnames),
   42881             :                 &blob.data, &blob_length,
   42882             :                 &bigendian_obj,
   42883             :                 &ndr64_obj,
   42884             :                 &allow_remaining_obj)) {
   42885           0 :                 return NULL;
   42886             :         }
   42887           0 :         blob.length = blob_length;
   42888             : 
   42889           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42890           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42891             :         }
   42892           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42893           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42894             :         }
   42895             : 
   42896           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42897           0 :                 allow_remaining = true;
   42898             :         }
   42899             : 
   42900           0 :         return py_srvsvc_NetShareSetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   42901             : }
   42902             : 
   42903           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42904             : {
   42905           0 :         DATA_BLOB blob;
   42906           0 :         Py_ssize_t blob_length = 0;
   42907           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42908           0 :         PyObject *bigendian_obj = NULL;
   42909           0 :         PyObject *ndr64_obj = NULL;
   42910           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42911           0 :         PyObject *allow_remaining_obj = NULL;
   42912           0 :         bool allow_remaining = false;
   42913             : 
   42914           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   42915             :                 discard_const_p(char *, kwnames),
   42916             :                 &blob.data, &blob_length,
   42917             :                 &bigendian_obj,
   42918             :                 &ndr64_obj,
   42919             :                 &allow_remaining_obj)) {
   42920           0 :                 return NULL;
   42921             :         }
   42922           0 :         blob.length = blob_length;
   42923             : 
   42924           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42925           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42926             :         }
   42927           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42928           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42929             :         }
   42930             : 
   42931           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42932           0 :                 allow_remaining = true;
   42933             :         }
   42934             : 
   42935           0 :         return py_srvsvc_NetShareSetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   42936             : }
   42937             : 
   42938           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   42939             : {
   42940           0 :         const struct ndr_interface_call *call = NULL;
   42941           0 :         struct srvsvc_NetShareSetInfo *object = pytalloc_get_ptr(py_obj);
   42942           0 :         PyObject *ret;
   42943           0 :         char *retstr;
   42944             : 
   42945           0 :         if (ndr_table_srvsvc.num_calls < 18) {
   42946           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareSetInfo_ndr_print");
   42947           0 :                 return NULL;
   42948             :         }
   42949           0 :         call = &ndr_table_srvsvc.calls[17];
   42950             : 
   42951           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   42952           0 :         ret = PyUnicode_FromString(retstr);
   42953           0 :         TALLOC_FREE(retstr);
   42954             : 
   42955           0 :         return ret;
   42956             : }
   42957             : 
   42958           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42959             : {
   42960           0 :         return py_srvsvc_NetShareSetInfo_ndr_print(py_obj, "srvsvc_NetShareSetInfo_in", NDR_IN);
   42961             : }
   42962             : 
   42963           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42964             : {
   42965           0 :         return py_srvsvc_NetShareSetInfo_ndr_print(py_obj, "srvsvc_NetShareSetInfo_out", NDR_OUT);
   42966             : }
   42967             : 
   42968             : static PyMethodDef py_srvsvc_NetShareSetInfo_methods[] = {
   42969             :         { "opnum", (PyCFunction)py_srvsvc_NetShareSetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   42970             :                 "srvsvc.NetShareSetInfo.opnum() -> 17 (0x11) " },
   42971             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareSetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   42972             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   42973             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareSetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   42974             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   42975             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareSetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   42976             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   42977             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareSetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   42978             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   42979             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareSetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   42980             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareSetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   42981             :         { NULL, NULL, 0, NULL }
   42982             : };
   42983             : 
   42984             : 
   42985             : static PyTypeObject srvsvc_NetShareSetInfo_Type = {
   42986             :         PyVarObject_HEAD_INIT(NULL, 0)
   42987             :         .tp_name = "srvsvc.NetShareSetInfo",
   42988             :         .tp_getset = py_srvsvc_NetShareSetInfo_getsetters,
   42989             :         .tp_methods = py_srvsvc_NetShareSetInfo_methods,
   42990             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   42991             :         .tp_new = py_srvsvc_NetShareSetInfo_new,
   42992             : };
   42993             : 
   42994           0 : static bool pack_py_srvsvc_NetShareSetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareSetInfo *r)
   42995             : {
   42996           0 :         PyObject *py_server_unc;
   42997           0 :         PyObject *py_share_name;
   42998           0 :         PyObject *py_level;
   42999           0 :         PyObject *py_info;
   43000           0 :         PyObject *py_parm_error;
   43001           0 :         const char *kwnames[] = {
   43002             :                 "server_unc", "share_name", "level", "info", "parm_error", NULL
   43003             :         };
   43004             : 
   43005           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)) {
   43006           0 :                 return false;
   43007             :         }
   43008             : 
   43009           0 :         if (py_server_unc == NULL) {
   43010           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   43011           0 :                 return false;
   43012             :         }
   43013           0 :         if (py_server_unc == Py_None) {
   43014           0 :                 r->in.server_unc = NULL;
   43015             :         } else {
   43016           0 :                 r->in.server_unc = NULL;
   43017             :                 {
   43018           0 :                         const char *test_str;
   43019           0 :                         const char *talloc_str;
   43020           0 :                         PyObject *unicode = NULL;
   43021           0 :                         if (PyUnicode_Check(py_server_unc)) {
   43022           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   43023           0 :                                 if (unicode == NULL) {
   43024           0 :                                         return false;
   43025             :                                 }
   43026           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43027           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   43028           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   43029             :                         } else {
   43030           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   43031           0 :                                 return false;
   43032             :                         }
   43033           0 :                         talloc_str = talloc_strdup(r, test_str);
   43034           0 :                         if (unicode != NULL) {
   43035           0 :                                 Py_DECREF(unicode);
   43036             :                         }
   43037           0 :                         if (talloc_str == NULL) {
   43038           0 :                                 PyErr_NoMemory();
   43039           0 :                                 return false;
   43040             :                         }
   43041           0 :                         r->in.server_unc = talloc_str;
   43042             :                 }
   43043             :         }
   43044           0 :         if (py_share_name == NULL) {
   43045           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.share_name");
   43046           0 :                 return false;
   43047             :         }
   43048             :         {
   43049           0 :                 const char *test_str;
   43050           0 :                 const char *talloc_str;
   43051           0 :                 PyObject *unicode = NULL;
   43052           0 :                 if (PyUnicode_Check(py_share_name)) {
   43053           0 :                         unicode = PyUnicode_AsEncodedString(py_share_name, "utf-8", "ignore");
   43054           0 :                         if (unicode == NULL) {
   43055           0 :                                 return false;
   43056             :                         }
   43057           0 :                         test_str = PyBytes_AS_STRING(unicode);
   43058           0 :                 } else if (PyBytes_Check(py_share_name)) {
   43059           0 :                         test_str = PyBytes_AS_STRING(py_share_name);
   43060             :                 } else {
   43061           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
   43062           0 :                         return false;
   43063             :                 }
   43064           0 :                 talloc_str = talloc_strdup(r, test_str);
   43065           0 :                 if (unicode != NULL) {
   43066           0 :                         Py_DECREF(unicode);
   43067             :                 }
   43068           0 :                 if (talloc_str == NULL) {
   43069           0 :                         PyErr_NoMemory();
   43070           0 :                         return false;
   43071             :                 }
   43072           0 :                 r->in.share_name = talloc_str;
   43073             :         }
   43074           0 :         if (py_level == NULL) {
   43075           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   43076           0 :                 return false;
   43077             :         }
   43078             :         {
   43079           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   43080           0 :                 if (PyLong_Check(py_level)) {
   43081           0 :                         unsigned long long test_var;
   43082           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   43083           0 :                         if (PyErr_Occurred() != NULL) {
   43084           0 :                                 return false;
   43085             :                         }
   43086           0 :                         if (test_var > uint_max) {
   43087           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43088             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43089           0 :                                 return false;
   43090             :                         }
   43091           0 :                         r->in.level = test_var;
   43092             :                 } else {
   43093           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43094             :                           PyLong_Type.tp_name);
   43095           0 :                         return false;
   43096             :                 }
   43097             :         }
   43098           0 :         if (py_info == NULL) {
   43099           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info");
   43100           0 :                 return false;
   43101             :         }
   43102           0 :         r->in.info = talloc_ptrtype(r, r->in.info);
   43103           0 :         if (r->in.info == NULL) {
   43104           0 :                 PyErr_NoMemory();
   43105           0 :                 return false;
   43106             :         }
   43107             :         {
   43108           0 :                 union srvsvc_NetShareInfo *info_switch_1;
   43109           0 :                 info_switch_1 = (union srvsvc_NetShareInfo *)pyrpc_export_union(&srvsvc_NetShareInfo_Type, r, r->in.level, py_info, "union srvsvc_NetShareInfo");
   43110           0 :                 if (info_switch_1 == NULL) {
   43111           0 :                         return false;
   43112             :                 }
   43113           0 :                 r->in.info = info_switch_1;
   43114             :         }
   43115           0 :         if (py_parm_error == NULL) {
   43116           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.parm_error");
   43117           0 :                 return false;
   43118             :         }
   43119           0 :         if (py_parm_error == Py_None) {
   43120           0 :                 r->in.parm_error = NULL;
   43121             :         } else {
   43122           0 :                 r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
   43123           0 :                 if (r->in.parm_error == NULL) {
   43124           0 :                         PyErr_NoMemory();
   43125           0 :                         return false;
   43126             :                 }
   43127             :                 {
   43128           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
   43129           0 :                         if (PyLong_Check(py_parm_error)) {
   43130           0 :                                 unsigned long long test_var;
   43131           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_parm_error);
   43132           0 :                                 if (PyErr_Occurred() != NULL) {
   43133           0 :                                         return false;
   43134             :                                 }
   43135           0 :                                 if (test_var > uint_max) {
   43136           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43137             :                                           PyLong_Type.tp_name, uint_max, test_var);
   43138           0 :                                         return false;
   43139             :                                 }
   43140           0 :                                 *r->in.parm_error = test_var;
   43141             :                         } else {
   43142           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   43143             :                                   PyLong_Type.tp_name);
   43144           0 :                                 return false;
   43145             :                         }
   43146             :                 }
   43147             :         }
   43148           0 :         return true;
   43149             : }
   43150             : 
   43151           0 : static PyObject *unpack_py_srvsvc_NetShareSetInfo_args_out(struct srvsvc_NetShareSetInfo *r)
   43152             : {
   43153           0 :         PyObject *result;
   43154           0 :         PyObject *py_parm_error;
   43155           0 :         if (r->out.parm_error == NULL) {
   43156           0 :                 py_parm_error = Py_None;
   43157           0 :                 Py_INCREF(py_parm_error);
   43158             :         } else {
   43159           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.parm_error));
   43160             :         }
   43161           0 :         result = py_parm_error;
   43162           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   43163           0 :                 PyErr_SetWERROR(r->out.result);
   43164           0 :                 return NULL;
   43165             :         }
   43166             : 
   43167           0 :         return result;
   43168             : }
   43169             : 
   43170             : 
   43171           0 : static PyObject *py_srvsvc_NetShareDel_in_get_server_unc(PyObject *obj, void *closure)
   43172             : {
   43173           0 :         struct srvsvc_NetShareDel *object = pytalloc_get_ptr(obj);
   43174           0 :         PyObject *py_server_unc;
   43175           0 :         if (object->in.server_unc == NULL) {
   43176           0 :                 Py_RETURN_NONE;
   43177             :         }
   43178           0 :         if (object->in.server_unc == NULL) {
   43179           0 :                 py_server_unc = Py_None;
   43180           0 :                 Py_INCREF(py_server_unc);
   43181             :         } else {
   43182           0 :                 if (object->in.server_unc == NULL) {
   43183           0 :                         py_server_unc = Py_None;
   43184           0 :                         Py_INCREF(py_server_unc);
   43185             :                 } else {
   43186           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   43187             :                 }
   43188             :         }
   43189           0 :         return py_server_unc;
   43190             : }
   43191             : 
   43192           0 : static int py_srvsvc_NetShareDel_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   43193             : {
   43194           0 :         struct srvsvc_NetShareDel *object = pytalloc_get_ptr(py_obj);
   43195           0 :         if (value == NULL) {
   43196           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   43197           0 :                 return -1;
   43198             :         }
   43199           0 :         if (value == Py_None) {
   43200           0 :                 object->in.server_unc = NULL;
   43201             :         } else {
   43202           0 :                 object->in.server_unc = NULL;
   43203             :                 {
   43204           0 :                         const char *test_str;
   43205           0 :                         const char *talloc_str;
   43206           0 :                         PyObject *unicode = NULL;
   43207           0 :                         if (PyUnicode_Check(value)) {
   43208           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43209           0 :                                 if (unicode == NULL) {
   43210           0 :                                         return -1;
   43211             :                                 }
   43212           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43213           0 :                         } else if (PyBytes_Check(value)) {
   43214           0 :                                 test_str = PyBytes_AS_STRING(value);
   43215             :                         } else {
   43216           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43217           0 :                                 return -1;
   43218             :                         }
   43219           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43220           0 :                         if (unicode != NULL) {
   43221           0 :                                 Py_DECREF(unicode);
   43222             :                         }
   43223           0 :                         if (talloc_str == NULL) {
   43224           0 :                                 PyErr_NoMemory();
   43225           0 :                                 return -1;
   43226             :                         }
   43227           0 :                         object->in.server_unc = talloc_str;
   43228             :                 }
   43229             :         }
   43230           0 :         return 0;
   43231             : }
   43232             : 
   43233           0 : static PyObject *py_srvsvc_NetShareDel_in_get_share_name(PyObject *obj, void *closure)
   43234             : {
   43235           0 :         struct srvsvc_NetShareDel *object = pytalloc_get_ptr(obj);
   43236           0 :         PyObject *py_share_name;
   43237           0 :         if (object->in.share_name == NULL) {
   43238           0 :                 py_share_name = Py_None;
   43239           0 :                 Py_INCREF(py_share_name);
   43240             :         } else {
   43241           0 :                 py_share_name = PyUnicode_Decode(object->in.share_name, strlen(object->in.share_name), "utf-8", "ignore");
   43242             :         }
   43243           0 :         return py_share_name;
   43244             : }
   43245             : 
   43246           0 : static int py_srvsvc_NetShareDel_in_set_share_name(PyObject *py_obj, PyObject *value, void *closure)
   43247             : {
   43248           0 :         struct srvsvc_NetShareDel *object = pytalloc_get_ptr(py_obj);
   43249           0 :         if (value == NULL) {
   43250           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.share_name");
   43251           0 :                 return -1;
   43252             :         }
   43253             :         {
   43254           0 :                 const char *test_str;
   43255           0 :                 const char *talloc_str;
   43256           0 :                 PyObject *unicode = NULL;
   43257           0 :                 if (PyUnicode_Check(value)) {
   43258           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43259           0 :                         if (unicode == NULL) {
   43260           0 :                                 return -1;
   43261             :                         }
   43262           0 :                         test_str = PyBytes_AS_STRING(unicode);
   43263           0 :                 } else if (PyBytes_Check(value)) {
   43264           0 :                         test_str = PyBytes_AS_STRING(value);
   43265             :                 } else {
   43266           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43267           0 :                         return -1;
   43268             :                 }
   43269           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43270           0 :                 if (unicode != NULL) {
   43271           0 :                         Py_DECREF(unicode);
   43272             :                 }
   43273           0 :                 if (talloc_str == NULL) {
   43274           0 :                         PyErr_NoMemory();
   43275           0 :                         return -1;
   43276             :                 }
   43277           0 :                 object->in.share_name = talloc_str;
   43278             :         }
   43279           0 :         return 0;
   43280             : }
   43281             : 
   43282           0 : static PyObject *py_srvsvc_NetShareDel_in_get_reserved(PyObject *obj, void *closure)
   43283             : {
   43284           0 :         struct srvsvc_NetShareDel *object = pytalloc_get_ptr(obj);
   43285           0 :         PyObject *py_reserved;
   43286           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->in.reserved));
   43287           0 :         return py_reserved;
   43288             : }
   43289             : 
   43290           0 : static int py_srvsvc_NetShareDel_in_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   43291             : {
   43292           0 :         struct srvsvc_NetShareDel *object = pytalloc_get_ptr(py_obj);
   43293           0 :         if (value == NULL) {
   43294           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.reserved");
   43295           0 :                 return -1;
   43296             :         }
   43297             :         {
   43298           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.reserved));
   43299           0 :                 if (PyLong_Check(value)) {
   43300           0 :                         unsigned long long test_var;
   43301           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   43302           0 :                         if (PyErr_Occurred() != NULL) {
   43303           0 :                                 return -1;
   43304             :                         }
   43305           0 :                         if (test_var > uint_max) {
   43306           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43307             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43308           0 :                                 return -1;
   43309             :                         }
   43310           0 :                         object->in.reserved = test_var;
   43311             :                 } else {
   43312           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43313             :                           PyLong_Type.tp_name);
   43314           0 :                         return -1;
   43315             :                 }
   43316             :         }
   43317           0 :         return 0;
   43318             : }
   43319             : 
   43320           0 : static PyObject *py_srvsvc_NetShareDel_get_result(PyObject *obj, void *closure)
   43321             : {
   43322           0 :         struct srvsvc_NetShareDel *object = pytalloc_get_ptr(obj);
   43323           0 :         PyObject *py_result;
   43324           0 :         py_result = PyErr_FromWERROR(object->out.result);
   43325           0 :         return py_result;
   43326             : }
   43327             : 
   43328           0 : static int py_srvsvc_NetShareDel_set_result(PyObject *py_obj, PyObject *value, void *closure)
   43329             : {
   43330           0 :         struct srvsvc_NetShareDel *object = pytalloc_get_ptr(py_obj);
   43331           0 :         if (value == NULL) {
   43332           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   43333           0 :                 return -1;
   43334             :         }
   43335           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   43336           0 :         return 0;
   43337             : }
   43338             : 
   43339             : static PyGetSetDef py_srvsvc_NetShareDel_getsetters[] = {
   43340             :         {
   43341             :                 .name = discard_const_p(char, "in_server_unc"),
   43342             :                 .get = py_srvsvc_NetShareDel_in_get_server_unc,
   43343             :                 .set = py_srvsvc_NetShareDel_in_set_server_unc,
   43344             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43345             :         },
   43346             :         {
   43347             :                 .name = discard_const_p(char, "in_share_name"),
   43348             :                 .get = py_srvsvc_NetShareDel_in_get_share_name,
   43349             :                 .set = py_srvsvc_NetShareDel_in_set_share_name,
   43350             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43351             :         },
   43352             :         {
   43353             :                 .name = discard_const_p(char, "in_reserved"),
   43354             :                 .get = py_srvsvc_NetShareDel_in_get_reserved,
   43355             :                 .set = py_srvsvc_NetShareDel_in_set_reserved,
   43356             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   43357             :         },
   43358             :         {
   43359             :                 .name = discard_const_p(char, "result"),
   43360             :                 .get = py_srvsvc_NetShareDel_get_result,
   43361             :                 .set = py_srvsvc_NetShareDel_set_result,
   43362             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   43363             :         },
   43364             :         { .name = NULL }
   43365             : };
   43366             : 
   43367           0 : static PyObject *py_srvsvc_NetShareDel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   43368             : {
   43369           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareDel, type);
   43370           0 :         return self;
   43371             : }
   43372             : 
   43373           0 : static PyObject *py_srvsvc_NetShareDel_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   43374             : {
   43375             : 
   43376             : 
   43377           0 :         return PyLong_FromLong(18);
   43378             : }
   43379             : 
   43380           0 : static PyObject *py_srvsvc_NetShareDel_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   43381             : {
   43382           0 :         const struct ndr_interface_call *call = NULL;
   43383           0 :         struct srvsvc_NetShareDel *object = pytalloc_get_ptr(py_obj);
   43384           0 :         PyObject *ret = NULL;
   43385           0 :         struct ndr_push *push = NULL;
   43386           0 :         DATA_BLOB blob;
   43387           0 :         enum ndr_err_code err;
   43388             : 
   43389           0 :         if (ndr_table_srvsvc.num_calls < 19) {
   43390           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDel_ndr_pack");
   43391           0 :                 return NULL;
   43392             :         }
   43393           0 :         call = &ndr_table_srvsvc.calls[18];
   43394             : 
   43395           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   43396           0 :         if (push == NULL) {
   43397           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43398           0 :                 return NULL;
   43399             :         }
   43400             : 
   43401           0 :         push->flags |= ndr_push_flags;
   43402             : 
   43403           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   43404           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43405           0 :                 TALLOC_FREE(push);
   43406           0 :                 PyErr_SetNdrError(err);
   43407           0 :                 return NULL;
   43408             :         }
   43409           0 :         blob = ndr_push_blob(push);
   43410           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   43411           0 :         TALLOC_FREE(push);
   43412           0 :         return ret;
   43413             : }
   43414             : 
   43415           0 : static PyObject *py_srvsvc_NetShareDel_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43416             : {
   43417           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43418           0 :         PyObject *bigendian_obj = NULL;
   43419           0 :         PyObject *ndr64_obj = NULL;
   43420           0 :         libndr_flags ndr_push_flags = 0;
   43421             : 
   43422           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   43423             :                 discard_const_p(char *, kwnames),
   43424             :                 &bigendian_obj,
   43425             :                 &ndr64_obj)) {
   43426           0 :                 return NULL;
   43427             :         }
   43428             : 
   43429           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43430           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43431             :         }
   43432           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43433           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43434             :         }
   43435             : 
   43436           0 :         return py_srvsvc_NetShareDel_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   43437             : }
   43438             : 
   43439           0 : static PyObject *py_srvsvc_NetShareDel_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43440             : {
   43441           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43442           0 :         PyObject *bigendian_obj = NULL;
   43443           0 :         PyObject *ndr64_obj = NULL;
   43444           0 :         libndr_flags ndr_push_flags = 0;
   43445             : 
   43446           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   43447             :                 discard_const_p(char *, kwnames),
   43448             :                 &bigendian_obj,
   43449             :                 &ndr64_obj)) {
   43450           0 :                 return NULL;
   43451             :         }
   43452             : 
   43453           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43454           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43455             :         }
   43456           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43457           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43458             :         }
   43459             : 
   43460           0 :         return py_srvsvc_NetShareDel_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   43461             : }
   43462             : 
   43463           0 : static PyObject *py_srvsvc_NetShareDel_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   43464             : {
   43465           0 :         const struct ndr_interface_call *call = NULL;
   43466           0 :         struct srvsvc_NetShareDel *object = pytalloc_get_ptr(py_obj);
   43467           0 :         struct ndr_pull *pull = NULL;
   43468           0 :         enum ndr_err_code err;
   43469             : 
   43470           0 :         if (ndr_table_srvsvc.num_calls < 19) {
   43471           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDel_ndr_unpack");
   43472           0 :                 return NULL;
   43473             :         }
   43474           0 :         call = &ndr_table_srvsvc.calls[18];
   43475             : 
   43476           0 :         pull = ndr_pull_init_blob(blob, object);
   43477           0 :         if (pull == NULL) {
   43478           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43479           0 :                 return NULL;
   43480             :         }
   43481             : 
   43482           0 :         pull->flags |= ndr_pull_flags;
   43483             : 
   43484           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   43485           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43486           0 :                 TALLOC_FREE(pull);
   43487           0 :                 PyErr_SetNdrError(err);
   43488           0 :                 return NULL;
   43489             :         }
   43490           0 :         if (!allow_remaining) {
   43491           0 :                 uint32_t highest_ofs;
   43492             : 
   43493           0 :                 if (pull->offset > pull->relative_highest_offset) {
   43494           0 :                         highest_ofs = pull->offset;
   43495             :                 } else {
   43496           0 :                         highest_ofs = pull->relative_highest_offset;
   43497             :                 }
   43498           0 :                 if (highest_ofs < pull->data_size) {
   43499           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   43500             :                                 "not all bytes consumed ofs[%u] size[%u]",
   43501             :                                 highest_ofs, pull->data_size);
   43502           0 :                         TALLOC_FREE(pull);
   43503           0 :                         PyErr_SetNdrError(err);
   43504           0 :                         return NULL;
   43505             :                 }
   43506             :         }
   43507             : 
   43508           0 :         TALLOC_FREE(pull);
   43509           0 :         Py_RETURN_NONE;
   43510             : }
   43511             : 
   43512           0 : static PyObject *py_srvsvc_NetShareDel_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43513             : {
   43514           0 :         DATA_BLOB blob;
   43515           0 :         Py_ssize_t blob_length = 0;
   43516           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43517           0 :         PyObject *bigendian_obj = NULL;
   43518           0 :         PyObject *ndr64_obj = NULL;
   43519           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43520           0 :         PyObject *allow_remaining_obj = NULL;
   43521           0 :         bool allow_remaining = false;
   43522             : 
   43523           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   43524             :                 discard_const_p(char *, kwnames),
   43525             :                 &blob.data, &blob_length,
   43526             :                 &bigendian_obj,
   43527             :                 &ndr64_obj,
   43528             :                 &allow_remaining_obj)) {
   43529           0 :                 return NULL;
   43530             :         }
   43531           0 :         blob.length = blob_length;
   43532             : 
   43533           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43534           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43535             :         }
   43536           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43537           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43538             :         }
   43539             : 
   43540           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43541           0 :                 allow_remaining = true;
   43542             :         }
   43543             : 
   43544           0 :         return py_srvsvc_NetShareDel_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   43545             : }
   43546             : 
   43547           0 : static PyObject *py_srvsvc_NetShareDel_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43548             : {
   43549           0 :         DATA_BLOB blob;
   43550           0 :         Py_ssize_t blob_length = 0;
   43551           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43552           0 :         PyObject *bigendian_obj = NULL;
   43553           0 :         PyObject *ndr64_obj = NULL;
   43554           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43555           0 :         PyObject *allow_remaining_obj = NULL;
   43556           0 :         bool allow_remaining = false;
   43557             : 
   43558           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   43559             :                 discard_const_p(char *, kwnames),
   43560             :                 &blob.data, &blob_length,
   43561             :                 &bigendian_obj,
   43562             :                 &ndr64_obj,
   43563             :                 &allow_remaining_obj)) {
   43564           0 :                 return NULL;
   43565             :         }
   43566           0 :         blob.length = blob_length;
   43567             : 
   43568           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43569           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43570             :         }
   43571           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43572           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43573             :         }
   43574             : 
   43575           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43576           0 :                 allow_remaining = true;
   43577             :         }
   43578             : 
   43579           0 :         return py_srvsvc_NetShareDel_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   43580             : }
   43581             : 
   43582           0 : static PyObject *py_srvsvc_NetShareDel_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   43583             : {
   43584           0 :         const struct ndr_interface_call *call = NULL;
   43585           0 :         struct srvsvc_NetShareDel *object = pytalloc_get_ptr(py_obj);
   43586           0 :         PyObject *ret;
   43587           0 :         char *retstr;
   43588             : 
   43589           0 :         if (ndr_table_srvsvc.num_calls < 19) {
   43590           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDel_ndr_print");
   43591           0 :                 return NULL;
   43592             :         }
   43593           0 :         call = &ndr_table_srvsvc.calls[18];
   43594             : 
   43595           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   43596           0 :         ret = PyUnicode_FromString(retstr);
   43597           0 :         TALLOC_FREE(retstr);
   43598             : 
   43599           0 :         return ret;
   43600             : }
   43601             : 
   43602           0 : static PyObject *py_srvsvc_NetShareDel_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43603             : {
   43604           0 :         return py_srvsvc_NetShareDel_ndr_print(py_obj, "srvsvc_NetShareDel_in", NDR_IN);
   43605             : }
   43606             : 
   43607           0 : static PyObject *py_srvsvc_NetShareDel_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43608             : {
   43609           0 :         return py_srvsvc_NetShareDel_ndr_print(py_obj, "srvsvc_NetShareDel_out", NDR_OUT);
   43610             : }
   43611             : 
   43612             : static PyMethodDef py_srvsvc_NetShareDel_methods[] = {
   43613             :         { "opnum", (PyCFunction)py_srvsvc_NetShareDel_ndr_opnum, METH_NOARGS|METH_CLASS,
   43614             :                 "srvsvc.NetShareDel.opnum() -> 18 (0x12) " },
   43615             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDel_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   43616             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   43617             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDel_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   43618             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   43619             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDel_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   43620             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   43621             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDel_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   43622             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   43623             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareDel_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   43624             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareDel_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   43625             :         { NULL, NULL, 0, NULL }
   43626             : };
   43627             : 
   43628             : 
   43629             : static PyTypeObject srvsvc_NetShareDel_Type = {
   43630             :         PyVarObject_HEAD_INIT(NULL, 0)
   43631             :         .tp_name = "srvsvc.NetShareDel",
   43632             :         .tp_getset = py_srvsvc_NetShareDel_getsetters,
   43633             :         .tp_methods = py_srvsvc_NetShareDel_methods,
   43634             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   43635             :         .tp_new = py_srvsvc_NetShareDel_new,
   43636             : };
   43637             : 
   43638           0 : static bool pack_py_srvsvc_NetShareDel_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareDel *r)
   43639             : {
   43640           0 :         PyObject *py_server_unc;
   43641           0 :         PyObject *py_share_name;
   43642           0 :         PyObject *py_reserved;
   43643           0 :         const char *kwnames[] = {
   43644             :                 "server_unc", "share_name", "reserved", NULL
   43645             :         };
   43646             : 
   43647           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetShareDel", discard_const_p(char *, kwnames), &py_server_unc, &py_share_name, &py_reserved)) {
   43648           0 :                 return false;
   43649             :         }
   43650             : 
   43651           0 :         if (py_server_unc == NULL) {
   43652           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   43653           0 :                 return false;
   43654             :         }
   43655           0 :         if (py_server_unc == Py_None) {
   43656           0 :                 r->in.server_unc = NULL;
   43657             :         } else {
   43658           0 :                 r->in.server_unc = NULL;
   43659             :                 {
   43660           0 :                         const char *test_str;
   43661           0 :                         const char *talloc_str;
   43662           0 :                         PyObject *unicode = NULL;
   43663           0 :                         if (PyUnicode_Check(py_server_unc)) {
   43664           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   43665           0 :                                 if (unicode == NULL) {
   43666           0 :                                         return false;
   43667             :                                 }
   43668           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43669           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   43670           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   43671             :                         } else {
   43672           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   43673           0 :                                 return false;
   43674             :                         }
   43675           0 :                         talloc_str = talloc_strdup(r, test_str);
   43676           0 :                         if (unicode != NULL) {
   43677           0 :                                 Py_DECREF(unicode);
   43678             :                         }
   43679           0 :                         if (talloc_str == NULL) {
   43680           0 :                                 PyErr_NoMemory();
   43681           0 :                                 return false;
   43682             :                         }
   43683           0 :                         r->in.server_unc = talloc_str;
   43684             :                 }
   43685             :         }
   43686           0 :         if (py_share_name == NULL) {
   43687           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.share_name");
   43688           0 :                 return false;
   43689             :         }
   43690             :         {
   43691           0 :                 const char *test_str;
   43692           0 :                 const char *talloc_str;
   43693           0 :                 PyObject *unicode = NULL;
   43694           0 :                 if (PyUnicode_Check(py_share_name)) {
   43695           0 :                         unicode = PyUnicode_AsEncodedString(py_share_name, "utf-8", "ignore");
   43696           0 :                         if (unicode == NULL) {
   43697           0 :                                 return false;
   43698             :                         }
   43699           0 :                         test_str = PyBytes_AS_STRING(unicode);
   43700           0 :                 } else if (PyBytes_Check(py_share_name)) {
   43701           0 :                         test_str = PyBytes_AS_STRING(py_share_name);
   43702             :                 } else {
   43703           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
   43704           0 :                         return false;
   43705             :                 }
   43706           0 :                 talloc_str = talloc_strdup(r, test_str);
   43707           0 :                 if (unicode != NULL) {
   43708           0 :                         Py_DECREF(unicode);
   43709             :                 }
   43710           0 :                 if (talloc_str == NULL) {
   43711           0 :                         PyErr_NoMemory();
   43712           0 :                         return false;
   43713             :                 }
   43714           0 :                 r->in.share_name = talloc_str;
   43715             :         }
   43716           0 :         if (py_reserved == NULL) {
   43717           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.reserved");
   43718           0 :                 return false;
   43719             :         }
   43720             :         {
   43721           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reserved));
   43722           0 :                 if (PyLong_Check(py_reserved)) {
   43723           0 :                         unsigned long long test_var;
   43724           0 :                         test_var = PyLong_AsUnsignedLongLong(py_reserved);
   43725           0 :                         if (PyErr_Occurred() != NULL) {
   43726           0 :                                 return false;
   43727             :                         }
   43728           0 :                         if (test_var > uint_max) {
   43729           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43730             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43731           0 :                                 return false;
   43732             :                         }
   43733           0 :                         r->in.reserved = test_var;
   43734             :                 } else {
   43735           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43736             :                           PyLong_Type.tp_name);
   43737           0 :                         return false;
   43738             :                 }
   43739             :         }
   43740           0 :         return true;
   43741             : }
   43742             : 
   43743           0 : static PyObject *unpack_py_srvsvc_NetShareDel_args_out(struct srvsvc_NetShareDel *r)
   43744             : {
   43745           0 :         PyObject *result;
   43746           0 :         result = Py_None;
   43747           0 :         Py_INCREF(result);
   43748           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   43749           0 :                 PyErr_SetWERROR(r->out.result);
   43750           0 :                 return NULL;
   43751             :         }
   43752             : 
   43753           0 :         return result;
   43754             : }
   43755             : 
   43756             : 
   43757           0 : static PyObject *py_srvsvc_NetShareDelSticky_in_get_server_unc(PyObject *obj, void *closure)
   43758             : {
   43759           0 :         struct srvsvc_NetShareDelSticky *object = pytalloc_get_ptr(obj);
   43760           0 :         PyObject *py_server_unc;
   43761           0 :         if (object->in.server_unc == NULL) {
   43762           0 :                 Py_RETURN_NONE;
   43763             :         }
   43764           0 :         if (object->in.server_unc == NULL) {
   43765           0 :                 py_server_unc = Py_None;
   43766           0 :                 Py_INCREF(py_server_unc);
   43767             :         } else {
   43768           0 :                 if (object->in.server_unc == NULL) {
   43769           0 :                         py_server_unc = Py_None;
   43770           0 :                         Py_INCREF(py_server_unc);
   43771             :                 } else {
   43772           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   43773             :                 }
   43774             :         }
   43775           0 :         return py_server_unc;
   43776             : }
   43777             : 
   43778           0 : static int py_srvsvc_NetShareDelSticky_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   43779             : {
   43780           0 :         struct srvsvc_NetShareDelSticky *object = pytalloc_get_ptr(py_obj);
   43781           0 :         if (value == NULL) {
   43782           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   43783           0 :                 return -1;
   43784             :         }
   43785           0 :         if (value == Py_None) {
   43786           0 :                 object->in.server_unc = NULL;
   43787             :         } else {
   43788           0 :                 object->in.server_unc = NULL;
   43789             :                 {
   43790           0 :                         const char *test_str;
   43791           0 :                         const char *talloc_str;
   43792           0 :                         PyObject *unicode = NULL;
   43793           0 :                         if (PyUnicode_Check(value)) {
   43794           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43795           0 :                                 if (unicode == NULL) {
   43796           0 :                                         return -1;
   43797             :                                 }
   43798           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43799           0 :                         } else if (PyBytes_Check(value)) {
   43800           0 :                                 test_str = PyBytes_AS_STRING(value);
   43801             :                         } else {
   43802           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43803           0 :                                 return -1;
   43804             :                         }
   43805           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43806           0 :                         if (unicode != NULL) {
   43807           0 :                                 Py_DECREF(unicode);
   43808             :                         }
   43809           0 :                         if (talloc_str == NULL) {
   43810           0 :                                 PyErr_NoMemory();
   43811           0 :                                 return -1;
   43812             :                         }
   43813           0 :                         object->in.server_unc = talloc_str;
   43814             :                 }
   43815             :         }
   43816           0 :         return 0;
   43817             : }
   43818             : 
   43819           0 : static PyObject *py_srvsvc_NetShareDelSticky_in_get_share_name(PyObject *obj, void *closure)
   43820             : {
   43821           0 :         struct srvsvc_NetShareDelSticky *object = pytalloc_get_ptr(obj);
   43822           0 :         PyObject *py_share_name;
   43823           0 :         if (object->in.share_name == NULL) {
   43824           0 :                 py_share_name = Py_None;
   43825           0 :                 Py_INCREF(py_share_name);
   43826             :         } else {
   43827           0 :                 py_share_name = PyUnicode_Decode(object->in.share_name, strlen(object->in.share_name), "utf-8", "ignore");
   43828             :         }
   43829           0 :         return py_share_name;
   43830             : }
   43831             : 
   43832           0 : static int py_srvsvc_NetShareDelSticky_in_set_share_name(PyObject *py_obj, PyObject *value, void *closure)
   43833             : {
   43834           0 :         struct srvsvc_NetShareDelSticky *object = pytalloc_get_ptr(py_obj);
   43835           0 :         if (value == NULL) {
   43836           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.share_name");
   43837           0 :                 return -1;
   43838             :         }
   43839             :         {
   43840           0 :                 const char *test_str;
   43841           0 :                 const char *talloc_str;
   43842           0 :                 PyObject *unicode = NULL;
   43843           0 :                 if (PyUnicode_Check(value)) {
   43844           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43845           0 :                         if (unicode == NULL) {
   43846           0 :                                 return -1;
   43847             :                         }
   43848           0 :                         test_str = PyBytes_AS_STRING(unicode);
   43849           0 :                 } else if (PyBytes_Check(value)) {
   43850           0 :                         test_str = PyBytes_AS_STRING(value);
   43851             :                 } else {
   43852           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43853           0 :                         return -1;
   43854             :                 }
   43855           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43856           0 :                 if (unicode != NULL) {
   43857           0 :                         Py_DECREF(unicode);
   43858             :                 }
   43859           0 :                 if (talloc_str == NULL) {
   43860           0 :                         PyErr_NoMemory();
   43861           0 :                         return -1;
   43862             :                 }
   43863           0 :                 object->in.share_name = talloc_str;
   43864             :         }
   43865           0 :         return 0;
   43866             : }
   43867             : 
   43868           0 : static PyObject *py_srvsvc_NetShareDelSticky_in_get_reserved(PyObject *obj, void *closure)
   43869             : {
   43870           0 :         struct srvsvc_NetShareDelSticky *object = pytalloc_get_ptr(obj);
   43871           0 :         PyObject *py_reserved;
   43872           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->in.reserved));
   43873           0 :         return py_reserved;
   43874             : }
   43875             : 
   43876           0 : static int py_srvsvc_NetShareDelSticky_in_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   43877             : {
   43878           0 :         struct srvsvc_NetShareDelSticky *object = pytalloc_get_ptr(py_obj);
   43879           0 :         if (value == NULL) {
   43880           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.reserved");
   43881           0 :                 return -1;
   43882             :         }
   43883             :         {
   43884           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.reserved));
   43885           0 :                 if (PyLong_Check(value)) {
   43886           0 :                         unsigned long long test_var;
   43887           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   43888           0 :                         if (PyErr_Occurred() != NULL) {
   43889           0 :                                 return -1;
   43890             :                         }
   43891           0 :                         if (test_var > uint_max) {
   43892           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43893             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43894           0 :                                 return -1;
   43895             :                         }
   43896           0 :                         object->in.reserved = test_var;
   43897             :                 } else {
   43898           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43899             :                           PyLong_Type.tp_name);
   43900           0 :                         return -1;
   43901             :                 }
   43902             :         }
   43903           0 :         return 0;
   43904             : }
   43905             : 
   43906           0 : static PyObject *py_srvsvc_NetShareDelSticky_get_result(PyObject *obj, void *closure)
   43907             : {
   43908           0 :         struct srvsvc_NetShareDelSticky *object = pytalloc_get_ptr(obj);
   43909           0 :         PyObject *py_result;
   43910           0 :         py_result = PyErr_FromWERROR(object->out.result);
   43911           0 :         return py_result;
   43912             : }
   43913             : 
   43914           0 : static int py_srvsvc_NetShareDelSticky_set_result(PyObject *py_obj, PyObject *value, void *closure)
   43915             : {
   43916           0 :         struct srvsvc_NetShareDelSticky *object = pytalloc_get_ptr(py_obj);
   43917           0 :         if (value == NULL) {
   43918           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   43919           0 :                 return -1;
   43920             :         }
   43921           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   43922           0 :         return 0;
   43923             : }
   43924             : 
   43925             : static PyGetSetDef py_srvsvc_NetShareDelSticky_getsetters[] = {
   43926             :         {
   43927             :                 .name = discard_const_p(char, "in_server_unc"),
   43928             :                 .get = py_srvsvc_NetShareDelSticky_in_get_server_unc,
   43929             :                 .set = py_srvsvc_NetShareDelSticky_in_set_server_unc,
   43930             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43931             :         },
   43932             :         {
   43933             :                 .name = discard_const_p(char, "in_share_name"),
   43934             :                 .get = py_srvsvc_NetShareDelSticky_in_get_share_name,
   43935             :                 .set = py_srvsvc_NetShareDelSticky_in_set_share_name,
   43936             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43937             :         },
   43938             :         {
   43939             :                 .name = discard_const_p(char, "in_reserved"),
   43940             :                 .get = py_srvsvc_NetShareDelSticky_in_get_reserved,
   43941             :                 .set = py_srvsvc_NetShareDelSticky_in_set_reserved,
   43942             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   43943             :         },
   43944             :         {
   43945             :                 .name = discard_const_p(char, "result"),
   43946             :                 .get = py_srvsvc_NetShareDelSticky_get_result,
   43947             :                 .set = py_srvsvc_NetShareDelSticky_set_result,
   43948             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   43949             :         },
   43950             :         { .name = NULL }
   43951             : };
   43952             : 
   43953           0 : static PyObject *py_srvsvc_NetShareDelSticky_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   43954             : {
   43955           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareDelSticky, type);
   43956           0 :         return self;
   43957             : }
   43958             : 
   43959           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   43960             : {
   43961             : 
   43962             : 
   43963           0 :         return PyLong_FromLong(19);
   43964             : }
   43965             : 
   43966           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   43967             : {
   43968           0 :         const struct ndr_interface_call *call = NULL;
   43969           0 :         struct srvsvc_NetShareDelSticky *object = pytalloc_get_ptr(py_obj);
   43970           0 :         PyObject *ret = NULL;
   43971           0 :         struct ndr_push *push = NULL;
   43972           0 :         DATA_BLOB blob;
   43973           0 :         enum ndr_err_code err;
   43974             : 
   43975           0 :         if (ndr_table_srvsvc.num_calls < 20) {
   43976           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelSticky_ndr_pack");
   43977           0 :                 return NULL;
   43978             :         }
   43979           0 :         call = &ndr_table_srvsvc.calls[19];
   43980             : 
   43981           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   43982           0 :         if (push == NULL) {
   43983           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43984           0 :                 return NULL;
   43985             :         }
   43986             : 
   43987           0 :         push->flags |= ndr_push_flags;
   43988             : 
   43989           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   43990           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43991           0 :                 TALLOC_FREE(push);
   43992           0 :                 PyErr_SetNdrError(err);
   43993           0 :                 return NULL;
   43994             :         }
   43995           0 :         blob = ndr_push_blob(push);
   43996           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   43997           0 :         TALLOC_FREE(push);
   43998           0 :         return ret;
   43999             : }
   44000             : 
   44001           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44002             : {
   44003           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44004           0 :         PyObject *bigendian_obj = NULL;
   44005           0 :         PyObject *ndr64_obj = NULL;
   44006           0 :         libndr_flags ndr_push_flags = 0;
   44007             : 
   44008           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   44009             :                 discard_const_p(char *, kwnames),
   44010             :                 &bigendian_obj,
   44011             :                 &ndr64_obj)) {
   44012           0 :                 return NULL;
   44013             :         }
   44014             : 
   44015           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44016           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44017             :         }
   44018           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44019           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44020             :         }
   44021             : 
   44022           0 :         return py_srvsvc_NetShareDelSticky_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   44023             : }
   44024             : 
   44025           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44026             : {
   44027           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44028           0 :         PyObject *bigendian_obj = NULL;
   44029           0 :         PyObject *ndr64_obj = NULL;
   44030           0 :         libndr_flags ndr_push_flags = 0;
   44031             : 
   44032           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   44033             :                 discard_const_p(char *, kwnames),
   44034             :                 &bigendian_obj,
   44035             :                 &ndr64_obj)) {
   44036           0 :                 return NULL;
   44037             :         }
   44038             : 
   44039           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44040           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44041             :         }
   44042           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44043           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44044             :         }
   44045             : 
   44046           0 :         return py_srvsvc_NetShareDelSticky_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   44047             : }
   44048             : 
   44049           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   44050             : {
   44051           0 :         const struct ndr_interface_call *call = NULL;
   44052           0 :         struct srvsvc_NetShareDelSticky *object = pytalloc_get_ptr(py_obj);
   44053           0 :         struct ndr_pull *pull = NULL;
   44054           0 :         enum ndr_err_code err;
   44055             : 
   44056           0 :         if (ndr_table_srvsvc.num_calls < 20) {
   44057           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelSticky_ndr_unpack");
   44058           0 :                 return NULL;
   44059             :         }
   44060           0 :         call = &ndr_table_srvsvc.calls[19];
   44061             : 
   44062           0 :         pull = ndr_pull_init_blob(blob, object);
   44063           0 :         if (pull == NULL) {
   44064           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44065           0 :                 return NULL;
   44066             :         }
   44067             : 
   44068           0 :         pull->flags |= ndr_pull_flags;
   44069             : 
   44070           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   44071           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44072           0 :                 TALLOC_FREE(pull);
   44073           0 :                 PyErr_SetNdrError(err);
   44074           0 :                 return NULL;
   44075             :         }
   44076           0 :         if (!allow_remaining) {
   44077           0 :                 uint32_t highest_ofs;
   44078             : 
   44079           0 :                 if (pull->offset > pull->relative_highest_offset) {
   44080           0 :                         highest_ofs = pull->offset;
   44081             :                 } else {
   44082           0 :                         highest_ofs = pull->relative_highest_offset;
   44083             :                 }
   44084           0 :                 if (highest_ofs < pull->data_size) {
   44085           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   44086             :                                 "not all bytes consumed ofs[%u] size[%u]",
   44087             :                                 highest_ofs, pull->data_size);
   44088           0 :                         TALLOC_FREE(pull);
   44089           0 :                         PyErr_SetNdrError(err);
   44090           0 :                         return NULL;
   44091             :                 }
   44092             :         }
   44093             : 
   44094           0 :         TALLOC_FREE(pull);
   44095           0 :         Py_RETURN_NONE;
   44096             : }
   44097             : 
   44098           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44099             : {
   44100           0 :         DATA_BLOB blob;
   44101           0 :         Py_ssize_t blob_length = 0;
   44102           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44103           0 :         PyObject *bigendian_obj = NULL;
   44104           0 :         PyObject *ndr64_obj = NULL;
   44105           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44106           0 :         PyObject *allow_remaining_obj = NULL;
   44107           0 :         bool allow_remaining = false;
   44108             : 
   44109           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   44110             :                 discard_const_p(char *, kwnames),
   44111             :                 &blob.data, &blob_length,
   44112             :                 &bigendian_obj,
   44113             :                 &ndr64_obj,
   44114             :                 &allow_remaining_obj)) {
   44115           0 :                 return NULL;
   44116             :         }
   44117           0 :         blob.length = blob_length;
   44118             : 
   44119           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44120           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44121             :         }
   44122           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44123           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44124             :         }
   44125             : 
   44126           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44127           0 :                 allow_remaining = true;
   44128             :         }
   44129             : 
   44130           0 :         return py_srvsvc_NetShareDelSticky_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   44131             : }
   44132             : 
   44133           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44134             : {
   44135           0 :         DATA_BLOB blob;
   44136           0 :         Py_ssize_t blob_length = 0;
   44137           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44138           0 :         PyObject *bigendian_obj = NULL;
   44139           0 :         PyObject *ndr64_obj = NULL;
   44140           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44141           0 :         PyObject *allow_remaining_obj = NULL;
   44142           0 :         bool allow_remaining = false;
   44143             : 
   44144           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   44145             :                 discard_const_p(char *, kwnames),
   44146             :                 &blob.data, &blob_length,
   44147             :                 &bigendian_obj,
   44148             :                 &ndr64_obj,
   44149             :                 &allow_remaining_obj)) {
   44150           0 :                 return NULL;
   44151             :         }
   44152           0 :         blob.length = blob_length;
   44153             : 
   44154           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44155           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44156             :         }
   44157           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44158           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44159             :         }
   44160             : 
   44161           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44162           0 :                 allow_remaining = true;
   44163             :         }
   44164             : 
   44165           0 :         return py_srvsvc_NetShareDelSticky_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   44166             : }
   44167             : 
   44168           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   44169             : {
   44170           0 :         const struct ndr_interface_call *call = NULL;
   44171           0 :         struct srvsvc_NetShareDelSticky *object = pytalloc_get_ptr(py_obj);
   44172           0 :         PyObject *ret;
   44173           0 :         char *retstr;
   44174             : 
   44175           0 :         if (ndr_table_srvsvc.num_calls < 20) {
   44176           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelSticky_ndr_print");
   44177           0 :                 return NULL;
   44178             :         }
   44179           0 :         call = &ndr_table_srvsvc.calls[19];
   44180             : 
   44181           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   44182           0 :         ret = PyUnicode_FromString(retstr);
   44183           0 :         TALLOC_FREE(retstr);
   44184             : 
   44185           0 :         return ret;
   44186             : }
   44187             : 
   44188           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44189             : {
   44190           0 :         return py_srvsvc_NetShareDelSticky_ndr_print(py_obj, "srvsvc_NetShareDelSticky_in", NDR_IN);
   44191             : }
   44192             : 
   44193           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44194             : {
   44195           0 :         return py_srvsvc_NetShareDelSticky_ndr_print(py_obj, "srvsvc_NetShareDelSticky_out", NDR_OUT);
   44196             : }
   44197             : 
   44198             : static PyMethodDef py_srvsvc_NetShareDelSticky_methods[] = {
   44199             :         { "opnum", (PyCFunction)py_srvsvc_NetShareDelSticky_ndr_opnum, METH_NOARGS|METH_CLASS,
   44200             :                 "srvsvc.NetShareDelSticky.opnum() -> 19 (0x13) " },
   44201             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelSticky_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   44202             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   44203             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelSticky_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   44204             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   44205             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelSticky_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   44206             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   44207             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelSticky_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   44208             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   44209             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareDelSticky_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   44210             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareDelSticky_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   44211             :         { NULL, NULL, 0, NULL }
   44212             : };
   44213             : 
   44214             : 
   44215             : static PyTypeObject srvsvc_NetShareDelSticky_Type = {
   44216             :         PyVarObject_HEAD_INIT(NULL, 0)
   44217             :         .tp_name = "srvsvc.NetShareDelSticky",
   44218             :         .tp_getset = py_srvsvc_NetShareDelSticky_getsetters,
   44219             :         .tp_methods = py_srvsvc_NetShareDelSticky_methods,
   44220             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44221             :         .tp_new = py_srvsvc_NetShareDelSticky_new,
   44222             : };
   44223             : 
   44224           0 : static bool pack_py_srvsvc_NetShareDelSticky_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareDelSticky *r)
   44225             : {
   44226           0 :         PyObject *py_server_unc;
   44227           0 :         PyObject *py_share_name;
   44228           0 :         PyObject *py_reserved;
   44229           0 :         const char *kwnames[] = {
   44230             :                 "server_unc", "share_name", "reserved", NULL
   44231             :         };
   44232             : 
   44233           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetShareDelSticky", discard_const_p(char *, kwnames), &py_server_unc, &py_share_name, &py_reserved)) {
   44234           0 :                 return false;
   44235             :         }
   44236             : 
   44237           0 :         if (py_server_unc == NULL) {
   44238           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   44239           0 :                 return false;
   44240             :         }
   44241           0 :         if (py_server_unc == Py_None) {
   44242           0 :                 r->in.server_unc = NULL;
   44243             :         } else {
   44244           0 :                 r->in.server_unc = NULL;
   44245             :                 {
   44246           0 :                         const char *test_str;
   44247           0 :                         const char *talloc_str;
   44248           0 :                         PyObject *unicode = NULL;
   44249           0 :                         if (PyUnicode_Check(py_server_unc)) {
   44250           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   44251           0 :                                 if (unicode == NULL) {
   44252           0 :                                         return false;
   44253             :                                 }
   44254           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44255           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   44256           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   44257             :                         } else {
   44258           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   44259           0 :                                 return false;
   44260             :                         }
   44261           0 :                         talloc_str = talloc_strdup(r, test_str);
   44262           0 :                         if (unicode != NULL) {
   44263           0 :                                 Py_DECREF(unicode);
   44264             :                         }
   44265           0 :                         if (talloc_str == NULL) {
   44266           0 :                                 PyErr_NoMemory();
   44267           0 :                                 return false;
   44268             :                         }
   44269           0 :                         r->in.server_unc = talloc_str;
   44270             :                 }
   44271             :         }
   44272           0 :         if (py_share_name == NULL) {
   44273           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.share_name");
   44274           0 :                 return false;
   44275             :         }
   44276             :         {
   44277           0 :                 const char *test_str;
   44278           0 :                 const char *talloc_str;
   44279           0 :                 PyObject *unicode = NULL;
   44280           0 :                 if (PyUnicode_Check(py_share_name)) {
   44281           0 :                         unicode = PyUnicode_AsEncodedString(py_share_name, "utf-8", "ignore");
   44282           0 :                         if (unicode == NULL) {
   44283           0 :                                 return false;
   44284             :                         }
   44285           0 :                         test_str = PyBytes_AS_STRING(unicode);
   44286           0 :                 } else if (PyBytes_Check(py_share_name)) {
   44287           0 :                         test_str = PyBytes_AS_STRING(py_share_name);
   44288             :                 } else {
   44289           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
   44290           0 :                         return false;
   44291             :                 }
   44292           0 :                 talloc_str = talloc_strdup(r, test_str);
   44293           0 :                 if (unicode != NULL) {
   44294           0 :                         Py_DECREF(unicode);
   44295             :                 }
   44296           0 :                 if (talloc_str == NULL) {
   44297           0 :                         PyErr_NoMemory();
   44298           0 :                         return false;
   44299             :                 }
   44300           0 :                 r->in.share_name = talloc_str;
   44301             :         }
   44302           0 :         if (py_reserved == NULL) {
   44303           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.reserved");
   44304           0 :                 return false;
   44305             :         }
   44306             :         {
   44307           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reserved));
   44308           0 :                 if (PyLong_Check(py_reserved)) {
   44309           0 :                         unsigned long long test_var;
   44310           0 :                         test_var = PyLong_AsUnsignedLongLong(py_reserved);
   44311           0 :                         if (PyErr_Occurred() != NULL) {
   44312           0 :                                 return false;
   44313             :                         }
   44314           0 :                         if (test_var > uint_max) {
   44315           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44316             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44317           0 :                                 return false;
   44318             :                         }
   44319           0 :                         r->in.reserved = test_var;
   44320             :                 } else {
   44321           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44322             :                           PyLong_Type.tp_name);
   44323           0 :                         return false;
   44324             :                 }
   44325             :         }
   44326           0 :         return true;
   44327             : }
   44328             : 
   44329           0 : static PyObject *unpack_py_srvsvc_NetShareDelSticky_args_out(struct srvsvc_NetShareDelSticky *r)
   44330             : {
   44331           0 :         PyObject *result;
   44332           0 :         result = Py_None;
   44333           0 :         Py_INCREF(result);
   44334           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   44335           0 :                 PyErr_SetWERROR(r->out.result);
   44336           0 :                 return NULL;
   44337             :         }
   44338             : 
   44339           0 :         return result;
   44340             : }
   44341             : 
   44342             : 
   44343           0 : static PyObject *py_srvsvc_NetShareCheck_in_get_server_unc(PyObject *obj, void *closure)
   44344             : {
   44345           0 :         struct srvsvc_NetShareCheck *object = pytalloc_get_ptr(obj);
   44346           0 :         PyObject *py_server_unc;
   44347           0 :         if (object->in.server_unc == NULL) {
   44348           0 :                 Py_RETURN_NONE;
   44349             :         }
   44350           0 :         if (object->in.server_unc == NULL) {
   44351           0 :                 py_server_unc = Py_None;
   44352           0 :                 Py_INCREF(py_server_unc);
   44353             :         } else {
   44354           0 :                 if (object->in.server_unc == NULL) {
   44355           0 :                         py_server_unc = Py_None;
   44356           0 :                         Py_INCREF(py_server_unc);
   44357             :                 } else {
   44358           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   44359             :                 }
   44360             :         }
   44361           0 :         return py_server_unc;
   44362             : }
   44363             : 
   44364           0 : static int py_srvsvc_NetShareCheck_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   44365             : {
   44366           0 :         struct srvsvc_NetShareCheck *object = pytalloc_get_ptr(py_obj);
   44367           0 :         if (value == NULL) {
   44368           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   44369           0 :                 return -1;
   44370             :         }
   44371           0 :         if (value == Py_None) {
   44372           0 :                 object->in.server_unc = NULL;
   44373             :         } else {
   44374           0 :                 object->in.server_unc = NULL;
   44375             :                 {
   44376           0 :                         const char *test_str;
   44377           0 :                         const char *talloc_str;
   44378           0 :                         PyObject *unicode = NULL;
   44379           0 :                         if (PyUnicode_Check(value)) {
   44380           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44381           0 :                                 if (unicode == NULL) {
   44382           0 :                                         return -1;
   44383             :                                 }
   44384           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44385           0 :                         } else if (PyBytes_Check(value)) {
   44386           0 :                                 test_str = PyBytes_AS_STRING(value);
   44387             :                         } else {
   44388           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44389           0 :                                 return -1;
   44390             :                         }
   44391           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44392           0 :                         if (unicode != NULL) {
   44393           0 :                                 Py_DECREF(unicode);
   44394             :                         }
   44395           0 :                         if (talloc_str == NULL) {
   44396           0 :                                 PyErr_NoMemory();
   44397           0 :                                 return -1;
   44398             :                         }
   44399           0 :                         object->in.server_unc = talloc_str;
   44400             :                 }
   44401             :         }
   44402           0 :         return 0;
   44403             : }
   44404             : 
   44405           0 : static PyObject *py_srvsvc_NetShareCheck_in_get_device_name(PyObject *obj, void *closure)
   44406             : {
   44407           0 :         struct srvsvc_NetShareCheck *object = pytalloc_get_ptr(obj);
   44408           0 :         PyObject *py_device_name;
   44409           0 :         if (object->in.device_name == NULL) {
   44410           0 :                 py_device_name = Py_None;
   44411           0 :                 Py_INCREF(py_device_name);
   44412             :         } else {
   44413           0 :                 py_device_name = PyUnicode_Decode(object->in.device_name, strlen(object->in.device_name), "utf-8", "ignore");
   44414             :         }
   44415           0 :         return py_device_name;
   44416             : }
   44417             : 
   44418           0 : static int py_srvsvc_NetShareCheck_in_set_device_name(PyObject *py_obj, PyObject *value, void *closure)
   44419             : {
   44420           0 :         struct srvsvc_NetShareCheck *object = pytalloc_get_ptr(py_obj);
   44421           0 :         if (value == NULL) {
   44422           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.device_name");
   44423           0 :                 return -1;
   44424             :         }
   44425             :         {
   44426           0 :                 const char *test_str;
   44427           0 :                 const char *talloc_str;
   44428           0 :                 PyObject *unicode = NULL;
   44429           0 :                 if (PyUnicode_Check(value)) {
   44430           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44431           0 :                         if (unicode == NULL) {
   44432           0 :                                 return -1;
   44433             :                         }
   44434           0 :                         test_str = PyBytes_AS_STRING(unicode);
   44435           0 :                 } else if (PyBytes_Check(value)) {
   44436           0 :                         test_str = PyBytes_AS_STRING(value);
   44437             :                 } else {
   44438           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44439           0 :                         return -1;
   44440             :                 }
   44441           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44442           0 :                 if (unicode != NULL) {
   44443           0 :                         Py_DECREF(unicode);
   44444             :                 }
   44445           0 :                 if (talloc_str == NULL) {
   44446           0 :                         PyErr_NoMemory();
   44447           0 :                         return -1;
   44448             :                 }
   44449           0 :                 object->in.device_name = talloc_str;
   44450             :         }
   44451           0 :         return 0;
   44452             : }
   44453             : 
   44454           0 : static PyObject *py_srvsvc_NetShareCheck_out_get_type(PyObject *obj, void *closure)
   44455             : {
   44456           0 :         struct srvsvc_NetShareCheck *object = pytalloc_get_ptr(obj);
   44457           0 :         PyObject *py_type;
   44458           0 :         if (object->out.type == NULL) {
   44459           0 :                 Py_RETURN_NONE;
   44460             :         }
   44461           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.type));
   44462           0 :         return py_type;
   44463             : }
   44464             : 
   44465           0 : static int py_srvsvc_NetShareCheck_out_set_type(PyObject *py_obj, PyObject *value, void *closure)
   44466             : {
   44467           0 :         struct srvsvc_NetShareCheck *object = pytalloc_get_ptr(py_obj);
   44468           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.type));
   44469           0 :         if (value == NULL) {
   44470           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.type");
   44471           0 :                 return -1;
   44472             :         }
   44473           0 :         object->out.type = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.type);
   44474           0 :         if (object->out.type == NULL) {
   44475           0 :                 PyErr_NoMemory();
   44476           0 :                 return -1;
   44477             :         }
   44478             :         {
   44479           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.type));
   44480           0 :                 if (PyLong_Check(value)) {
   44481           0 :                         unsigned long long test_var;
   44482           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   44483           0 :                         if (PyErr_Occurred() != NULL) {
   44484           0 :                                 return -1;
   44485             :                         }
   44486           0 :                         if (test_var > uint_max) {
   44487           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44488             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44489           0 :                                 return -1;
   44490             :                         }
   44491           0 :                         *object->out.type = test_var;
   44492             :                 } else {
   44493           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44494             :                           PyLong_Type.tp_name);
   44495           0 :                         return -1;
   44496             :                 }
   44497             :         }
   44498           0 :         return 0;
   44499             : }
   44500             : 
   44501           0 : static PyObject *py_srvsvc_NetShareCheck_get_result(PyObject *obj, void *closure)
   44502             : {
   44503           0 :         struct srvsvc_NetShareCheck *object = pytalloc_get_ptr(obj);
   44504           0 :         PyObject *py_result;
   44505           0 :         py_result = PyErr_FromWERROR(object->out.result);
   44506           0 :         return py_result;
   44507             : }
   44508             : 
   44509           0 : static int py_srvsvc_NetShareCheck_set_result(PyObject *py_obj, PyObject *value, void *closure)
   44510             : {
   44511           0 :         struct srvsvc_NetShareCheck *object = pytalloc_get_ptr(py_obj);
   44512           0 :         if (value == NULL) {
   44513           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   44514           0 :                 return -1;
   44515             :         }
   44516           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   44517           0 :         return 0;
   44518             : }
   44519             : 
   44520             : static PyGetSetDef py_srvsvc_NetShareCheck_getsetters[] = {
   44521             :         {
   44522             :                 .name = discard_const_p(char, "in_server_unc"),
   44523             :                 .get = py_srvsvc_NetShareCheck_in_get_server_unc,
   44524             :                 .set = py_srvsvc_NetShareCheck_in_set_server_unc,
   44525             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   44526             :         },
   44527             :         {
   44528             :                 .name = discard_const_p(char, "in_device_name"),
   44529             :                 .get = py_srvsvc_NetShareCheck_in_get_device_name,
   44530             :                 .set = py_srvsvc_NetShareCheck_in_set_device_name,
   44531             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   44532             :         },
   44533             :         {
   44534             :                 .name = discard_const_p(char, "out_type"),
   44535             :                 .get = py_srvsvc_NetShareCheck_out_get_type,
   44536             :                 .set = py_srvsvc_NetShareCheck_out_set_type,
   44537             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_ShareType")
   44538             :         },
   44539             :         {
   44540             :                 .name = discard_const_p(char, "result"),
   44541             :                 .get = py_srvsvc_NetShareCheck_get_result,
   44542             :                 .set = py_srvsvc_NetShareCheck_set_result,
   44543             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   44544             :         },
   44545             :         { .name = NULL }
   44546             : };
   44547             : 
   44548           0 : static PyObject *py_srvsvc_NetShareCheck_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   44549             : {
   44550           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareCheck, type);
   44551           0 :         struct srvsvc_NetShareCheck *_self = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(self);
   44552           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   44553           0 :         _self->out.type = talloc_zero(mem_ctx, enum srvsvc_ShareType);
   44554           0 :         return self;
   44555             : }
   44556             : 
   44557           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   44558             : {
   44559             : 
   44560             : 
   44561           0 :         return PyLong_FromLong(20);
   44562             : }
   44563             : 
   44564           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   44565             : {
   44566           0 :         const struct ndr_interface_call *call = NULL;
   44567           0 :         struct srvsvc_NetShareCheck *object = pytalloc_get_ptr(py_obj);
   44568           0 :         PyObject *ret = NULL;
   44569           0 :         struct ndr_push *push = NULL;
   44570           0 :         DATA_BLOB blob;
   44571           0 :         enum ndr_err_code err;
   44572             : 
   44573           0 :         if (ndr_table_srvsvc.num_calls < 21) {
   44574           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareCheck_ndr_pack");
   44575           0 :                 return NULL;
   44576             :         }
   44577           0 :         call = &ndr_table_srvsvc.calls[20];
   44578             : 
   44579           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   44580           0 :         if (push == NULL) {
   44581           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44582           0 :                 return NULL;
   44583             :         }
   44584             : 
   44585           0 :         push->flags |= ndr_push_flags;
   44586             : 
   44587           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   44588           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44589           0 :                 TALLOC_FREE(push);
   44590           0 :                 PyErr_SetNdrError(err);
   44591           0 :                 return NULL;
   44592             :         }
   44593           0 :         blob = ndr_push_blob(push);
   44594           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   44595           0 :         TALLOC_FREE(push);
   44596           0 :         return ret;
   44597             : }
   44598             : 
   44599           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44600             : {
   44601           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44602           0 :         PyObject *bigendian_obj = NULL;
   44603           0 :         PyObject *ndr64_obj = NULL;
   44604           0 :         libndr_flags ndr_push_flags = 0;
   44605             : 
   44606           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   44607             :                 discard_const_p(char *, kwnames),
   44608             :                 &bigendian_obj,
   44609             :                 &ndr64_obj)) {
   44610           0 :                 return NULL;
   44611             :         }
   44612             : 
   44613           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44614           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44615             :         }
   44616           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44617           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44618             :         }
   44619             : 
   44620           0 :         return py_srvsvc_NetShareCheck_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   44621             : }
   44622             : 
   44623           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44624             : {
   44625           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44626           0 :         PyObject *bigendian_obj = NULL;
   44627           0 :         PyObject *ndr64_obj = NULL;
   44628           0 :         libndr_flags ndr_push_flags = 0;
   44629             : 
   44630           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   44631             :                 discard_const_p(char *, kwnames),
   44632             :                 &bigendian_obj,
   44633             :                 &ndr64_obj)) {
   44634           0 :                 return NULL;
   44635             :         }
   44636             : 
   44637           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44638           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44639             :         }
   44640           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44641           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44642             :         }
   44643             : 
   44644           0 :         return py_srvsvc_NetShareCheck_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   44645             : }
   44646             : 
   44647           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   44648             : {
   44649           0 :         const struct ndr_interface_call *call = NULL;
   44650           0 :         struct srvsvc_NetShareCheck *object = pytalloc_get_ptr(py_obj);
   44651           0 :         struct ndr_pull *pull = NULL;
   44652           0 :         enum ndr_err_code err;
   44653             : 
   44654           0 :         if (ndr_table_srvsvc.num_calls < 21) {
   44655           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareCheck_ndr_unpack");
   44656           0 :                 return NULL;
   44657             :         }
   44658           0 :         call = &ndr_table_srvsvc.calls[20];
   44659             : 
   44660           0 :         pull = ndr_pull_init_blob(blob, object);
   44661           0 :         if (pull == NULL) {
   44662           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44663           0 :                 return NULL;
   44664             :         }
   44665             : 
   44666           0 :         pull->flags |= ndr_pull_flags;
   44667             : 
   44668           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   44669           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44670           0 :                 TALLOC_FREE(pull);
   44671           0 :                 PyErr_SetNdrError(err);
   44672           0 :                 return NULL;
   44673             :         }
   44674           0 :         if (!allow_remaining) {
   44675           0 :                 uint32_t highest_ofs;
   44676             : 
   44677           0 :                 if (pull->offset > pull->relative_highest_offset) {
   44678           0 :                         highest_ofs = pull->offset;
   44679             :                 } else {
   44680           0 :                         highest_ofs = pull->relative_highest_offset;
   44681             :                 }
   44682           0 :                 if (highest_ofs < pull->data_size) {
   44683           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   44684             :                                 "not all bytes consumed ofs[%u] size[%u]",
   44685             :                                 highest_ofs, pull->data_size);
   44686           0 :                         TALLOC_FREE(pull);
   44687           0 :                         PyErr_SetNdrError(err);
   44688           0 :                         return NULL;
   44689             :                 }
   44690             :         }
   44691             : 
   44692           0 :         TALLOC_FREE(pull);
   44693           0 :         Py_RETURN_NONE;
   44694             : }
   44695             : 
   44696           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44697             : {
   44698           0 :         DATA_BLOB blob;
   44699           0 :         Py_ssize_t blob_length = 0;
   44700           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44701           0 :         PyObject *bigendian_obj = NULL;
   44702           0 :         PyObject *ndr64_obj = NULL;
   44703           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44704           0 :         PyObject *allow_remaining_obj = NULL;
   44705           0 :         bool allow_remaining = false;
   44706             : 
   44707           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   44708             :                 discard_const_p(char *, kwnames),
   44709             :                 &blob.data, &blob_length,
   44710             :                 &bigendian_obj,
   44711             :                 &ndr64_obj,
   44712             :                 &allow_remaining_obj)) {
   44713           0 :                 return NULL;
   44714             :         }
   44715           0 :         blob.length = blob_length;
   44716             : 
   44717           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44718           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44719             :         }
   44720           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44721           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44722             :         }
   44723             : 
   44724           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44725           0 :                 allow_remaining = true;
   44726             :         }
   44727             : 
   44728           0 :         return py_srvsvc_NetShareCheck_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   44729             : }
   44730             : 
   44731           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44732             : {
   44733           0 :         DATA_BLOB blob;
   44734           0 :         Py_ssize_t blob_length = 0;
   44735           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44736           0 :         PyObject *bigendian_obj = NULL;
   44737           0 :         PyObject *ndr64_obj = NULL;
   44738           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44739           0 :         PyObject *allow_remaining_obj = NULL;
   44740           0 :         bool allow_remaining = false;
   44741             : 
   44742           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   44743             :                 discard_const_p(char *, kwnames),
   44744             :                 &blob.data, &blob_length,
   44745             :                 &bigendian_obj,
   44746             :                 &ndr64_obj,
   44747             :                 &allow_remaining_obj)) {
   44748           0 :                 return NULL;
   44749             :         }
   44750           0 :         blob.length = blob_length;
   44751             : 
   44752           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44753           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44754             :         }
   44755           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44756           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44757             :         }
   44758             : 
   44759           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44760           0 :                 allow_remaining = true;
   44761             :         }
   44762             : 
   44763           0 :         return py_srvsvc_NetShareCheck_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   44764             : }
   44765             : 
   44766           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   44767             : {
   44768           0 :         const struct ndr_interface_call *call = NULL;
   44769           0 :         struct srvsvc_NetShareCheck *object = pytalloc_get_ptr(py_obj);
   44770           0 :         PyObject *ret;
   44771           0 :         char *retstr;
   44772             : 
   44773           0 :         if (ndr_table_srvsvc.num_calls < 21) {
   44774           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareCheck_ndr_print");
   44775           0 :                 return NULL;
   44776             :         }
   44777           0 :         call = &ndr_table_srvsvc.calls[20];
   44778             : 
   44779           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   44780           0 :         ret = PyUnicode_FromString(retstr);
   44781           0 :         TALLOC_FREE(retstr);
   44782             : 
   44783           0 :         return ret;
   44784             : }
   44785             : 
   44786           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44787             : {
   44788           0 :         return py_srvsvc_NetShareCheck_ndr_print(py_obj, "srvsvc_NetShareCheck_in", NDR_IN);
   44789             : }
   44790             : 
   44791           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44792             : {
   44793           0 :         return py_srvsvc_NetShareCheck_ndr_print(py_obj, "srvsvc_NetShareCheck_out", NDR_OUT);
   44794             : }
   44795             : 
   44796             : static PyMethodDef py_srvsvc_NetShareCheck_methods[] = {
   44797             :         { "opnum", (PyCFunction)py_srvsvc_NetShareCheck_ndr_opnum, METH_NOARGS|METH_CLASS,
   44798             :                 "srvsvc.NetShareCheck.opnum() -> 20 (0x14) " },
   44799             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareCheck_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   44800             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   44801             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareCheck_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   44802             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   44803             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareCheck_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   44804             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   44805             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareCheck_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   44806             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   44807             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareCheck_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   44808             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareCheck_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   44809             :         { NULL, NULL, 0, NULL }
   44810             : };
   44811             : 
   44812             : 
   44813             : static PyTypeObject srvsvc_NetShareCheck_Type = {
   44814             :         PyVarObject_HEAD_INIT(NULL, 0)
   44815             :         .tp_name = "srvsvc.NetShareCheck",
   44816             :         .tp_getset = py_srvsvc_NetShareCheck_getsetters,
   44817             :         .tp_methods = py_srvsvc_NetShareCheck_methods,
   44818             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44819             :         .tp_new = py_srvsvc_NetShareCheck_new,
   44820             : };
   44821             : 
   44822           0 : static bool pack_py_srvsvc_NetShareCheck_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareCheck *r)
   44823             : {
   44824           0 :         PyObject *py_server_unc;
   44825           0 :         PyObject *py_device_name;
   44826           0 :         const char *kwnames[] = {
   44827             :                 "server_unc", "device_name", NULL
   44828             :         };
   44829             : 
   44830           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:srvsvc_NetShareCheck", discard_const_p(char *, kwnames), &py_server_unc, &py_device_name)) {
   44831           0 :                 return false;
   44832             :         }
   44833             : 
   44834           0 :         if (py_server_unc == NULL) {
   44835           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   44836           0 :                 return false;
   44837             :         }
   44838           0 :         if (py_server_unc == Py_None) {
   44839           0 :                 r->in.server_unc = NULL;
   44840             :         } else {
   44841           0 :                 r->in.server_unc = NULL;
   44842             :                 {
   44843           0 :                         const char *test_str;
   44844           0 :                         const char *talloc_str;
   44845           0 :                         PyObject *unicode = NULL;
   44846           0 :                         if (PyUnicode_Check(py_server_unc)) {
   44847           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   44848           0 :                                 if (unicode == NULL) {
   44849           0 :                                         return false;
   44850             :                                 }
   44851           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44852           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   44853           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   44854             :                         } else {
   44855           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   44856           0 :                                 return false;
   44857             :                         }
   44858           0 :                         talloc_str = talloc_strdup(r, test_str);
   44859           0 :                         if (unicode != NULL) {
   44860           0 :                                 Py_DECREF(unicode);
   44861             :                         }
   44862           0 :                         if (talloc_str == NULL) {
   44863           0 :                                 PyErr_NoMemory();
   44864           0 :                                 return false;
   44865             :                         }
   44866           0 :                         r->in.server_unc = talloc_str;
   44867             :                 }
   44868             :         }
   44869           0 :         if (py_device_name == NULL) {
   44870           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.device_name");
   44871           0 :                 return false;
   44872             :         }
   44873             :         {
   44874           0 :                 const char *test_str;
   44875           0 :                 const char *talloc_str;
   44876           0 :                 PyObject *unicode = NULL;
   44877           0 :                 if (PyUnicode_Check(py_device_name)) {
   44878           0 :                         unicode = PyUnicode_AsEncodedString(py_device_name, "utf-8", "ignore");
   44879           0 :                         if (unicode == NULL) {
   44880           0 :                                 return false;
   44881             :                         }
   44882           0 :                         test_str = PyBytes_AS_STRING(unicode);
   44883           0 :                 } else if (PyBytes_Check(py_device_name)) {
   44884           0 :                         test_str = PyBytes_AS_STRING(py_device_name);
   44885             :                 } else {
   44886           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_device_name)->tp_name);
   44887           0 :                         return false;
   44888             :                 }
   44889           0 :                 talloc_str = talloc_strdup(r, test_str);
   44890           0 :                 if (unicode != NULL) {
   44891           0 :                         Py_DECREF(unicode);
   44892             :                 }
   44893           0 :                 if (talloc_str == NULL) {
   44894           0 :                         PyErr_NoMemory();
   44895           0 :                         return false;
   44896             :                 }
   44897           0 :                 r->in.device_name = talloc_str;
   44898             :         }
   44899           0 :         return true;
   44900             : }
   44901             : 
   44902           0 : static PyObject *unpack_py_srvsvc_NetShareCheck_args_out(struct srvsvc_NetShareCheck *r)
   44903             : {
   44904           0 :         PyObject *result;
   44905           0 :         PyObject *py_type;
   44906           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.type));
   44907           0 :         result = py_type;
   44908           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   44909           0 :                 PyErr_SetWERROR(r->out.result);
   44910           0 :                 return NULL;
   44911             :         }
   44912             : 
   44913           0 :         return result;
   44914             : }
   44915             : 
   44916             : 
   44917           0 : static PyObject *py_srvsvc_NetSrvGetInfo_in_get_server_unc(PyObject *obj, void *closure)
   44918             : {
   44919           0 :         struct srvsvc_NetSrvGetInfo *object = pytalloc_get_ptr(obj);
   44920           0 :         PyObject *py_server_unc;
   44921           0 :         if (object->in.server_unc == NULL) {
   44922           0 :                 Py_RETURN_NONE;
   44923             :         }
   44924           0 :         if (object->in.server_unc == NULL) {
   44925           0 :                 py_server_unc = Py_None;
   44926           0 :                 Py_INCREF(py_server_unc);
   44927             :         } else {
   44928           0 :                 if (object->in.server_unc == NULL) {
   44929           0 :                         py_server_unc = Py_None;
   44930           0 :                         Py_INCREF(py_server_unc);
   44931             :                 } else {
   44932           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   44933             :                 }
   44934             :         }
   44935           0 :         return py_server_unc;
   44936             : }
   44937             : 
   44938           0 : static int py_srvsvc_NetSrvGetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   44939             : {
   44940           0 :         struct srvsvc_NetSrvGetInfo *object = pytalloc_get_ptr(py_obj);
   44941           0 :         if (value == NULL) {
   44942           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   44943           0 :                 return -1;
   44944             :         }
   44945           0 :         if (value == Py_None) {
   44946           0 :                 object->in.server_unc = NULL;
   44947             :         } else {
   44948           0 :                 object->in.server_unc = NULL;
   44949             :                 {
   44950           0 :                         const char *test_str;
   44951           0 :                         const char *talloc_str;
   44952           0 :                         PyObject *unicode = NULL;
   44953           0 :                         if (PyUnicode_Check(value)) {
   44954           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44955           0 :                                 if (unicode == NULL) {
   44956           0 :                                         return -1;
   44957             :                                 }
   44958           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44959           0 :                         } else if (PyBytes_Check(value)) {
   44960           0 :                                 test_str = PyBytes_AS_STRING(value);
   44961             :                         } else {
   44962           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44963           0 :                                 return -1;
   44964             :                         }
   44965           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44966           0 :                         if (unicode != NULL) {
   44967           0 :                                 Py_DECREF(unicode);
   44968             :                         }
   44969           0 :                         if (talloc_str == NULL) {
   44970           0 :                                 PyErr_NoMemory();
   44971           0 :                                 return -1;
   44972             :                         }
   44973           0 :                         object->in.server_unc = talloc_str;
   44974             :                 }
   44975             :         }
   44976           0 :         return 0;
   44977             : }
   44978             : 
   44979           0 : static PyObject *py_srvsvc_NetSrvGetInfo_in_get_level(PyObject *obj, void *closure)
   44980             : {
   44981           0 :         struct srvsvc_NetSrvGetInfo *object = pytalloc_get_ptr(obj);
   44982           0 :         PyObject *py_level;
   44983           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   44984           0 :         return py_level;
   44985             : }
   44986             : 
   44987           0 : static int py_srvsvc_NetSrvGetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   44988             : {
   44989           0 :         struct srvsvc_NetSrvGetInfo *object = pytalloc_get_ptr(py_obj);
   44990           0 :         if (value == NULL) {
   44991           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   44992           0 :                 return -1;
   44993             :         }
   44994             :         {
   44995           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   44996           0 :                 if (PyLong_Check(value)) {
   44997           0 :                         unsigned long long test_var;
   44998           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   44999           0 :                         if (PyErr_Occurred() != NULL) {
   45000           0 :                                 return -1;
   45001             :                         }
   45002           0 :                         if (test_var > uint_max) {
   45003           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45004             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45005           0 :                                 return -1;
   45006             :                         }
   45007           0 :                         object->in.level = test_var;
   45008             :                 } else {
   45009           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45010             :                           PyLong_Type.tp_name);
   45011           0 :                         return -1;
   45012             :                 }
   45013             :         }
   45014           0 :         return 0;
   45015             : }
   45016             : 
   45017           0 : static PyObject *py_srvsvc_NetSrvGetInfo_out_get_info(PyObject *obj, void *closure)
   45018             : {
   45019           0 :         struct srvsvc_NetSrvGetInfo *object = pytalloc_get_ptr(obj);
   45020           0 :         PyObject *py_info;
   45021           0 :         if (object->out.info == NULL) {
   45022           0 :                 Py_RETURN_NONE;
   45023             :         }
   45024           0 :         py_info = pyrpc_import_union(&srvsvc_NetSrvInfo_Type, object->out.info, object->in.level, object->out.info, "union srvsvc_NetSrvInfo");
   45025           0 :         if (py_info == NULL) {
   45026           0 :                 return NULL;
   45027             :         }
   45028           0 :         return py_info;
   45029             : }
   45030             : 
   45031           0 : static int py_srvsvc_NetSrvGetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   45032             : {
   45033           0 :         struct srvsvc_NetSrvGetInfo *object = pytalloc_get_ptr(py_obj);
   45034           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   45035           0 :         if (value == NULL) {
   45036           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   45037           0 :                 return -1;
   45038             :         }
   45039           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   45040           0 :         if (object->out.info == NULL) {
   45041           0 :                 PyErr_NoMemory();
   45042           0 :                 return -1;
   45043             :         }
   45044             :         {
   45045           0 :                 union srvsvc_NetSrvInfo *info_switch_1;
   45046           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");
   45047           0 :                 if (info_switch_1 == NULL) {
   45048           0 :                         return -1;
   45049             :                 }
   45050           0 :                 object->out.info = info_switch_1;
   45051             :         }
   45052           0 :         return 0;
   45053             : }
   45054             : 
   45055           0 : static PyObject *py_srvsvc_NetSrvGetInfo_get_result(PyObject *obj, void *closure)
   45056             : {
   45057           0 :         struct srvsvc_NetSrvGetInfo *object = pytalloc_get_ptr(obj);
   45058           0 :         PyObject *py_result;
   45059           0 :         py_result = PyErr_FromWERROR(object->out.result);
   45060           0 :         return py_result;
   45061             : }
   45062             : 
   45063           0 : static int py_srvsvc_NetSrvGetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   45064             : {
   45065           0 :         struct srvsvc_NetSrvGetInfo *object = pytalloc_get_ptr(py_obj);
   45066           0 :         if (value == NULL) {
   45067           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   45068           0 :                 return -1;
   45069             :         }
   45070           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   45071           0 :         return 0;
   45072             : }
   45073             : 
   45074             : static PyGetSetDef py_srvsvc_NetSrvGetInfo_getsetters[] = {
   45075             :         {
   45076             :                 .name = discard_const_p(char, "in_server_unc"),
   45077             :                 .get = py_srvsvc_NetSrvGetInfo_in_get_server_unc,
   45078             :                 .set = py_srvsvc_NetSrvGetInfo_in_set_server_unc,
   45079             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45080             :         },
   45081             :         {
   45082             :                 .name = discard_const_p(char, "in_level"),
   45083             :                 .get = py_srvsvc_NetSrvGetInfo_in_get_level,
   45084             :                 .set = py_srvsvc_NetSrvGetInfo_in_set_level,
   45085             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   45086             :         },
   45087             :         {
   45088             :                 .name = discard_const_p(char, "out_info"),
   45089             :                 .get = py_srvsvc_NetSrvGetInfo_out_get_info,
   45090             :                 .set = py_srvsvc_NetSrvGetInfo_out_set_info,
   45091             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSrvInfo")
   45092             :         },
   45093             :         {
   45094             :                 .name = discard_const_p(char, "result"),
   45095             :                 .get = py_srvsvc_NetSrvGetInfo_get_result,
   45096             :                 .set = py_srvsvc_NetSrvGetInfo_set_result,
   45097             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   45098             :         },
   45099             :         { .name = NULL }
   45100             : };
   45101             : 
   45102           0 : static PyObject *py_srvsvc_NetSrvGetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   45103             : {
   45104           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetSrvGetInfo, type);
   45105           0 :         struct srvsvc_NetSrvGetInfo *_self = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(self);
   45106           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   45107           0 :         _self->out.info = talloc_zero(mem_ctx, union srvsvc_NetSrvInfo);
   45108           0 :         return self;
   45109             : }
   45110             : 
   45111           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   45112             : {
   45113             : 
   45114             : 
   45115           0 :         return PyLong_FromLong(21);
   45116             : }
   45117             : 
   45118           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   45119             : {
   45120           0 :         const struct ndr_interface_call *call = NULL;
   45121           0 :         struct srvsvc_NetSrvGetInfo *object = pytalloc_get_ptr(py_obj);
   45122           0 :         PyObject *ret = NULL;
   45123           0 :         struct ndr_push *push = NULL;
   45124           0 :         DATA_BLOB blob;
   45125           0 :         enum ndr_err_code err;
   45126             : 
   45127           0 :         if (ndr_table_srvsvc.num_calls < 22) {
   45128           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSrvGetInfo_ndr_pack");
   45129           0 :                 return NULL;
   45130             :         }
   45131           0 :         call = &ndr_table_srvsvc.calls[21];
   45132             : 
   45133           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   45134           0 :         if (push == NULL) {
   45135           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45136           0 :                 return NULL;
   45137             :         }
   45138             : 
   45139           0 :         push->flags |= ndr_push_flags;
   45140             : 
   45141           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   45142           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45143           0 :                 TALLOC_FREE(push);
   45144           0 :                 PyErr_SetNdrError(err);
   45145           0 :                 return NULL;
   45146             :         }
   45147           0 :         blob = ndr_push_blob(push);
   45148           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   45149           0 :         TALLOC_FREE(push);
   45150           0 :         return ret;
   45151             : }
   45152             : 
   45153           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45154             : {
   45155           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45156           0 :         PyObject *bigendian_obj = NULL;
   45157           0 :         PyObject *ndr64_obj = NULL;
   45158           0 :         libndr_flags ndr_push_flags = 0;
   45159             : 
   45160           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   45161             :                 discard_const_p(char *, kwnames),
   45162             :                 &bigendian_obj,
   45163             :                 &ndr64_obj)) {
   45164           0 :                 return NULL;
   45165             :         }
   45166             : 
   45167           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45168           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45169             :         }
   45170           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45171           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45172             :         }
   45173             : 
   45174           0 :         return py_srvsvc_NetSrvGetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   45175             : }
   45176             : 
   45177           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45178             : {
   45179           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45180           0 :         PyObject *bigendian_obj = NULL;
   45181           0 :         PyObject *ndr64_obj = NULL;
   45182           0 :         libndr_flags ndr_push_flags = 0;
   45183             : 
   45184           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   45185             :                 discard_const_p(char *, kwnames),
   45186             :                 &bigendian_obj,
   45187             :                 &ndr64_obj)) {
   45188           0 :                 return NULL;
   45189             :         }
   45190             : 
   45191           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45192           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45193             :         }
   45194           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45195           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45196             :         }
   45197             : 
   45198           0 :         return py_srvsvc_NetSrvGetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   45199             : }
   45200             : 
   45201           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   45202             : {
   45203           0 :         const struct ndr_interface_call *call = NULL;
   45204           0 :         struct srvsvc_NetSrvGetInfo *object = pytalloc_get_ptr(py_obj);
   45205           0 :         struct ndr_pull *pull = NULL;
   45206           0 :         enum ndr_err_code err;
   45207             : 
   45208           0 :         if (ndr_table_srvsvc.num_calls < 22) {
   45209           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSrvGetInfo_ndr_unpack");
   45210           0 :                 return NULL;
   45211             :         }
   45212           0 :         call = &ndr_table_srvsvc.calls[21];
   45213             : 
   45214           0 :         pull = ndr_pull_init_blob(blob, object);
   45215           0 :         if (pull == NULL) {
   45216           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45217           0 :                 return NULL;
   45218             :         }
   45219             : 
   45220           0 :         pull->flags |= ndr_pull_flags;
   45221             : 
   45222           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   45223           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45224           0 :                 TALLOC_FREE(pull);
   45225           0 :                 PyErr_SetNdrError(err);
   45226           0 :                 return NULL;
   45227             :         }
   45228           0 :         if (!allow_remaining) {
   45229           0 :                 uint32_t highest_ofs;
   45230             : 
   45231           0 :                 if (pull->offset > pull->relative_highest_offset) {
   45232           0 :                         highest_ofs = pull->offset;
   45233             :                 } else {
   45234           0 :                         highest_ofs = pull->relative_highest_offset;
   45235             :                 }
   45236           0 :                 if (highest_ofs < pull->data_size) {
   45237           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   45238             :                                 "not all bytes consumed ofs[%u] size[%u]",
   45239             :                                 highest_ofs, pull->data_size);
   45240           0 :                         TALLOC_FREE(pull);
   45241           0 :                         PyErr_SetNdrError(err);
   45242           0 :                         return NULL;
   45243             :                 }
   45244             :         }
   45245             : 
   45246           0 :         TALLOC_FREE(pull);
   45247           0 :         Py_RETURN_NONE;
   45248             : }
   45249             : 
   45250           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45251             : {
   45252           0 :         DATA_BLOB blob;
   45253           0 :         Py_ssize_t blob_length = 0;
   45254           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   45255           0 :         PyObject *bigendian_obj = NULL;
   45256           0 :         PyObject *ndr64_obj = NULL;
   45257           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   45258           0 :         PyObject *allow_remaining_obj = NULL;
   45259           0 :         bool allow_remaining = false;
   45260             : 
   45261           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   45262             :                 discard_const_p(char *, kwnames),
   45263             :                 &blob.data, &blob_length,
   45264             :                 &bigendian_obj,
   45265             :                 &ndr64_obj,
   45266             :                 &allow_remaining_obj)) {
   45267           0 :                 return NULL;
   45268             :         }
   45269           0 :         blob.length = blob_length;
   45270             : 
   45271           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45272           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   45273             :         }
   45274           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45275           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   45276             :         }
   45277             : 
   45278           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   45279           0 :                 allow_remaining = true;
   45280             :         }
   45281             : 
   45282           0 :         return py_srvsvc_NetSrvGetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   45283             : }
   45284             : 
   45285           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45286             : {
   45287           0 :         DATA_BLOB blob;
   45288           0 :         Py_ssize_t blob_length = 0;
   45289           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   45290           0 :         PyObject *bigendian_obj = NULL;
   45291           0 :         PyObject *ndr64_obj = NULL;
   45292           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   45293           0 :         PyObject *allow_remaining_obj = NULL;
   45294           0 :         bool allow_remaining = false;
   45295             : 
   45296           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   45297             :                 discard_const_p(char *, kwnames),
   45298             :                 &blob.data, &blob_length,
   45299             :                 &bigendian_obj,
   45300             :                 &ndr64_obj,
   45301             :                 &allow_remaining_obj)) {
   45302           0 :                 return NULL;
   45303             :         }
   45304           0 :         blob.length = blob_length;
   45305             : 
   45306           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45307           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   45308             :         }
   45309           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45310           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   45311             :         }
   45312             : 
   45313           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   45314           0 :                 allow_remaining = true;
   45315             :         }
   45316             : 
   45317           0 :         return py_srvsvc_NetSrvGetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   45318             : }
   45319             : 
   45320           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   45321             : {
   45322           0 :         const struct ndr_interface_call *call = NULL;
   45323           0 :         struct srvsvc_NetSrvGetInfo *object = pytalloc_get_ptr(py_obj);
   45324           0 :         PyObject *ret;
   45325           0 :         char *retstr;
   45326             : 
   45327           0 :         if (ndr_table_srvsvc.num_calls < 22) {
   45328           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSrvGetInfo_ndr_print");
   45329           0 :                 return NULL;
   45330             :         }
   45331           0 :         call = &ndr_table_srvsvc.calls[21];
   45332             : 
   45333           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   45334           0 :         ret = PyUnicode_FromString(retstr);
   45335           0 :         TALLOC_FREE(retstr);
   45336             : 
   45337           0 :         return ret;
   45338             : }
   45339             : 
   45340           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   45341             : {
   45342           0 :         return py_srvsvc_NetSrvGetInfo_ndr_print(py_obj, "srvsvc_NetSrvGetInfo_in", NDR_IN);
   45343             : }
   45344             : 
   45345           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   45346             : {
   45347           0 :         return py_srvsvc_NetSrvGetInfo_ndr_print(py_obj, "srvsvc_NetSrvGetInfo_out", NDR_OUT);
   45348             : }
   45349             : 
   45350             : static PyMethodDef py_srvsvc_NetSrvGetInfo_methods[] = {
   45351             :         { "opnum", (PyCFunction)py_srvsvc_NetSrvGetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   45352             :                 "srvsvc.NetSrvGetInfo.opnum() -> 21 (0x15) " },
   45353             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvGetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   45354             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   45355             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvGetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   45356             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   45357             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvGetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   45358             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   45359             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvGetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   45360             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   45361             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetSrvGetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   45362             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetSrvGetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   45363             :         { NULL, NULL, 0, NULL }
   45364             : };
   45365             : 
   45366             : 
   45367             : static PyTypeObject srvsvc_NetSrvGetInfo_Type = {
   45368             :         PyVarObject_HEAD_INIT(NULL, 0)
   45369             :         .tp_name = "srvsvc.NetSrvGetInfo",
   45370             :         .tp_getset = py_srvsvc_NetSrvGetInfo_getsetters,
   45371             :         .tp_methods = py_srvsvc_NetSrvGetInfo_methods,
   45372             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   45373             :         .tp_new = py_srvsvc_NetSrvGetInfo_new,
   45374             : };
   45375             : 
   45376           1 : static bool pack_py_srvsvc_NetSrvGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSrvGetInfo *r)
   45377             : {
   45378           0 :         PyObject *py_server_unc;
   45379           0 :         PyObject *py_level;
   45380           1 :         const char *kwnames[] = {
   45381             :                 "server_unc", "level", NULL
   45382             :         };
   45383             : 
   45384           1 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:srvsvc_NetSrvGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_level)) {
   45385           0 :                 return false;
   45386             :         }
   45387             : 
   45388           1 :         if (py_server_unc == NULL) {
   45389           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   45390           0 :                 return false;
   45391             :         }
   45392           1 :         if (py_server_unc == Py_None) {
   45393           0 :                 r->in.server_unc = NULL;
   45394             :         } else {
   45395           1 :                 r->in.server_unc = NULL;
   45396             :                 {
   45397           0 :                         const char *test_str;
   45398           0 :                         const char *talloc_str;
   45399           1 :                         PyObject *unicode = NULL;
   45400           1 :                         if (PyUnicode_Check(py_server_unc)) {
   45401           1 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   45402           1 :                                 if (unicode == NULL) {
   45403           0 :                                         return false;
   45404             :                                 }
   45405           1 :                                 test_str = PyBytes_AS_STRING(unicode);
   45406           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   45407           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   45408             :                         } else {
   45409           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   45410           0 :                                 return false;
   45411             :                         }
   45412           1 :                         talloc_str = talloc_strdup(r, test_str);
   45413           1 :                         if (unicode != NULL) {
   45414           1 :                                 Py_DECREF(unicode);
   45415             :                         }
   45416           1 :                         if (talloc_str == NULL) {
   45417           0 :                                 PyErr_NoMemory();
   45418           0 :                                 return false;
   45419             :                         }
   45420           1 :                         r->in.server_unc = talloc_str;
   45421             :                 }
   45422             :         }
   45423           1 :         if (py_level == NULL) {
   45424           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   45425           0 :                 return false;
   45426             :         }
   45427             :         {
   45428           1 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   45429           1 :                 if (PyLong_Check(py_level)) {
   45430           0 :                         unsigned long long test_var;
   45431           1 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   45432           1 :                         if (PyErr_Occurred() != NULL) {
   45433           0 :                                 return false;
   45434             :                         }
   45435           1 :                         if (test_var > uint_max) {
   45436           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45437             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45438           0 :                                 return false;
   45439             :                         }
   45440           1 :                         r->in.level = test_var;
   45441             :                 } else {
   45442           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45443             :                           PyLong_Type.tp_name);
   45444           0 :                         return false;
   45445             :                 }
   45446             :         }
   45447           1 :         return true;
   45448             : }
   45449             : 
   45450           1 : static PyObject *unpack_py_srvsvc_NetSrvGetInfo_args_out(struct srvsvc_NetSrvGetInfo *r)
   45451             : {
   45452           0 :         PyObject *result;
   45453           0 :         PyObject *py_info;
   45454           1 :         py_info = pyrpc_import_union(&srvsvc_NetSrvInfo_Type, r->out.info, r->in.level, r->out.info, "union srvsvc_NetSrvInfo");
   45455           1 :         if (py_info == NULL) {
   45456           0 :                 return NULL;
   45457             :         }
   45458           1 :         result = py_info;
   45459           1 :         if (!W_ERROR_IS_OK(r->out.result)) {
   45460           0 :                 PyErr_SetWERROR(r->out.result);
   45461           0 :                 return NULL;
   45462             :         }
   45463             : 
   45464           1 :         return result;
   45465             : }
   45466             : 
   45467             : 
   45468           0 : static PyObject *py_srvsvc_NetSrvSetInfo_in_get_server_unc(PyObject *obj, void *closure)
   45469             : {
   45470           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(obj);
   45471           0 :         PyObject *py_server_unc;
   45472           0 :         if (object->in.server_unc == NULL) {
   45473           0 :                 Py_RETURN_NONE;
   45474             :         }
   45475           0 :         if (object->in.server_unc == NULL) {
   45476           0 :                 py_server_unc = Py_None;
   45477           0 :                 Py_INCREF(py_server_unc);
   45478             :         } else {
   45479           0 :                 if (object->in.server_unc == NULL) {
   45480           0 :                         py_server_unc = Py_None;
   45481           0 :                         Py_INCREF(py_server_unc);
   45482             :                 } else {
   45483           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   45484             :                 }
   45485             :         }
   45486           0 :         return py_server_unc;
   45487             : }
   45488             : 
   45489           0 : static int py_srvsvc_NetSrvSetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   45490             : {
   45491           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(py_obj);
   45492           0 :         if (value == NULL) {
   45493           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   45494           0 :                 return -1;
   45495             :         }
   45496           0 :         if (value == Py_None) {
   45497           0 :                 object->in.server_unc = NULL;
   45498             :         } else {
   45499           0 :                 object->in.server_unc = NULL;
   45500             :                 {
   45501           0 :                         const char *test_str;
   45502           0 :                         const char *talloc_str;
   45503           0 :                         PyObject *unicode = NULL;
   45504           0 :                         if (PyUnicode_Check(value)) {
   45505           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   45506           0 :                                 if (unicode == NULL) {
   45507           0 :                                         return -1;
   45508             :                                 }
   45509           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   45510           0 :                         } else if (PyBytes_Check(value)) {
   45511           0 :                                 test_str = PyBytes_AS_STRING(value);
   45512             :                         } else {
   45513           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   45514           0 :                                 return -1;
   45515             :                         }
   45516           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   45517           0 :                         if (unicode != NULL) {
   45518           0 :                                 Py_DECREF(unicode);
   45519             :                         }
   45520           0 :                         if (talloc_str == NULL) {
   45521           0 :                                 PyErr_NoMemory();
   45522           0 :                                 return -1;
   45523             :                         }
   45524           0 :                         object->in.server_unc = talloc_str;
   45525             :                 }
   45526             :         }
   45527           0 :         return 0;
   45528             : }
   45529             : 
   45530           0 : static PyObject *py_srvsvc_NetSrvSetInfo_in_get_level(PyObject *obj, void *closure)
   45531             : {
   45532           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(obj);
   45533           0 :         PyObject *py_level;
   45534           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   45535           0 :         return py_level;
   45536             : }
   45537             : 
   45538           0 : static int py_srvsvc_NetSrvSetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   45539             : {
   45540           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(py_obj);
   45541           0 :         if (value == NULL) {
   45542           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   45543           0 :                 return -1;
   45544             :         }
   45545             :         {
   45546           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   45547           0 :                 if (PyLong_Check(value)) {
   45548           0 :                         unsigned long long test_var;
   45549           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45550           0 :                         if (PyErr_Occurred() != NULL) {
   45551           0 :                                 return -1;
   45552             :                         }
   45553           0 :                         if (test_var > uint_max) {
   45554           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45555             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45556           0 :                                 return -1;
   45557             :                         }
   45558           0 :                         object->in.level = test_var;
   45559             :                 } else {
   45560           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45561             :                           PyLong_Type.tp_name);
   45562           0 :                         return -1;
   45563             :                 }
   45564             :         }
   45565           0 :         return 0;
   45566             : }
   45567             : 
   45568           0 : static PyObject *py_srvsvc_NetSrvSetInfo_in_get_info(PyObject *obj, void *closure)
   45569             : {
   45570           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(obj);
   45571           0 :         PyObject *py_info;
   45572           0 :         if (object->in.info == NULL) {
   45573           0 :                 Py_RETURN_NONE;
   45574             :         }
   45575           0 :         py_info = pyrpc_import_union(&srvsvc_NetSrvInfo_Type, object->in.info, object->in.level, object->in.info, "union srvsvc_NetSrvInfo");
   45576           0 :         if (py_info == NULL) {
   45577           0 :                 return NULL;
   45578             :         }
   45579           0 :         return py_info;
   45580             : }
   45581             : 
   45582           0 : static int py_srvsvc_NetSrvSetInfo_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   45583             : {
   45584           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(py_obj);
   45585           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
   45586           0 :         if (value == NULL) {
   45587           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info");
   45588           0 :                 return -1;
   45589             :         }
   45590           0 :         object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
   45591           0 :         if (object->in.info == NULL) {
   45592           0 :                 PyErr_NoMemory();
   45593           0 :                 return -1;
   45594             :         }
   45595             :         {
   45596           0 :                 union srvsvc_NetSrvInfo *info_switch_1;
   45597           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");
   45598           0 :                 if (info_switch_1 == NULL) {
   45599           0 :                         return -1;
   45600             :                 }
   45601           0 :                 object->in.info = info_switch_1;
   45602             :         }
   45603           0 :         return 0;
   45604             : }
   45605             : 
   45606           0 : static PyObject *py_srvsvc_NetSrvSetInfo_in_get_parm_error(PyObject *obj, void *closure)
   45607             : {
   45608           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(obj);
   45609           0 :         PyObject *py_parm_error;
   45610           0 :         if (object->in.parm_error == NULL) {
   45611           0 :                 Py_RETURN_NONE;
   45612             :         }
   45613           0 :         if (object->in.parm_error == NULL) {
   45614           0 :                 py_parm_error = Py_None;
   45615           0 :                 Py_INCREF(py_parm_error);
   45616             :         } else {
   45617           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.parm_error));
   45618             :         }
   45619           0 :         return py_parm_error;
   45620             : }
   45621             : 
   45622           0 : static int py_srvsvc_NetSrvSetInfo_in_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   45623             : {
   45624           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(py_obj);
   45625           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.parm_error));
   45626           0 :         if (value == NULL) {
   45627           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.parm_error");
   45628           0 :                 return -1;
   45629             :         }
   45630           0 :         if (value == Py_None) {
   45631           0 :                 object->in.parm_error = NULL;
   45632             :         } else {
   45633           0 :                 object->in.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.parm_error);
   45634           0 :                 if (object->in.parm_error == NULL) {
   45635           0 :                         PyErr_NoMemory();
   45636           0 :                         return -1;
   45637             :                 }
   45638             :                 {
   45639           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.parm_error));
   45640           0 :                         if (PyLong_Check(value)) {
   45641           0 :                                 unsigned long long test_var;
   45642           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   45643           0 :                                 if (PyErr_Occurred() != NULL) {
   45644           0 :                                         return -1;
   45645             :                                 }
   45646           0 :                                 if (test_var > uint_max) {
   45647           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45648             :                                           PyLong_Type.tp_name, uint_max, test_var);
   45649           0 :                                         return -1;
   45650             :                                 }
   45651           0 :                                 *object->in.parm_error = test_var;
   45652             :                         } else {
   45653           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   45654             :                                   PyLong_Type.tp_name);
   45655           0 :                                 return -1;
   45656             :                         }
   45657             :                 }
   45658             :         }
   45659           0 :         return 0;
   45660             : }
   45661             : 
   45662           0 : static PyObject *py_srvsvc_NetSrvSetInfo_out_get_parm_error(PyObject *obj, void *closure)
   45663             : {
   45664           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(obj);
   45665           0 :         PyObject *py_parm_error;
   45666           0 :         if (object->out.parm_error == NULL) {
   45667           0 :                 Py_RETURN_NONE;
   45668             :         }
   45669           0 :         if (object->out.parm_error == NULL) {
   45670           0 :                 py_parm_error = Py_None;
   45671           0 :                 Py_INCREF(py_parm_error);
   45672             :         } else {
   45673           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.parm_error));
   45674             :         }
   45675           0 :         return py_parm_error;
   45676             : }
   45677             : 
   45678           0 : static int py_srvsvc_NetSrvSetInfo_out_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   45679             : {
   45680           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(py_obj);
   45681           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.parm_error));
   45682           0 :         if (value == NULL) {
   45683           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.parm_error");
   45684           0 :                 return -1;
   45685             :         }
   45686           0 :         if (value == Py_None) {
   45687           0 :                 object->out.parm_error = NULL;
   45688             :         } else {
   45689           0 :                 object->out.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.parm_error);
   45690           0 :                 if (object->out.parm_error == NULL) {
   45691           0 :                         PyErr_NoMemory();
   45692           0 :                         return -1;
   45693             :                 }
   45694             :                 {
   45695           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.parm_error));
   45696           0 :                         if (PyLong_Check(value)) {
   45697           0 :                                 unsigned long long test_var;
   45698           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   45699           0 :                                 if (PyErr_Occurred() != NULL) {
   45700           0 :                                         return -1;
   45701             :                                 }
   45702           0 :                                 if (test_var > uint_max) {
   45703           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45704             :                                           PyLong_Type.tp_name, uint_max, test_var);
   45705           0 :                                         return -1;
   45706             :                                 }
   45707           0 :                                 *object->out.parm_error = test_var;
   45708             :                         } else {
   45709           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   45710             :                                   PyLong_Type.tp_name);
   45711           0 :                                 return -1;
   45712             :                         }
   45713             :                 }
   45714             :         }
   45715           0 :         return 0;
   45716             : }
   45717             : 
   45718           0 : static PyObject *py_srvsvc_NetSrvSetInfo_get_result(PyObject *obj, void *closure)
   45719             : {
   45720           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(obj);
   45721           0 :         PyObject *py_result;
   45722           0 :         py_result = PyErr_FromWERROR(object->out.result);
   45723           0 :         return py_result;
   45724             : }
   45725             : 
   45726           0 : static int py_srvsvc_NetSrvSetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   45727             : {
   45728           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(py_obj);
   45729           0 :         if (value == NULL) {
   45730           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   45731           0 :                 return -1;
   45732             :         }
   45733           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   45734           0 :         return 0;
   45735             : }
   45736             : 
   45737             : static PyGetSetDef py_srvsvc_NetSrvSetInfo_getsetters[] = {
   45738             :         {
   45739             :                 .name = discard_const_p(char, "in_server_unc"),
   45740             :                 .get = py_srvsvc_NetSrvSetInfo_in_get_server_unc,
   45741             :                 .set = py_srvsvc_NetSrvSetInfo_in_set_server_unc,
   45742             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45743             :         },
   45744             :         {
   45745             :                 .name = discard_const_p(char, "in_level"),
   45746             :                 .get = py_srvsvc_NetSrvSetInfo_in_get_level,
   45747             :                 .set = py_srvsvc_NetSrvSetInfo_in_set_level,
   45748             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   45749             :         },
   45750             :         {
   45751             :                 .name = discard_const_p(char, "in_info"),
   45752             :                 .get = py_srvsvc_NetSrvSetInfo_in_get_info,
   45753             :                 .set = py_srvsvc_NetSrvSetInfo_in_set_info,
   45754             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSrvInfo")
   45755             :         },
   45756             :         {
   45757             :                 .name = discard_const_p(char, "in_parm_error"),
   45758             :                 .get = py_srvsvc_NetSrvSetInfo_in_get_parm_error,
   45759             :                 .set = py_srvsvc_NetSrvSetInfo_in_set_parm_error,
   45760             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   45761             :         },
   45762             :         {
   45763             :                 .name = discard_const_p(char, "out_parm_error"),
   45764             :                 .get = py_srvsvc_NetSrvSetInfo_out_get_parm_error,
   45765             :                 .set = py_srvsvc_NetSrvSetInfo_out_set_parm_error,
   45766             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   45767             :         },
   45768             :         {
   45769             :                 .name = discard_const_p(char, "result"),
   45770             :                 .get = py_srvsvc_NetSrvSetInfo_get_result,
   45771             :                 .set = py_srvsvc_NetSrvSetInfo_set_result,
   45772             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   45773             :         },
   45774             :         { .name = NULL }
   45775             : };
   45776             : 
   45777           0 : static PyObject *py_srvsvc_NetSrvSetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   45778             : {
   45779           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetSrvSetInfo, type);
   45780           0 :         struct srvsvc_NetSrvSetInfo *_self = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(self);
   45781           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   45782           0 :         _self->in.info = talloc_zero(mem_ctx, union srvsvc_NetSrvInfo);
   45783           0 :         return self;
   45784             : }
   45785             : 
   45786           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   45787             : {
   45788             : 
   45789             : 
   45790           0 :         return PyLong_FromLong(22);
   45791             : }
   45792             : 
   45793           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   45794             : {
   45795           0 :         const struct ndr_interface_call *call = NULL;
   45796           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(py_obj);
   45797           0 :         PyObject *ret = NULL;
   45798           0 :         struct ndr_push *push = NULL;
   45799           0 :         DATA_BLOB blob;
   45800           0 :         enum ndr_err_code err;
   45801             : 
   45802           0 :         if (ndr_table_srvsvc.num_calls < 23) {
   45803           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSrvSetInfo_ndr_pack");
   45804           0 :                 return NULL;
   45805             :         }
   45806           0 :         call = &ndr_table_srvsvc.calls[22];
   45807             : 
   45808           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   45809           0 :         if (push == NULL) {
   45810           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45811           0 :                 return NULL;
   45812             :         }
   45813             : 
   45814           0 :         push->flags |= ndr_push_flags;
   45815             : 
   45816           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   45817           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45818           0 :                 TALLOC_FREE(push);
   45819           0 :                 PyErr_SetNdrError(err);
   45820           0 :                 return NULL;
   45821             :         }
   45822           0 :         blob = ndr_push_blob(push);
   45823           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   45824           0 :         TALLOC_FREE(push);
   45825           0 :         return ret;
   45826             : }
   45827             : 
   45828           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45829             : {
   45830           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45831           0 :         PyObject *bigendian_obj = NULL;
   45832           0 :         PyObject *ndr64_obj = NULL;
   45833           0 :         libndr_flags ndr_push_flags = 0;
   45834             : 
   45835           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   45836             :                 discard_const_p(char *, kwnames),
   45837             :                 &bigendian_obj,
   45838             :                 &ndr64_obj)) {
   45839           0 :                 return NULL;
   45840             :         }
   45841             : 
   45842           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45843           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45844             :         }
   45845           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45846           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45847             :         }
   45848             : 
   45849           0 :         return py_srvsvc_NetSrvSetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   45850             : }
   45851             : 
   45852           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45853             : {
   45854           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45855           0 :         PyObject *bigendian_obj = NULL;
   45856           0 :         PyObject *ndr64_obj = NULL;
   45857           0 :         libndr_flags ndr_push_flags = 0;
   45858             : 
   45859           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   45860             :                 discard_const_p(char *, kwnames),
   45861             :                 &bigendian_obj,
   45862             :                 &ndr64_obj)) {
   45863           0 :                 return NULL;
   45864             :         }
   45865             : 
   45866           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45867           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45868             :         }
   45869           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45870           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45871             :         }
   45872             : 
   45873           0 :         return py_srvsvc_NetSrvSetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   45874             : }
   45875             : 
   45876           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   45877             : {
   45878           0 :         const struct ndr_interface_call *call = NULL;
   45879           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(py_obj);
   45880           0 :         struct ndr_pull *pull = NULL;
   45881           0 :         enum ndr_err_code err;
   45882             : 
   45883           0 :         if (ndr_table_srvsvc.num_calls < 23) {
   45884           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSrvSetInfo_ndr_unpack");
   45885           0 :                 return NULL;
   45886             :         }
   45887           0 :         call = &ndr_table_srvsvc.calls[22];
   45888             : 
   45889           0 :         pull = ndr_pull_init_blob(blob, object);
   45890           0 :         if (pull == NULL) {
   45891           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45892           0 :                 return NULL;
   45893             :         }
   45894             : 
   45895           0 :         pull->flags |= ndr_pull_flags;
   45896             : 
   45897           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   45898           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45899           0 :                 TALLOC_FREE(pull);
   45900           0 :                 PyErr_SetNdrError(err);
   45901           0 :                 return NULL;
   45902             :         }
   45903           0 :         if (!allow_remaining) {
   45904           0 :                 uint32_t highest_ofs;
   45905             : 
   45906           0 :                 if (pull->offset > pull->relative_highest_offset) {
   45907           0 :                         highest_ofs = pull->offset;
   45908             :                 } else {
   45909           0 :                         highest_ofs = pull->relative_highest_offset;
   45910             :                 }
   45911           0 :                 if (highest_ofs < pull->data_size) {
   45912           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   45913             :                                 "not all bytes consumed ofs[%u] size[%u]",
   45914             :                                 highest_ofs, pull->data_size);
   45915           0 :                         TALLOC_FREE(pull);
   45916           0 :                         PyErr_SetNdrError(err);
   45917           0 :                         return NULL;
   45918             :                 }
   45919             :         }
   45920             : 
   45921           0 :         TALLOC_FREE(pull);
   45922           0 :         Py_RETURN_NONE;
   45923             : }
   45924             : 
   45925           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45926             : {
   45927           0 :         DATA_BLOB blob;
   45928           0 :         Py_ssize_t blob_length = 0;
   45929           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   45930           0 :         PyObject *bigendian_obj = NULL;
   45931           0 :         PyObject *ndr64_obj = NULL;
   45932           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   45933           0 :         PyObject *allow_remaining_obj = NULL;
   45934           0 :         bool allow_remaining = false;
   45935             : 
   45936           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   45937             :                 discard_const_p(char *, kwnames),
   45938             :                 &blob.data, &blob_length,
   45939             :                 &bigendian_obj,
   45940             :                 &ndr64_obj,
   45941             :                 &allow_remaining_obj)) {
   45942           0 :                 return NULL;
   45943             :         }
   45944           0 :         blob.length = blob_length;
   45945             : 
   45946           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45947           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   45948             :         }
   45949           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45950           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   45951             :         }
   45952             : 
   45953           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   45954           0 :                 allow_remaining = true;
   45955             :         }
   45956             : 
   45957           0 :         return py_srvsvc_NetSrvSetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   45958             : }
   45959             : 
   45960           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45961             : {
   45962           0 :         DATA_BLOB blob;
   45963           0 :         Py_ssize_t blob_length = 0;
   45964           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   45965           0 :         PyObject *bigendian_obj = NULL;
   45966           0 :         PyObject *ndr64_obj = NULL;
   45967           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   45968           0 :         PyObject *allow_remaining_obj = NULL;
   45969           0 :         bool allow_remaining = false;
   45970             : 
   45971           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   45972             :                 discard_const_p(char *, kwnames),
   45973             :                 &blob.data, &blob_length,
   45974             :                 &bigendian_obj,
   45975             :                 &ndr64_obj,
   45976             :                 &allow_remaining_obj)) {
   45977           0 :                 return NULL;
   45978             :         }
   45979           0 :         blob.length = blob_length;
   45980             : 
   45981           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45982           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   45983             :         }
   45984           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45985           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   45986             :         }
   45987             : 
   45988           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   45989           0 :                 allow_remaining = true;
   45990             :         }
   45991             : 
   45992           0 :         return py_srvsvc_NetSrvSetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   45993             : }
   45994             : 
   45995           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   45996             : {
   45997           0 :         const struct ndr_interface_call *call = NULL;
   45998           0 :         struct srvsvc_NetSrvSetInfo *object = pytalloc_get_ptr(py_obj);
   45999           0 :         PyObject *ret;
   46000           0 :         char *retstr;
   46001             : 
   46002           0 :         if (ndr_table_srvsvc.num_calls < 23) {
   46003           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSrvSetInfo_ndr_print");
   46004           0 :                 return NULL;
   46005             :         }
   46006           0 :         call = &ndr_table_srvsvc.calls[22];
   46007             : 
   46008           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   46009           0 :         ret = PyUnicode_FromString(retstr);
   46010           0 :         TALLOC_FREE(retstr);
   46011             : 
   46012           0 :         return ret;
   46013             : }
   46014             : 
   46015           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46016             : {
   46017           0 :         return py_srvsvc_NetSrvSetInfo_ndr_print(py_obj, "srvsvc_NetSrvSetInfo_in", NDR_IN);
   46018             : }
   46019             : 
   46020           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46021             : {
   46022           0 :         return py_srvsvc_NetSrvSetInfo_ndr_print(py_obj, "srvsvc_NetSrvSetInfo_out", NDR_OUT);
   46023             : }
   46024             : 
   46025             : static PyMethodDef py_srvsvc_NetSrvSetInfo_methods[] = {
   46026             :         { "opnum", (PyCFunction)py_srvsvc_NetSrvSetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   46027             :                 "srvsvc.NetSrvSetInfo.opnum() -> 22 (0x16) " },
   46028             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvSetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   46029             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   46030             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvSetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   46031             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   46032             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvSetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   46033             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   46034             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvSetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   46035             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   46036             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetSrvSetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   46037             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetSrvSetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   46038             :         { NULL, NULL, 0, NULL }
   46039             : };
   46040             : 
   46041             : 
   46042             : static PyTypeObject srvsvc_NetSrvSetInfo_Type = {
   46043             :         PyVarObject_HEAD_INIT(NULL, 0)
   46044             :         .tp_name = "srvsvc.NetSrvSetInfo",
   46045             :         .tp_getset = py_srvsvc_NetSrvSetInfo_getsetters,
   46046             :         .tp_methods = py_srvsvc_NetSrvSetInfo_methods,
   46047             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   46048             :         .tp_new = py_srvsvc_NetSrvSetInfo_new,
   46049             : };
   46050             : 
   46051           0 : static bool pack_py_srvsvc_NetSrvSetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSrvSetInfo *r)
   46052             : {
   46053           0 :         PyObject *py_server_unc;
   46054           0 :         PyObject *py_level;
   46055           0 :         PyObject *py_info;
   46056           0 :         PyObject *py_parm_error;
   46057           0 :         const char *kwnames[] = {
   46058             :                 "server_unc", "level", "info", "parm_error", NULL
   46059             :         };
   46060             : 
   46061           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetSrvSetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info, &py_parm_error)) {
   46062           0 :                 return false;
   46063             :         }
   46064             : 
   46065           0 :         if (py_server_unc == NULL) {
   46066           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   46067           0 :                 return false;
   46068             :         }
   46069           0 :         if (py_server_unc == Py_None) {
   46070           0 :                 r->in.server_unc = NULL;
   46071             :         } else {
   46072           0 :                 r->in.server_unc = NULL;
   46073             :                 {
   46074           0 :                         const char *test_str;
   46075           0 :                         const char *talloc_str;
   46076           0 :                         PyObject *unicode = NULL;
   46077           0 :                         if (PyUnicode_Check(py_server_unc)) {
   46078           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   46079           0 :                                 if (unicode == NULL) {
   46080           0 :                                         return false;
   46081             :                                 }
   46082           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46083           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   46084           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   46085             :                         } else {
   46086           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   46087           0 :                                 return false;
   46088             :                         }
   46089           0 :                         talloc_str = talloc_strdup(r, test_str);
   46090           0 :                         if (unicode != NULL) {
   46091           0 :                                 Py_DECREF(unicode);
   46092             :                         }
   46093           0 :                         if (talloc_str == NULL) {
   46094           0 :                                 PyErr_NoMemory();
   46095           0 :                                 return false;
   46096             :                         }
   46097           0 :                         r->in.server_unc = talloc_str;
   46098             :                 }
   46099             :         }
   46100           0 :         if (py_level == NULL) {
   46101           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   46102           0 :                 return false;
   46103             :         }
   46104             :         {
   46105           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   46106           0 :                 if (PyLong_Check(py_level)) {
   46107           0 :                         unsigned long long test_var;
   46108           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   46109           0 :                         if (PyErr_Occurred() != NULL) {
   46110           0 :                                 return false;
   46111             :                         }
   46112           0 :                         if (test_var > uint_max) {
   46113           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46114             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46115           0 :                                 return false;
   46116             :                         }
   46117           0 :                         r->in.level = test_var;
   46118             :                 } else {
   46119           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46120             :                           PyLong_Type.tp_name);
   46121           0 :                         return false;
   46122             :                 }
   46123             :         }
   46124           0 :         if (py_info == NULL) {
   46125           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info");
   46126           0 :                 return false;
   46127             :         }
   46128           0 :         r->in.info = talloc_ptrtype(r, r->in.info);
   46129           0 :         if (r->in.info == NULL) {
   46130           0 :                 PyErr_NoMemory();
   46131           0 :                 return false;
   46132             :         }
   46133             :         {
   46134           0 :                 union srvsvc_NetSrvInfo *info_switch_1;
   46135           0 :                 info_switch_1 = (union srvsvc_NetSrvInfo *)pyrpc_export_union(&srvsvc_NetSrvInfo_Type, r, r->in.level, py_info, "union srvsvc_NetSrvInfo");
   46136           0 :                 if (info_switch_1 == NULL) {
   46137           0 :                         return false;
   46138             :                 }
   46139           0 :                 r->in.info = info_switch_1;
   46140             :         }
   46141           0 :         if (py_parm_error == NULL) {
   46142           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.parm_error");
   46143           0 :                 return false;
   46144             :         }
   46145           0 :         if (py_parm_error == Py_None) {
   46146           0 :                 r->in.parm_error = NULL;
   46147             :         } else {
   46148           0 :                 r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
   46149           0 :                 if (r->in.parm_error == NULL) {
   46150           0 :                         PyErr_NoMemory();
   46151           0 :                         return false;
   46152             :                 }
   46153             :                 {
   46154           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
   46155           0 :                         if (PyLong_Check(py_parm_error)) {
   46156           0 :                                 unsigned long long test_var;
   46157           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_parm_error);
   46158           0 :                                 if (PyErr_Occurred() != NULL) {
   46159           0 :                                         return false;
   46160             :                                 }
   46161           0 :                                 if (test_var > uint_max) {
   46162           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46163             :                                           PyLong_Type.tp_name, uint_max, test_var);
   46164           0 :                                         return false;
   46165             :                                 }
   46166           0 :                                 *r->in.parm_error = test_var;
   46167             :                         } else {
   46168           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   46169             :                                   PyLong_Type.tp_name);
   46170           0 :                                 return false;
   46171             :                         }
   46172             :                 }
   46173             :         }
   46174           0 :         return true;
   46175             : }
   46176             : 
   46177           0 : static PyObject *unpack_py_srvsvc_NetSrvSetInfo_args_out(struct srvsvc_NetSrvSetInfo *r)
   46178             : {
   46179           0 :         PyObject *result;
   46180           0 :         PyObject *py_parm_error;
   46181           0 :         if (r->out.parm_error == NULL) {
   46182           0 :                 py_parm_error = Py_None;
   46183           0 :                 Py_INCREF(py_parm_error);
   46184             :         } else {
   46185           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.parm_error));
   46186             :         }
   46187           0 :         result = py_parm_error;
   46188           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   46189           0 :                 PyErr_SetWERROR(r->out.result);
   46190           0 :                 return NULL;
   46191             :         }
   46192             : 
   46193           0 :         return result;
   46194             : }
   46195             : 
   46196             : 
   46197           0 : static PyObject *py_srvsvc_NetDiskEnum_in_get_server_unc(PyObject *obj, void *closure)
   46198             : {
   46199           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(obj);
   46200           0 :         PyObject *py_server_unc;
   46201           0 :         if (object->in.server_unc == NULL) {
   46202           0 :                 Py_RETURN_NONE;
   46203             :         }
   46204           0 :         if (object->in.server_unc == NULL) {
   46205           0 :                 py_server_unc = Py_None;
   46206           0 :                 Py_INCREF(py_server_unc);
   46207             :         } else {
   46208           0 :                 if (object->in.server_unc == NULL) {
   46209           0 :                         py_server_unc = Py_None;
   46210           0 :                         Py_INCREF(py_server_unc);
   46211             :                 } else {
   46212           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   46213             :                 }
   46214             :         }
   46215           0 :         return py_server_unc;
   46216             : }
   46217             : 
   46218           0 : static int py_srvsvc_NetDiskEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   46219             : {
   46220           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(py_obj);
   46221           0 :         if (value == NULL) {
   46222           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   46223           0 :                 return -1;
   46224             :         }
   46225           0 :         if (value == Py_None) {
   46226           0 :                 object->in.server_unc = NULL;
   46227             :         } else {
   46228           0 :                 object->in.server_unc = NULL;
   46229             :                 {
   46230           0 :                         const char *test_str;
   46231           0 :                         const char *talloc_str;
   46232           0 :                         PyObject *unicode = NULL;
   46233           0 :                         if (PyUnicode_Check(value)) {
   46234           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46235           0 :                                 if (unicode == NULL) {
   46236           0 :                                         return -1;
   46237             :                                 }
   46238           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46239           0 :                         } else if (PyBytes_Check(value)) {
   46240           0 :                                 test_str = PyBytes_AS_STRING(value);
   46241             :                         } else {
   46242           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46243           0 :                                 return -1;
   46244             :                         }
   46245           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   46246           0 :                         if (unicode != NULL) {
   46247           0 :                                 Py_DECREF(unicode);
   46248             :                         }
   46249           0 :                         if (talloc_str == NULL) {
   46250           0 :                                 PyErr_NoMemory();
   46251           0 :                                 return -1;
   46252             :                         }
   46253           0 :                         object->in.server_unc = talloc_str;
   46254             :                 }
   46255             :         }
   46256           0 :         return 0;
   46257             : }
   46258             : 
   46259           0 : static PyObject *py_srvsvc_NetDiskEnum_in_get_level(PyObject *obj, void *closure)
   46260             : {
   46261           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(obj);
   46262           0 :         PyObject *py_level;
   46263           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   46264           0 :         return py_level;
   46265             : }
   46266             : 
   46267           0 : static int py_srvsvc_NetDiskEnum_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   46268             : {
   46269           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(py_obj);
   46270           0 :         if (value == NULL) {
   46271           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   46272           0 :                 return -1;
   46273             :         }
   46274             :         {
   46275           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   46276           0 :                 if (PyLong_Check(value)) {
   46277           0 :                         unsigned long long test_var;
   46278           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   46279           0 :                         if (PyErr_Occurred() != NULL) {
   46280           0 :                                 return -1;
   46281             :                         }
   46282           0 :                         if (test_var > uint_max) {
   46283           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46284             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46285           0 :                                 return -1;
   46286             :                         }
   46287           0 :                         object->in.level = test_var;
   46288             :                 } else {
   46289           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46290             :                           PyLong_Type.tp_name);
   46291           0 :                         return -1;
   46292             :                 }
   46293             :         }
   46294           0 :         return 0;
   46295             : }
   46296             : 
   46297           0 : static PyObject *py_srvsvc_NetDiskEnum_in_get_info(PyObject *obj, void *closure)
   46298             : {
   46299           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(obj);
   46300           0 :         PyObject *py_info;
   46301           0 :         if (object->in.info == NULL) {
   46302           0 :                 Py_RETURN_NONE;
   46303             :         }
   46304           0 :         py_info = pytalloc_reference_ex(&srvsvc_NetDiskInfo_Type, object->in.info, object->in.info);
   46305           0 :         return py_info;
   46306             : }
   46307             : 
   46308           0 : static int py_srvsvc_NetDiskEnum_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   46309             : {
   46310           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(py_obj);
   46311           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
   46312           0 :         if (value == NULL) {
   46313           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info");
   46314           0 :                 return -1;
   46315             :         }
   46316           0 :         object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
   46317           0 :         if (object->in.info == NULL) {
   46318           0 :                 PyErr_NoMemory();
   46319           0 :                 return -1;
   46320             :         }
   46321           0 :         PY_CHECK_TYPE(&srvsvc_NetDiskInfo_Type, value, return -1;);
   46322           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   46323           0 :                 PyErr_NoMemory();
   46324           0 :                 return -1;
   46325             :         }
   46326           0 :         object->in.info = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(value);
   46327           0 :         return 0;
   46328             : }
   46329             : 
   46330           0 : static PyObject *py_srvsvc_NetDiskEnum_out_get_info(PyObject *obj, void *closure)
   46331             : {
   46332           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(obj);
   46333           0 :         PyObject *py_info;
   46334           0 :         if (object->out.info == NULL) {
   46335           0 :                 Py_RETURN_NONE;
   46336             :         }
   46337           0 :         py_info = pytalloc_reference_ex(&srvsvc_NetDiskInfo_Type, object->out.info, object->out.info);
   46338           0 :         return py_info;
   46339             : }
   46340             : 
   46341           0 : static int py_srvsvc_NetDiskEnum_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   46342             : {
   46343           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(py_obj);
   46344           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   46345           0 :         if (value == NULL) {
   46346           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   46347           0 :                 return -1;
   46348             :         }
   46349           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   46350           0 :         if (object->out.info == NULL) {
   46351           0 :                 PyErr_NoMemory();
   46352           0 :                 return -1;
   46353             :         }
   46354           0 :         PY_CHECK_TYPE(&srvsvc_NetDiskInfo_Type, value, return -1;);
   46355           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   46356           0 :                 PyErr_NoMemory();
   46357           0 :                 return -1;
   46358             :         }
   46359           0 :         object->out.info = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(value);
   46360           0 :         return 0;
   46361             : }
   46362             : 
   46363           0 : static PyObject *py_srvsvc_NetDiskEnum_in_get_maxlen(PyObject *obj, void *closure)
   46364             : {
   46365           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(obj);
   46366           0 :         PyObject *py_maxlen;
   46367           0 :         py_maxlen = PyLong_FromUnsignedLongLong((uint32_t)(object->in.maxlen));
   46368           0 :         return py_maxlen;
   46369             : }
   46370             : 
   46371           0 : static int py_srvsvc_NetDiskEnum_in_set_maxlen(PyObject *py_obj, PyObject *value, void *closure)
   46372             : {
   46373           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(py_obj);
   46374           0 :         if (value == NULL) {
   46375           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.maxlen");
   46376           0 :                 return -1;
   46377             :         }
   46378             :         {
   46379           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.maxlen));
   46380           0 :                 if (PyLong_Check(value)) {
   46381           0 :                         unsigned long long test_var;
   46382           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   46383           0 :                         if (PyErr_Occurred() != NULL) {
   46384           0 :                                 return -1;
   46385             :                         }
   46386           0 :                         if (test_var > uint_max) {
   46387           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46388             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46389           0 :                                 return -1;
   46390             :                         }
   46391           0 :                         object->in.maxlen = test_var;
   46392             :                 } else {
   46393           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46394             :                           PyLong_Type.tp_name);
   46395           0 :                         return -1;
   46396             :                 }
   46397             :         }
   46398           0 :         return 0;
   46399             : }
   46400             : 
   46401           0 : static PyObject *py_srvsvc_NetDiskEnum_out_get_totalentries(PyObject *obj, void *closure)
   46402             : {
   46403           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(obj);
   46404           0 :         PyObject *py_totalentries;
   46405           0 :         if (object->out.totalentries == NULL) {
   46406           0 :                 Py_RETURN_NONE;
   46407             :         }
   46408           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.totalentries));
   46409           0 :         return py_totalentries;
   46410             : }
   46411             : 
   46412           0 : static int py_srvsvc_NetDiskEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   46413             : {
   46414           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(py_obj);
   46415           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   46416           0 :         if (value == NULL) {
   46417           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.totalentries");
   46418           0 :                 return -1;
   46419             :         }
   46420           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   46421           0 :         if (object->out.totalentries == NULL) {
   46422           0 :                 PyErr_NoMemory();
   46423           0 :                 return -1;
   46424             :         }
   46425             :         {
   46426           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   46427           0 :                 if (PyLong_Check(value)) {
   46428           0 :                         unsigned long long test_var;
   46429           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   46430           0 :                         if (PyErr_Occurred() != NULL) {
   46431           0 :                                 return -1;
   46432             :                         }
   46433           0 :                         if (test_var > uint_max) {
   46434           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46435             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46436           0 :                                 return -1;
   46437             :                         }
   46438           0 :                         *object->out.totalentries = test_var;
   46439             :                 } else {
   46440           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46441             :                           PyLong_Type.tp_name);
   46442           0 :                         return -1;
   46443             :                 }
   46444             :         }
   46445           0 :         return 0;
   46446             : }
   46447             : 
   46448           0 : static PyObject *py_srvsvc_NetDiskEnum_in_get_resume_handle(PyObject *obj, void *closure)
   46449             : {
   46450           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(obj);
   46451           0 :         PyObject *py_resume_handle;
   46452           0 :         if (object->in.resume_handle == NULL) {
   46453           0 :                 Py_RETURN_NONE;
   46454             :         }
   46455           0 :         if (object->in.resume_handle == NULL) {
   46456           0 :                 py_resume_handle = Py_None;
   46457           0 :                 Py_INCREF(py_resume_handle);
   46458             :         } else {
   46459           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.resume_handle));
   46460             :         }
   46461           0 :         return py_resume_handle;
   46462             : }
   46463             : 
   46464           0 : static int py_srvsvc_NetDiskEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   46465             : {
   46466           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(py_obj);
   46467           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   46468           0 :         if (value == NULL) {
   46469           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.resume_handle");
   46470           0 :                 return -1;
   46471             :         }
   46472           0 :         if (value == Py_None) {
   46473           0 :                 object->in.resume_handle = NULL;
   46474             :         } else {
   46475           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   46476           0 :                 if (object->in.resume_handle == NULL) {
   46477           0 :                         PyErr_NoMemory();
   46478           0 :                         return -1;
   46479             :                 }
   46480             :                 {
   46481           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   46482           0 :                         if (PyLong_Check(value)) {
   46483           0 :                                 unsigned long long test_var;
   46484           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   46485           0 :                                 if (PyErr_Occurred() != NULL) {
   46486           0 :                                         return -1;
   46487             :                                 }
   46488           0 :                                 if (test_var > uint_max) {
   46489           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46490             :                                           PyLong_Type.tp_name, uint_max, test_var);
   46491           0 :                                         return -1;
   46492             :                                 }
   46493           0 :                                 *object->in.resume_handle = test_var;
   46494             :                         } else {
   46495           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   46496             :                                   PyLong_Type.tp_name);
   46497           0 :                                 return -1;
   46498             :                         }
   46499             :                 }
   46500             :         }
   46501           0 :         return 0;
   46502             : }
   46503             : 
   46504           0 : static PyObject *py_srvsvc_NetDiskEnum_out_get_resume_handle(PyObject *obj, void *closure)
   46505             : {
   46506           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(obj);
   46507           0 :         PyObject *py_resume_handle;
   46508           0 :         if (object->out.resume_handle == NULL) {
   46509           0 :                 Py_RETURN_NONE;
   46510             :         }
   46511           0 :         if (object->out.resume_handle == NULL) {
   46512           0 :                 py_resume_handle = Py_None;
   46513           0 :                 Py_INCREF(py_resume_handle);
   46514             :         } else {
   46515           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.resume_handle));
   46516             :         }
   46517           0 :         return py_resume_handle;
   46518             : }
   46519             : 
   46520           0 : static int py_srvsvc_NetDiskEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   46521             : {
   46522           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(py_obj);
   46523           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   46524           0 :         if (value == NULL) {
   46525           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.resume_handle");
   46526           0 :                 return -1;
   46527             :         }
   46528           0 :         if (value == Py_None) {
   46529           0 :                 object->out.resume_handle = NULL;
   46530             :         } else {
   46531           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   46532           0 :                 if (object->out.resume_handle == NULL) {
   46533           0 :                         PyErr_NoMemory();
   46534           0 :                         return -1;
   46535             :                 }
   46536             :                 {
   46537           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   46538           0 :                         if (PyLong_Check(value)) {
   46539           0 :                                 unsigned long long test_var;
   46540           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   46541           0 :                                 if (PyErr_Occurred() != NULL) {
   46542           0 :                                         return -1;
   46543             :                                 }
   46544           0 :                                 if (test_var > uint_max) {
   46545           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46546             :                                           PyLong_Type.tp_name, uint_max, test_var);
   46547           0 :                                         return -1;
   46548             :                                 }
   46549           0 :                                 *object->out.resume_handle = test_var;
   46550             :                         } else {
   46551           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   46552             :                                   PyLong_Type.tp_name);
   46553           0 :                                 return -1;
   46554             :                         }
   46555             :                 }
   46556             :         }
   46557           0 :         return 0;
   46558             : }
   46559             : 
   46560           0 : static PyObject *py_srvsvc_NetDiskEnum_get_result(PyObject *obj, void *closure)
   46561             : {
   46562           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(obj);
   46563           0 :         PyObject *py_result;
   46564           0 :         py_result = PyErr_FromWERROR(object->out.result);
   46565           0 :         return py_result;
   46566             : }
   46567             : 
   46568           0 : static int py_srvsvc_NetDiskEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   46569             : {
   46570           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(py_obj);
   46571           0 :         if (value == NULL) {
   46572           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   46573           0 :                 return -1;
   46574             :         }
   46575           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   46576           0 :         return 0;
   46577             : }
   46578             : 
   46579             : static PyGetSetDef py_srvsvc_NetDiskEnum_getsetters[] = {
   46580             :         {
   46581             :                 .name = discard_const_p(char, "in_server_unc"),
   46582             :                 .get = py_srvsvc_NetDiskEnum_in_get_server_unc,
   46583             :                 .set = py_srvsvc_NetDiskEnum_in_set_server_unc,
   46584             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46585             :         },
   46586             :         {
   46587             :                 .name = discard_const_p(char, "in_level"),
   46588             :                 .get = py_srvsvc_NetDiskEnum_in_get_level,
   46589             :                 .set = py_srvsvc_NetDiskEnum_in_set_level,
   46590             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   46591             :         },
   46592             :         {
   46593             :                 .name = discard_const_p(char, "in_info"),
   46594             :                 .get = py_srvsvc_NetDiskEnum_in_get_info,
   46595             :                 .set = py_srvsvc_NetDiskEnum_in_set_info,
   46596             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetDiskInfo")
   46597             :         },
   46598             :         {
   46599             :                 .name = discard_const_p(char, "out_info"),
   46600             :                 .get = py_srvsvc_NetDiskEnum_out_get_info,
   46601             :                 .set = py_srvsvc_NetDiskEnum_out_set_info,
   46602             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetDiskInfo")
   46603             :         },
   46604             :         {
   46605             :                 .name = discard_const_p(char, "in_maxlen"),
   46606             :                 .get = py_srvsvc_NetDiskEnum_in_get_maxlen,
   46607             :                 .set = py_srvsvc_NetDiskEnum_in_set_maxlen,
   46608             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   46609             :         },
   46610             :         {
   46611             :                 .name = discard_const_p(char, "out_totalentries"),
   46612             :                 .get = py_srvsvc_NetDiskEnum_out_get_totalentries,
   46613             :                 .set = py_srvsvc_NetDiskEnum_out_set_totalentries,
   46614             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   46615             :         },
   46616             :         {
   46617             :                 .name = discard_const_p(char, "in_resume_handle"),
   46618             :                 .get = py_srvsvc_NetDiskEnum_in_get_resume_handle,
   46619             :                 .set = py_srvsvc_NetDiskEnum_in_set_resume_handle,
   46620             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   46621             :         },
   46622             :         {
   46623             :                 .name = discard_const_p(char, "out_resume_handle"),
   46624             :                 .get = py_srvsvc_NetDiskEnum_out_get_resume_handle,
   46625             :                 .set = py_srvsvc_NetDiskEnum_out_set_resume_handle,
   46626             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   46627             :         },
   46628             :         {
   46629             :                 .name = discard_const_p(char, "result"),
   46630             :                 .get = py_srvsvc_NetDiskEnum_get_result,
   46631             :                 .set = py_srvsvc_NetDiskEnum_set_result,
   46632             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   46633             :         },
   46634             :         { .name = NULL }
   46635             : };
   46636             : 
   46637           0 : static PyObject *py_srvsvc_NetDiskEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   46638             : {
   46639           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetDiskEnum, type);
   46640           0 :         struct srvsvc_NetDiskEnum *_self = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(self);
   46641           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   46642           0 :         _self->in.info = talloc_zero(mem_ctx, struct srvsvc_NetDiskInfo);
   46643           0 :         _self->out.info = talloc_zero(mem_ctx, struct srvsvc_NetDiskInfo);
   46644           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   46645           0 :         return self;
   46646             : }
   46647             : 
   46648           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   46649             : {
   46650             : 
   46651             : 
   46652           0 :         return PyLong_FromLong(23);
   46653             : }
   46654             : 
   46655           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   46656             : {
   46657           0 :         const struct ndr_interface_call *call = NULL;
   46658           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(py_obj);
   46659           0 :         PyObject *ret = NULL;
   46660           0 :         struct ndr_push *push = NULL;
   46661           0 :         DATA_BLOB blob;
   46662           0 :         enum ndr_err_code err;
   46663             : 
   46664           0 :         if (ndr_table_srvsvc.num_calls < 24) {
   46665           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetDiskEnum_ndr_pack");
   46666           0 :                 return NULL;
   46667             :         }
   46668           0 :         call = &ndr_table_srvsvc.calls[23];
   46669             : 
   46670           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   46671           0 :         if (push == NULL) {
   46672           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46673           0 :                 return NULL;
   46674             :         }
   46675             : 
   46676           0 :         push->flags |= ndr_push_flags;
   46677             : 
   46678           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   46679           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46680           0 :                 TALLOC_FREE(push);
   46681           0 :                 PyErr_SetNdrError(err);
   46682           0 :                 return NULL;
   46683             :         }
   46684           0 :         blob = ndr_push_blob(push);
   46685           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   46686           0 :         TALLOC_FREE(push);
   46687           0 :         return ret;
   46688             : }
   46689             : 
   46690           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46691             : {
   46692           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46693           0 :         PyObject *bigendian_obj = NULL;
   46694           0 :         PyObject *ndr64_obj = NULL;
   46695           0 :         libndr_flags ndr_push_flags = 0;
   46696             : 
   46697           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   46698             :                 discard_const_p(char *, kwnames),
   46699             :                 &bigendian_obj,
   46700             :                 &ndr64_obj)) {
   46701           0 :                 return NULL;
   46702             :         }
   46703             : 
   46704           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46705           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46706             :         }
   46707           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46708           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46709             :         }
   46710             : 
   46711           0 :         return py_srvsvc_NetDiskEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   46712             : }
   46713             : 
   46714           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46715             : {
   46716           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46717           0 :         PyObject *bigendian_obj = NULL;
   46718           0 :         PyObject *ndr64_obj = NULL;
   46719           0 :         libndr_flags ndr_push_flags = 0;
   46720             : 
   46721           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   46722             :                 discard_const_p(char *, kwnames),
   46723             :                 &bigendian_obj,
   46724             :                 &ndr64_obj)) {
   46725           0 :                 return NULL;
   46726             :         }
   46727             : 
   46728           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46729           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46730             :         }
   46731           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46732           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46733             :         }
   46734             : 
   46735           0 :         return py_srvsvc_NetDiskEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   46736             : }
   46737             : 
   46738           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   46739             : {
   46740           0 :         const struct ndr_interface_call *call = NULL;
   46741           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(py_obj);
   46742           0 :         struct ndr_pull *pull = NULL;
   46743           0 :         enum ndr_err_code err;
   46744             : 
   46745           0 :         if (ndr_table_srvsvc.num_calls < 24) {
   46746           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetDiskEnum_ndr_unpack");
   46747           0 :                 return NULL;
   46748             :         }
   46749           0 :         call = &ndr_table_srvsvc.calls[23];
   46750             : 
   46751           0 :         pull = ndr_pull_init_blob(blob, object);
   46752           0 :         if (pull == NULL) {
   46753           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46754           0 :                 return NULL;
   46755             :         }
   46756             : 
   46757           0 :         pull->flags |= ndr_pull_flags;
   46758             : 
   46759           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   46760           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46761           0 :                 TALLOC_FREE(pull);
   46762           0 :                 PyErr_SetNdrError(err);
   46763           0 :                 return NULL;
   46764             :         }
   46765           0 :         if (!allow_remaining) {
   46766           0 :                 uint32_t highest_ofs;
   46767             : 
   46768           0 :                 if (pull->offset > pull->relative_highest_offset) {
   46769           0 :                         highest_ofs = pull->offset;
   46770             :                 } else {
   46771           0 :                         highest_ofs = pull->relative_highest_offset;
   46772             :                 }
   46773           0 :                 if (highest_ofs < pull->data_size) {
   46774           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   46775             :                                 "not all bytes consumed ofs[%u] size[%u]",
   46776             :                                 highest_ofs, pull->data_size);
   46777           0 :                         TALLOC_FREE(pull);
   46778           0 :                         PyErr_SetNdrError(err);
   46779           0 :                         return NULL;
   46780             :                 }
   46781             :         }
   46782             : 
   46783           0 :         TALLOC_FREE(pull);
   46784           0 :         Py_RETURN_NONE;
   46785             : }
   46786             : 
   46787           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46788             : {
   46789           0 :         DATA_BLOB blob;
   46790           0 :         Py_ssize_t blob_length = 0;
   46791           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46792           0 :         PyObject *bigendian_obj = NULL;
   46793           0 :         PyObject *ndr64_obj = NULL;
   46794           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46795           0 :         PyObject *allow_remaining_obj = NULL;
   46796           0 :         bool allow_remaining = false;
   46797             : 
   46798           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   46799             :                 discard_const_p(char *, kwnames),
   46800             :                 &blob.data, &blob_length,
   46801             :                 &bigendian_obj,
   46802             :                 &ndr64_obj,
   46803             :                 &allow_remaining_obj)) {
   46804           0 :                 return NULL;
   46805             :         }
   46806           0 :         blob.length = blob_length;
   46807             : 
   46808           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46809           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46810             :         }
   46811           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46812           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46813             :         }
   46814             : 
   46815           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46816           0 :                 allow_remaining = true;
   46817             :         }
   46818             : 
   46819           0 :         return py_srvsvc_NetDiskEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   46820             : }
   46821             : 
   46822           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46823             : {
   46824           0 :         DATA_BLOB blob;
   46825           0 :         Py_ssize_t blob_length = 0;
   46826           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46827           0 :         PyObject *bigendian_obj = NULL;
   46828           0 :         PyObject *ndr64_obj = NULL;
   46829           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46830           0 :         PyObject *allow_remaining_obj = NULL;
   46831           0 :         bool allow_remaining = false;
   46832             : 
   46833           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   46834             :                 discard_const_p(char *, kwnames),
   46835             :                 &blob.data, &blob_length,
   46836             :                 &bigendian_obj,
   46837             :                 &ndr64_obj,
   46838             :                 &allow_remaining_obj)) {
   46839           0 :                 return NULL;
   46840             :         }
   46841           0 :         blob.length = blob_length;
   46842             : 
   46843           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46844           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46845             :         }
   46846           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46847           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46848             :         }
   46849             : 
   46850           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46851           0 :                 allow_remaining = true;
   46852             :         }
   46853             : 
   46854           0 :         return py_srvsvc_NetDiskEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   46855             : }
   46856             : 
   46857           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   46858             : {
   46859           0 :         const struct ndr_interface_call *call = NULL;
   46860           0 :         struct srvsvc_NetDiskEnum *object = pytalloc_get_ptr(py_obj);
   46861           0 :         PyObject *ret;
   46862           0 :         char *retstr;
   46863             : 
   46864           0 :         if (ndr_table_srvsvc.num_calls < 24) {
   46865           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetDiskEnum_ndr_print");
   46866           0 :                 return NULL;
   46867             :         }
   46868           0 :         call = &ndr_table_srvsvc.calls[23];
   46869             : 
   46870           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   46871           0 :         ret = PyUnicode_FromString(retstr);
   46872           0 :         TALLOC_FREE(retstr);
   46873             : 
   46874           0 :         return ret;
   46875             : }
   46876             : 
   46877           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46878             : {
   46879           0 :         return py_srvsvc_NetDiskEnum_ndr_print(py_obj, "srvsvc_NetDiskEnum_in", NDR_IN);
   46880             : }
   46881             : 
   46882           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46883             : {
   46884           0 :         return py_srvsvc_NetDiskEnum_ndr_print(py_obj, "srvsvc_NetDiskEnum_out", NDR_OUT);
   46885             : }
   46886             : 
   46887             : static PyMethodDef py_srvsvc_NetDiskEnum_methods[] = {
   46888             :         { "opnum", (PyCFunction)py_srvsvc_NetDiskEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   46889             :                 "srvsvc.NetDiskEnum.opnum() -> 23 (0x17) " },
   46890             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetDiskEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   46891             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   46892             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetDiskEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   46893             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   46894             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetDiskEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   46895             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   46896             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetDiskEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   46897             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   46898             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetDiskEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   46899             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetDiskEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   46900             :         { NULL, NULL, 0, NULL }
   46901             : };
   46902             : 
   46903             : 
   46904             : static PyTypeObject srvsvc_NetDiskEnum_Type = {
   46905             :         PyVarObject_HEAD_INIT(NULL, 0)
   46906             :         .tp_name = "srvsvc.NetDiskEnum",
   46907             :         .tp_getset = py_srvsvc_NetDiskEnum_getsetters,
   46908             :         .tp_methods = py_srvsvc_NetDiskEnum_methods,
   46909             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   46910             :         .tp_new = py_srvsvc_NetDiskEnum_new,
   46911             : };
   46912             : 
   46913           0 : static bool pack_py_srvsvc_NetDiskEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetDiskEnum *r)
   46914             : {
   46915           0 :         PyObject *py_server_unc;
   46916           0 :         PyObject *py_level;
   46917           0 :         PyObject *py_info;
   46918           0 :         PyObject *py_maxlen;
   46919           0 :         PyObject *py_resume_handle;
   46920           0 :         const char *kwnames[] = {
   46921             :                 "server_unc", "level", "info", "maxlen", "resume_handle", NULL
   46922             :         };
   46923             : 
   46924           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)) {
   46925           0 :                 return false;
   46926             :         }
   46927             : 
   46928           0 :         if (py_server_unc == NULL) {
   46929           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   46930           0 :                 return false;
   46931             :         }
   46932           0 :         if (py_server_unc == Py_None) {
   46933           0 :                 r->in.server_unc = NULL;
   46934             :         } else {
   46935           0 :                 r->in.server_unc = NULL;
   46936             :                 {
   46937           0 :                         const char *test_str;
   46938           0 :                         const char *talloc_str;
   46939           0 :                         PyObject *unicode = NULL;
   46940           0 :                         if (PyUnicode_Check(py_server_unc)) {
   46941           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   46942           0 :                                 if (unicode == NULL) {
   46943           0 :                                         return false;
   46944             :                                 }
   46945           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46946           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   46947           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   46948             :                         } else {
   46949           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   46950           0 :                                 return false;
   46951             :                         }
   46952           0 :                         talloc_str = talloc_strdup(r, test_str);
   46953           0 :                         if (unicode != NULL) {
   46954           0 :                                 Py_DECREF(unicode);
   46955             :                         }
   46956           0 :                         if (talloc_str == NULL) {
   46957           0 :                                 PyErr_NoMemory();
   46958           0 :                                 return false;
   46959             :                         }
   46960           0 :                         r->in.server_unc = talloc_str;
   46961             :                 }
   46962             :         }
   46963           0 :         if (py_level == NULL) {
   46964           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   46965           0 :                 return false;
   46966             :         }
   46967             :         {
   46968           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   46969           0 :                 if (PyLong_Check(py_level)) {
   46970           0 :                         unsigned long long test_var;
   46971           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   46972           0 :                         if (PyErr_Occurred() != NULL) {
   46973           0 :                                 return false;
   46974             :                         }
   46975           0 :                         if (test_var > uint_max) {
   46976           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46977             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46978           0 :                                 return false;
   46979             :                         }
   46980           0 :                         r->in.level = test_var;
   46981             :                 } else {
   46982           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46983             :                           PyLong_Type.tp_name);
   46984           0 :                         return false;
   46985             :                 }
   46986             :         }
   46987           0 :         if (py_info == NULL) {
   46988           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info");
   46989           0 :                 return false;
   46990             :         }
   46991           0 :         r->in.info = talloc_ptrtype(r, r->in.info);
   46992           0 :         if (r->in.info == NULL) {
   46993           0 :                 PyErr_NoMemory();
   46994           0 :                 return false;
   46995             :         }
   46996           0 :         PY_CHECK_TYPE(&srvsvc_NetDiskInfo_Type, py_info, return false;);
   46997           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info)) == NULL) {
   46998           0 :                 PyErr_NoMemory();
   46999           0 :                 return false;
   47000             :         }
   47001           0 :         r->in.info = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(py_info);
   47002           0 :         if (py_maxlen == NULL) {
   47003           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.maxlen");
   47004           0 :                 return false;
   47005             :         }
   47006             :         {
   47007           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.maxlen));
   47008           0 :                 if (PyLong_Check(py_maxlen)) {
   47009           0 :                         unsigned long long test_var;
   47010           0 :                         test_var = PyLong_AsUnsignedLongLong(py_maxlen);
   47011           0 :                         if (PyErr_Occurred() != NULL) {
   47012           0 :                                 return false;
   47013             :                         }
   47014           0 :                         if (test_var > uint_max) {
   47015           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47016             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47017           0 :                                 return false;
   47018             :                         }
   47019           0 :                         r->in.maxlen = test_var;
   47020             :                 } else {
   47021           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47022             :                           PyLong_Type.tp_name);
   47023           0 :                         return false;
   47024             :                 }
   47025             :         }
   47026           0 :         if (py_resume_handle == NULL) {
   47027           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.resume_handle");
   47028           0 :                 return false;
   47029             :         }
   47030           0 :         if (py_resume_handle == Py_None) {
   47031           0 :                 r->in.resume_handle = NULL;
   47032             :         } else {
   47033           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   47034           0 :                 if (r->in.resume_handle == NULL) {
   47035           0 :                         PyErr_NoMemory();
   47036           0 :                         return false;
   47037             :                 }
   47038             :                 {
   47039           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   47040           0 :                         if (PyLong_Check(py_resume_handle)) {
   47041           0 :                                 unsigned long long test_var;
   47042           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   47043           0 :                                 if (PyErr_Occurred() != NULL) {
   47044           0 :                                         return false;
   47045             :                                 }
   47046           0 :                                 if (test_var > uint_max) {
   47047           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47048             :                                           PyLong_Type.tp_name, uint_max, test_var);
   47049           0 :                                         return false;
   47050             :                                 }
   47051           0 :                                 *r->in.resume_handle = test_var;
   47052             :                         } else {
   47053           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   47054             :                                   PyLong_Type.tp_name);
   47055           0 :                                 return false;
   47056             :                         }
   47057             :                 }
   47058             :         }
   47059           0 :         return true;
   47060             : }
   47061             : 
   47062           0 : static PyObject *unpack_py_srvsvc_NetDiskEnum_args_out(struct srvsvc_NetDiskEnum *r)
   47063             : {
   47064           0 :         PyObject *result;
   47065           0 :         PyObject *py_info;
   47066           0 :         PyObject *py_totalentries;
   47067           0 :         PyObject *py_resume_handle;
   47068           0 :         result = PyTuple_New(3);
   47069           0 :         py_info = pytalloc_reference_ex(&srvsvc_NetDiskInfo_Type, r->out.info, r->out.info);
   47070           0 :         PyTuple_SetItem(result, 0, py_info);
   47071           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.totalentries));
   47072           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   47073           0 :         if (r->out.resume_handle == NULL) {
   47074           0 :                 py_resume_handle = Py_None;
   47075           0 :                 Py_INCREF(py_resume_handle);
   47076             :         } else {
   47077           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.resume_handle));
   47078             :         }
   47079           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   47080           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   47081           0 :                 PyErr_SetWERROR(r->out.result);
   47082           0 :                 return NULL;
   47083             :         }
   47084             : 
   47085           0 :         return result;
   47086             : }
   47087             : 
   47088             : 
   47089           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_in_get_server_unc(PyObject *obj, void *closure)
   47090             : {
   47091           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(obj);
   47092           0 :         PyObject *py_server_unc;
   47093           0 :         if (object->in.server_unc == NULL) {
   47094           0 :                 Py_RETURN_NONE;
   47095             :         }
   47096           0 :         if (object->in.server_unc == NULL) {
   47097           0 :                 py_server_unc = Py_None;
   47098           0 :                 Py_INCREF(py_server_unc);
   47099             :         } else {
   47100           0 :                 if (object->in.server_unc == NULL) {
   47101           0 :                         py_server_unc = Py_None;
   47102           0 :                         Py_INCREF(py_server_unc);
   47103             :                 } else {
   47104           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   47105             :                 }
   47106             :         }
   47107           0 :         return py_server_unc;
   47108             : }
   47109             : 
   47110           0 : static int py_srvsvc_NetServerStatisticsGet_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   47111             : {
   47112           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(py_obj);
   47113           0 :         if (value == NULL) {
   47114           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   47115           0 :                 return -1;
   47116             :         }
   47117           0 :         if (value == Py_None) {
   47118           0 :                 object->in.server_unc = NULL;
   47119             :         } else {
   47120           0 :                 object->in.server_unc = NULL;
   47121             :                 {
   47122           0 :                         const char *test_str;
   47123           0 :                         const char *talloc_str;
   47124           0 :                         PyObject *unicode = NULL;
   47125           0 :                         if (PyUnicode_Check(value)) {
   47126           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   47127           0 :                                 if (unicode == NULL) {
   47128           0 :                                         return -1;
   47129             :                                 }
   47130           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47131           0 :                         } else if (PyBytes_Check(value)) {
   47132           0 :                                 test_str = PyBytes_AS_STRING(value);
   47133             :                         } else {
   47134           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   47135           0 :                                 return -1;
   47136             :                         }
   47137           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47138           0 :                         if (unicode != NULL) {
   47139           0 :                                 Py_DECREF(unicode);
   47140             :                         }
   47141           0 :                         if (talloc_str == NULL) {
   47142           0 :                                 PyErr_NoMemory();
   47143           0 :                                 return -1;
   47144             :                         }
   47145           0 :                         object->in.server_unc = talloc_str;
   47146             :                 }
   47147             :         }
   47148           0 :         return 0;
   47149             : }
   47150             : 
   47151           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_in_get_service(PyObject *obj, void *closure)
   47152             : {
   47153           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(obj);
   47154           0 :         PyObject *py_service;
   47155           0 :         if (object->in.service == NULL) {
   47156           0 :                 Py_RETURN_NONE;
   47157             :         }
   47158           0 :         if (object->in.service == NULL) {
   47159           0 :                 py_service = Py_None;
   47160           0 :                 Py_INCREF(py_service);
   47161             :         } else {
   47162           0 :                 if (object->in.service == NULL) {
   47163           0 :                         py_service = Py_None;
   47164           0 :                         Py_INCREF(py_service);
   47165             :                 } else {
   47166           0 :                         py_service = PyUnicode_Decode(object->in.service, strlen(object->in.service), "utf-8", "ignore");
   47167             :                 }
   47168             :         }
   47169           0 :         return py_service;
   47170             : }
   47171             : 
   47172           0 : static int py_srvsvc_NetServerStatisticsGet_in_set_service(PyObject *py_obj, PyObject *value, void *closure)
   47173             : {
   47174           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(py_obj);
   47175           0 :         if (value == NULL) {
   47176           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.service");
   47177           0 :                 return -1;
   47178             :         }
   47179           0 :         if (value == Py_None) {
   47180           0 :                 object->in.service = NULL;
   47181             :         } else {
   47182           0 :                 object->in.service = NULL;
   47183             :                 {
   47184           0 :                         const char *test_str;
   47185           0 :                         const char *talloc_str;
   47186           0 :                         PyObject *unicode = NULL;
   47187           0 :                         if (PyUnicode_Check(value)) {
   47188           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   47189           0 :                                 if (unicode == NULL) {
   47190           0 :                                         return -1;
   47191             :                                 }
   47192           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47193           0 :                         } else if (PyBytes_Check(value)) {
   47194           0 :                                 test_str = PyBytes_AS_STRING(value);
   47195             :                         } else {
   47196           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   47197           0 :                                 return -1;
   47198             :                         }
   47199           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47200           0 :                         if (unicode != NULL) {
   47201           0 :                                 Py_DECREF(unicode);
   47202             :                         }
   47203           0 :                         if (talloc_str == NULL) {
   47204           0 :                                 PyErr_NoMemory();
   47205           0 :                                 return -1;
   47206             :                         }
   47207           0 :                         object->in.service = talloc_str;
   47208             :                 }
   47209             :         }
   47210           0 :         return 0;
   47211             : }
   47212             : 
   47213           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_in_get_level(PyObject *obj, void *closure)
   47214             : {
   47215           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(obj);
   47216           0 :         PyObject *py_level;
   47217           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   47218           0 :         return py_level;
   47219             : }
   47220             : 
   47221           0 : static int py_srvsvc_NetServerStatisticsGet_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   47222             : {
   47223           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(py_obj);
   47224           0 :         if (value == NULL) {
   47225           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   47226           0 :                 return -1;
   47227             :         }
   47228             :         {
   47229           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   47230           0 :                 if (PyLong_Check(value)) {
   47231           0 :                         unsigned long long test_var;
   47232           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   47233           0 :                         if (PyErr_Occurred() != NULL) {
   47234           0 :                                 return -1;
   47235             :                         }
   47236           0 :                         if (test_var > uint_max) {
   47237           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47238             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47239           0 :                                 return -1;
   47240             :                         }
   47241           0 :                         object->in.level = test_var;
   47242             :                 } else {
   47243           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47244             :                           PyLong_Type.tp_name);
   47245           0 :                         return -1;
   47246             :                 }
   47247             :         }
   47248           0 :         return 0;
   47249             : }
   47250             : 
   47251           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_in_get_options(PyObject *obj, void *closure)
   47252             : {
   47253           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(obj);
   47254           0 :         PyObject *py_options;
   47255           0 :         py_options = PyLong_FromUnsignedLongLong((uint32_t)(object->in.options));
   47256           0 :         return py_options;
   47257             : }
   47258             : 
   47259           0 : static int py_srvsvc_NetServerStatisticsGet_in_set_options(PyObject *py_obj, PyObject *value, void *closure)
   47260             : {
   47261           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(py_obj);
   47262           0 :         if (value == NULL) {
   47263           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.options");
   47264           0 :                 return -1;
   47265             :         }
   47266             :         {
   47267           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.options));
   47268           0 :                 if (PyLong_Check(value)) {
   47269           0 :                         unsigned long long test_var;
   47270           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   47271           0 :                         if (PyErr_Occurred() != NULL) {
   47272           0 :                                 return -1;
   47273             :                         }
   47274           0 :                         if (test_var > uint_max) {
   47275           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47276             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47277           0 :                                 return -1;
   47278             :                         }
   47279           0 :                         object->in.options = test_var;
   47280             :                 } else {
   47281           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47282             :                           PyLong_Type.tp_name);
   47283           0 :                         return -1;
   47284             :                 }
   47285             :         }
   47286           0 :         return 0;
   47287             : }
   47288             : 
   47289           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_out_get_stats(PyObject *obj, void *closure)
   47290             : {
   47291           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(obj);
   47292           0 :         PyObject *py_stats;
   47293           0 :         if (object->out.stats == NULL) {
   47294           0 :                 Py_RETURN_NONE;
   47295             :         }
   47296           0 :         if (*object->out.stats == NULL) {
   47297           0 :                 py_stats = Py_None;
   47298           0 :                 Py_INCREF(py_stats);
   47299             :         } else {
   47300           0 :                 py_stats = pytalloc_reference_ex(&srvsvc_Statistics_Type, *object->out.stats, *object->out.stats);
   47301             :         }
   47302           0 :         return py_stats;
   47303             : }
   47304             : 
   47305           0 : static int py_srvsvc_NetServerStatisticsGet_out_set_stats(PyObject *py_obj, PyObject *value, void *closure)
   47306             : {
   47307           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(py_obj);
   47308           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.stats));
   47309           0 :         if (value == NULL) {
   47310           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.stats");
   47311           0 :                 return -1;
   47312             :         }
   47313           0 :         object->out.stats = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.stats);
   47314           0 :         if (object->out.stats == NULL) {
   47315           0 :                 PyErr_NoMemory();
   47316           0 :                 return -1;
   47317             :         }
   47318           0 :         if (value == Py_None) {
   47319           0 :                 *object->out.stats = NULL;
   47320             :         } else {
   47321           0 :                 *object->out.stats = NULL;
   47322           0 :                 PY_CHECK_TYPE(&srvsvc_Statistics_Type, value, return -1;);
   47323           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   47324           0 :                         PyErr_NoMemory();
   47325           0 :                         return -1;
   47326             :                 }
   47327           0 :                 *object->out.stats = (struct srvsvc_Statistics *)pytalloc_get_ptr(value);
   47328             :         }
   47329           0 :         return 0;
   47330             : }
   47331             : 
   47332           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_get_result(PyObject *obj, void *closure)
   47333             : {
   47334           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(obj);
   47335           0 :         PyObject *py_result;
   47336           0 :         py_result = PyErr_FromWERROR(object->out.result);
   47337           0 :         return py_result;
   47338             : }
   47339             : 
   47340           0 : static int py_srvsvc_NetServerStatisticsGet_set_result(PyObject *py_obj, PyObject *value, void *closure)
   47341             : {
   47342           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(py_obj);
   47343           0 :         if (value == NULL) {
   47344           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   47345           0 :                 return -1;
   47346             :         }
   47347           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   47348           0 :         return 0;
   47349             : }
   47350             : 
   47351             : static PyGetSetDef py_srvsvc_NetServerStatisticsGet_getsetters[] = {
   47352             :         {
   47353             :                 .name = discard_const_p(char, "in_server_unc"),
   47354             :                 .get = py_srvsvc_NetServerStatisticsGet_in_get_server_unc,
   47355             :                 .set = py_srvsvc_NetServerStatisticsGet_in_set_server_unc,
   47356             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47357             :         },
   47358             :         {
   47359             :                 .name = discard_const_p(char, "in_service"),
   47360             :                 .get = py_srvsvc_NetServerStatisticsGet_in_get_service,
   47361             :                 .set = py_srvsvc_NetServerStatisticsGet_in_set_service,
   47362             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47363             :         },
   47364             :         {
   47365             :                 .name = discard_const_p(char, "in_level"),
   47366             :                 .get = py_srvsvc_NetServerStatisticsGet_in_get_level,
   47367             :                 .set = py_srvsvc_NetServerStatisticsGet_in_set_level,
   47368             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   47369             :         },
   47370             :         {
   47371             :                 .name = discard_const_p(char, "in_options"),
   47372             :                 .get = py_srvsvc_NetServerStatisticsGet_in_get_options,
   47373             :                 .set = py_srvsvc_NetServerStatisticsGet_in_set_options,
   47374             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   47375             :         },
   47376             :         {
   47377             :                 .name = discard_const_p(char, "out_stats"),
   47378             :                 .get = py_srvsvc_NetServerStatisticsGet_out_get_stats,
   47379             :                 .set = py_srvsvc_NetServerStatisticsGet_out_set_stats,
   47380             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_Statistics")
   47381             :         },
   47382             :         {
   47383             :                 .name = discard_const_p(char, "result"),
   47384             :                 .get = py_srvsvc_NetServerStatisticsGet_get_result,
   47385             :                 .set = py_srvsvc_NetServerStatisticsGet_set_result,
   47386             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   47387             :         },
   47388             :         { .name = NULL }
   47389             : };
   47390             : 
   47391           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   47392             : {
   47393           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetServerStatisticsGet, type);
   47394           0 :         struct srvsvc_NetServerStatisticsGet *_self = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(self);
   47395           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   47396             :         /* a pointer to a NULL pointer */
   47397           0 :         _self->out.stats = talloc_zero(mem_ctx, struct srvsvc_Statistics *);
   47398           0 :         return self;
   47399             : }
   47400             : 
   47401           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   47402             : {
   47403             : 
   47404             : 
   47405           0 :         return PyLong_FromLong(24);
   47406             : }
   47407             : 
   47408           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   47409             : {
   47410           0 :         const struct ndr_interface_call *call = NULL;
   47411           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(py_obj);
   47412           0 :         PyObject *ret = NULL;
   47413           0 :         struct ndr_push *push = NULL;
   47414           0 :         DATA_BLOB blob;
   47415           0 :         enum ndr_err_code err;
   47416             : 
   47417           0 :         if (ndr_table_srvsvc.num_calls < 25) {
   47418           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerStatisticsGet_ndr_pack");
   47419           0 :                 return NULL;
   47420             :         }
   47421           0 :         call = &ndr_table_srvsvc.calls[24];
   47422             : 
   47423           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   47424           0 :         if (push == NULL) {
   47425           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47426           0 :                 return NULL;
   47427             :         }
   47428             : 
   47429           0 :         push->flags |= ndr_push_flags;
   47430             : 
   47431           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   47432           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47433           0 :                 TALLOC_FREE(push);
   47434           0 :                 PyErr_SetNdrError(err);
   47435           0 :                 return NULL;
   47436             :         }
   47437           0 :         blob = ndr_push_blob(push);
   47438           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   47439           0 :         TALLOC_FREE(push);
   47440           0 :         return ret;
   47441             : }
   47442             : 
   47443           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47444             : {
   47445           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   47446           0 :         PyObject *bigendian_obj = NULL;
   47447           0 :         PyObject *ndr64_obj = NULL;
   47448           0 :         libndr_flags ndr_push_flags = 0;
   47449             : 
   47450           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   47451             :                 discard_const_p(char *, kwnames),
   47452             :                 &bigendian_obj,
   47453             :                 &ndr64_obj)) {
   47454           0 :                 return NULL;
   47455             :         }
   47456             : 
   47457           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47458           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   47459             :         }
   47460           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47461           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47462             :         }
   47463             : 
   47464           0 :         return py_srvsvc_NetServerStatisticsGet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   47465             : }
   47466             : 
   47467           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47468             : {
   47469           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   47470           0 :         PyObject *bigendian_obj = NULL;
   47471           0 :         PyObject *ndr64_obj = NULL;
   47472           0 :         libndr_flags ndr_push_flags = 0;
   47473             : 
   47474           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   47475             :                 discard_const_p(char *, kwnames),
   47476             :                 &bigendian_obj,
   47477             :                 &ndr64_obj)) {
   47478           0 :                 return NULL;
   47479             :         }
   47480             : 
   47481           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47482           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   47483             :         }
   47484           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47485           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47486             :         }
   47487             : 
   47488           0 :         return py_srvsvc_NetServerStatisticsGet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   47489             : }
   47490             : 
   47491           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   47492             : {
   47493           0 :         const struct ndr_interface_call *call = NULL;
   47494           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(py_obj);
   47495           0 :         struct ndr_pull *pull = NULL;
   47496           0 :         enum ndr_err_code err;
   47497             : 
   47498           0 :         if (ndr_table_srvsvc.num_calls < 25) {
   47499           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerStatisticsGet_ndr_unpack");
   47500           0 :                 return NULL;
   47501             :         }
   47502           0 :         call = &ndr_table_srvsvc.calls[24];
   47503             : 
   47504           0 :         pull = ndr_pull_init_blob(blob, object);
   47505           0 :         if (pull == NULL) {
   47506           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47507           0 :                 return NULL;
   47508             :         }
   47509             : 
   47510           0 :         pull->flags |= ndr_pull_flags;
   47511             : 
   47512           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   47513           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47514           0 :                 TALLOC_FREE(pull);
   47515           0 :                 PyErr_SetNdrError(err);
   47516           0 :                 return NULL;
   47517             :         }
   47518           0 :         if (!allow_remaining) {
   47519           0 :                 uint32_t highest_ofs;
   47520             : 
   47521           0 :                 if (pull->offset > pull->relative_highest_offset) {
   47522           0 :                         highest_ofs = pull->offset;
   47523             :                 } else {
   47524           0 :                         highest_ofs = pull->relative_highest_offset;
   47525             :                 }
   47526           0 :                 if (highest_ofs < pull->data_size) {
   47527           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   47528             :                                 "not all bytes consumed ofs[%u] size[%u]",
   47529             :                                 highest_ofs, pull->data_size);
   47530           0 :                         TALLOC_FREE(pull);
   47531           0 :                         PyErr_SetNdrError(err);
   47532           0 :                         return NULL;
   47533             :                 }
   47534             :         }
   47535             : 
   47536           0 :         TALLOC_FREE(pull);
   47537           0 :         Py_RETURN_NONE;
   47538             : }
   47539             : 
   47540           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47541             : {
   47542           0 :         DATA_BLOB blob;
   47543           0 :         Py_ssize_t blob_length = 0;
   47544           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47545           0 :         PyObject *bigendian_obj = NULL;
   47546           0 :         PyObject *ndr64_obj = NULL;
   47547           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47548           0 :         PyObject *allow_remaining_obj = NULL;
   47549           0 :         bool allow_remaining = false;
   47550             : 
   47551           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   47552             :                 discard_const_p(char *, kwnames),
   47553             :                 &blob.data, &blob_length,
   47554             :                 &bigendian_obj,
   47555             :                 &ndr64_obj,
   47556             :                 &allow_remaining_obj)) {
   47557           0 :                 return NULL;
   47558             :         }
   47559           0 :         blob.length = blob_length;
   47560             : 
   47561           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47562           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47563             :         }
   47564           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47565           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47566             :         }
   47567             : 
   47568           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47569           0 :                 allow_remaining = true;
   47570             :         }
   47571             : 
   47572           0 :         return py_srvsvc_NetServerStatisticsGet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   47573             : }
   47574             : 
   47575           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47576             : {
   47577           0 :         DATA_BLOB blob;
   47578           0 :         Py_ssize_t blob_length = 0;
   47579           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47580           0 :         PyObject *bigendian_obj = NULL;
   47581           0 :         PyObject *ndr64_obj = NULL;
   47582           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47583           0 :         PyObject *allow_remaining_obj = NULL;
   47584           0 :         bool allow_remaining = false;
   47585             : 
   47586           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   47587             :                 discard_const_p(char *, kwnames),
   47588             :                 &blob.data, &blob_length,
   47589             :                 &bigendian_obj,
   47590             :                 &ndr64_obj,
   47591             :                 &allow_remaining_obj)) {
   47592           0 :                 return NULL;
   47593             :         }
   47594           0 :         blob.length = blob_length;
   47595             : 
   47596           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47597           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47598             :         }
   47599           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47600           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47601             :         }
   47602             : 
   47603           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47604           0 :                 allow_remaining = true;
   47605             :         }
   47606             : 
   47607           0 :         return py_srvsvc_NetServerStatisticsGet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   47608             : }
   47609             : 
   47610           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   47611             : {
   47612           0 :         const struct ndr_interface_call *call = NULL;
   47613           0 :         struct srvsvc_NetServerStatisticsGet *object = pytalloc_get_ptr(py_obj);
   47614           0 :         PyObject *ret;
   47615           0 :         char *retstr;
   47616             : 
   47617           0 :         if (ndr_table_srvsvc.num_calls < 25) {
   47618           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerStatisticsGet_ndr_print");
   47619           0 :                 return NULL;
   47620             :         }
   47621           0 :         call = &ndr_table_srvsvc.calls[24];
   47622             : 
   47623           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   47624           0 :         ret = PyUnicode_FromString(retstr);
   47625           0 :         TALLOC_FREE(retstr);
   47626             : 
   47627           0 :         return ret;
   47628             : }
   47629             : 
   47630           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47631             : {
   47632           0 :         return py_srvsvc_NetServerStatisticsGet_ndr_print(py_obj, "srvsvc_NetServerStatisticsGet_in", NDR_IN);
   47633             : }
   47634             : 
   47635           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47636             : {
   47637           0 :         return py_srvsvc_NetServerStatisticsGet_ndr_print(py_obj, "srvsvc_NetServerStatisticsGet_out", NDR_OUT);
   47638             : }
   47639             : 
   47640             : static PyMethodDef py_srvsvc_NetServerStatisticsGet_methods[] = {
   47641             :         { "opnum", (PyCFunction)py_srvsvc_NetServerStatisticsGet_ndr_opnum, METH_NOARGS|METH_CLASS,
   47642             :                 "srvsvc.NetServerStatisticsGet.opnum() -> 24 (0x18) " },
   47643             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerStatisticsGet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   47644             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   47645             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerStatisticsGet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   47646             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   47647             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerStatisticsGet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   47648             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   47649             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerStatisticsGet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   47650             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   47651             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetServerStatisticsGet_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   47652             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetServerStatisticsGet_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   47653             :         { NULL, NULL, 0, NULL }
   47654             : };
   47655             : 
   47656             : 
   47657             : static PyTypeObject srvsvc_NetServerStatisticsGet_Type = {
   47658             :         PyVarObject_HEAD_INIT(NULL, 0)
   47659             :         .tp_name = "srvsvc.NetServerStatisticsGet",
   47660             :         .tp_getset = py_srvsvc_NetServerStatisticsGet_getsetters,
   47661             :         .tp_methods = py_srvsvc_NetServerStatisticsGet_methods,
   47662             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   47663             :         .tp_new = py_srvsvc_NetServerStatisticsGet_new,
   47664             : };
   47665             : 
   47666           0 : static bool pack_py_srvsvc_NetServerStatisticsGet_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetServerStatisticsGet *r)
   47667             : {
   47668           0 :         PyObject *py_server_unc;
   47669           0 :         PyObject *py_service;
   47670           0 :         PyObject *py_level;
   47671           0 :         PyObject *py_options;
   47672           0 :         const char *kwnames[] = {
   47673             :                 "server_unc", "service", "level", "options", NULL
   47674             :         };
   47675             : 
   47676           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetServerStatisticsGet", discard_const_p(char *, kwnames), &py_server_unc, &py_service, &py_level, &py_options)) {
   47677           0 :                 return false;
   47678             :         }
   47679             : 
   47680           0 :         if (py_server_unc == NULL) {
   47681           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   47682           0 :                 return false;
   47683             :         }
   47684           0 :         if (py_server_unc == Py_None) {
   47685           0 :                 r->in.server_unc = NULL;
   47686             :         } else {
   47687           0 :                 r->in.server_unc = NULL;
   47688             :                 {
   47689           0 :                         const char *test_str;
   47690           0 :                         const char *talloc_str;
   47691           0 :                         PyObject *unicode = NULL;
   47692           0 :                         if (PyUnicode_Check(py_server_unc)) {
   47693           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   47694           0 :                                 if (unicode == NULL) {
   47695           0 :                                         return false;
   47696             :                                 }
   47697           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47698           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   47699           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   47700             :                         } else {
   47701           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   47702           0 :                                 return false;
   47703             :                         }
   47704           0 :                         talloc_str = talloc_strdup(r, test_str);
   47705           0 :                         if (unicode != NULL) {
   47706           0 :                                 Py_DECREF(unicode);
   47707             :                         }
   47708           0 :                         if (talloc_str == NULL) {
   47709           0 :                                 PyErr_NoMemory();
   47710           0 :                                 return false;
   47711             :                         }
   47712           0 :                         r->in.server_unc = talloc_str;
   47713             :                 }
   47714             :         }
   47715           0 :         if (py_service == NULL) {
   47716           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.service");
   47717           0 :                 return false;
   47718             :         }
   47719           0 :         if (py_service == Py_None) {
   47720           0 :                 r->in.service = NULL;
   47721             :         } else {
   47722           0 :                 r->in.service = NULL;
   47723             :                 {
   47724           0 :                         const char *test_str;
   47725           0 :                         const char *talloc_str;
   47726           0 :                         PyObject *unicode = NULL;
   47727           0 :                         if (PyUnicode_Check(py_service)) {
   47728           0 :                                 unicode = PyUnicode_AsEncodedString(py_service, "utf-8", "ignore");
   47729           0 :                                 if (unicode == NULL) {
   47730           0 :                                         return false;
   47731             :                                 }
   47732           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47733           0 :                         } else if (PyBytes_Check(py_service)) {
   47734           0 :                                 test_str = PyBytes_AS_STRING(py_service);
   47735             :                         } else {
   47736           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_service)->tp_name);
   47737           0 :                                 return false;
   47738             :                         }
   47739           0 :                         talloc_str = talloc_strdup(r, test_str);
   47740           0 :                         if (unicode != NULL) {
   47741           0 :                                 Py_DECREF(unicode);
   47742             :                         }
   47743           0 :                         if (talloc_str == NULL) {
   47744           0 :                                 PyErr_NoMemory();
   47745           0 :                                 return false;
   47746             :                         }
   47747           0 :                         r->in.service = talloc_str;
   47748             :                 }
   47749             :         }
   47750           0 :         if (py_level == NULL) {
   47751           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   47752           0 :                 return false;
   47753             :         }
   47754             :         {
   47755           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   47756           0 :                 if (PyLong_Check(py_level)) {
   47757           0 :                         unsigned long long test_var;
   47758           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   47759           0 :                         if (PyErr_Occurred() != NULL) {
   47760           0 :                                 return false;
   47761             :                         }
   47762           0 :                         if (test_var > uint_max) {
   47763           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47764             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47765           0 :                                 return false;
   47766             :                         }
   47767           0 :                         r->in.level = test_var;
   47768             :                 } else {
   47769           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47770             :                           PyLong_Type.tp_name);
   47771           0 :                         return false;
   47772             :                 }
   47773             :         }
   47774           0 :         if (py_options == NULL) {
   47775           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.options");
   47776           0 :                 return false;
   47777             :         }
   47778             :         {
   47779           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.options));
   47780           0 :                 if (PyLong_Check(py_options)) {
   47781           0 :                         unsigned long long test_var;
   47782           0 :                         test_var = PyLong_AsUnsignedLongLong(py_options);
   47783           0 :                         if (PyErr_Occurred() != NULL) {
   47784           0 :                                 return false;
   47785             :                         }
   47786           0 :                         if (test_var > uint_max) {
   47787           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47788             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47789           0 :                                 return false;
   47790             :                         }
   47791           0 :                         r->in.options = test_var;
   47792             :                 } else {
   47793           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47794             :                           PyLong_Type.tp_name);
   47795           0 :                         return false;
   47796             :                 }
   47797             :         }
   47798           0 :         return true;
   47799             : }
   47800             : 
   47801           0 : static PyObject *unpack_py_srvsvc_NetServerStatisticsGet_args_out(struct srvsvc_NetServerStatisticsGet *r)
   47802             : {
   47803           0 :         PyObject *result;
   47804           0 :         PyObject *py_stats;
   47805           0 :         if (*r->out.stats == NULL) {
   47806           0 :                 py_stats = Py_None;
   47807           0 :                 Py_INCREF(py_stats);
   47808             :         } else {
   47809           0 :                 py_stats = pytalloc_reference_ex(&srvsvc_Statistics_Type, *r->out.stats, *r->out.stats);
   47810             :         }
   47811           0 :         result = py_stats;
   47812           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   47813           0 :                 PyErr_SetWERROR(r->out.result);
   47814           0 :                 return NULL;
   47815             :         }
   47816             : 
   47817           0 :         return result;
   47818             : }
   47819             : 
   47820             : 
   47821           0 : static PyObject *py_srvsvc_NetTransportAdd_in_get_server_unc(PyObject *obj, void *closure)
   47822             : {
   47823           0 :         struct srvsvc_NetTransportAdd *object = pytalloc_get_ptr(obj);
   47824           0 :         PyObject *py_server_unc;
   47825           0 :         if (object->in.server_unc == NULL) {
   47826           0 :                 Py_RETURN_NONE;
   47827             :         }
   47828           0 :         if (object->in.server_unc == NULL) {
   47829           0 :                 py_server_unc = Py_None;
   47830           0 :                 Py_INCREF(py_server_unc);
   47831             :         } else {
   47832           0 :                 if (object->in.server_unc == NULL) {
   47833           0 :                         py_server_unc = Py_None;
   47834           0 :                         Py_INCREF(py_server_unc);
   47835             :                 } else {
   47836           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   47837             :                 }
   47838             :         }
   47839           0 :         return py_server_unc;
   47840             : }
   47841             : 
   47842           0 : static int py_srvsvc_NetTransportAdd_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   47843             : {
   47844           0 :         struct srvsvc_NetTransportAdd *object = pytalloc_get_ptr(py_obj);
   47845           0 :         if (value == NULL) {
   47846           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   47847           0 :                 return -1;
   47848             :         }
   47849           0 :         if (value == Py_None) {
   47850           0 :                 object->in.server_unc = NULL;
   47851             :         } else {
   47852           0 :                 object->in.server_unc = NULL;
   47853             :                 {
   47854           0 :                         const char *test_str;
   47855           0 :                         const char *talloc_str;
   47856           0 :                         PyObject *unicode = NULL;
   47857           0 :                         if (PyUnicode_Check(value)) {
   47858           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   47859           0 :                                 if (unicode == NULL) {
   47860           0 :                                         return -1;
   47861             :                                 }
   47862           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47863           0 :                         } else if (PyBytes_Check(value)) {
   47864           0 :                                 test_str = PyBytes_AS_STRING(value);
   47865             :                         } else {
   47866           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   47867           0 :                                 return -1;
   47868             :                         }
   47869           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47870           0 :                         if (unicode != NULL) {
   47871           0 :                                 Py_DECREF(unicode);
   47872             :                         }
   47873           0 :                         if (talloc_str == NULL) {
   47874           0 :                                 PyErr_NoMemory();
   47875           0 :                                 return -1;
   47876             :                         }
   47877           0 :                         object->in.server_unc = talloc_str;
   47878             :                 }
   47879             :         }
   47880           0 :         return 0;
   47881             : }
   47882             : 
   47883           0 : static PyObject *py_srvsvc_NetTransportAdd_in_get_level(PyObject *obj, void *closure)
   47884             : {
   47885           0 :         struct srvsvc_NetTransportAdd *object = pytalloc_get_ptr(obj);
   47886           0 :         PyObject *py_level;
   47887           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   47888           0 :         return py_level;
   47889             : }
   47890             : 
   47891           0 : static int py_srvsvc_NetTransportAdd_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   47892             : {
   47893           0 :         struct srvsvc_NetTransportAdd *object = pytalloc_get_ptr(py_obj);
   47894           0 :         if (value == NULL) {
   47895           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   47896           0 :                 return -1;
   47897             :         }
   47898             :         {
   47899           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   47900           0 :                 if (PyLong_Check(value)) {
   47901           0 :                         unsigned long long test_var;
   47902           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   47903           0 :                         if (PyErr_Occurred() != NULL) {
   47904           0 :                                 return -1;
   47905             :                         }
   47906           0 :                         if (test_var > uint_max) {
   47907           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47908             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47909           0 :                                 return -1;
   47910             :                         }
   47911           0 :                         object->in.level = test_var;
   47912             :                 } else {
   47913           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47914             :                           PyLong_Type.tp_name);
   47915           0 :                         return -1;
   47916             :                 }
   47917             :         }
   47918           0 :         return 0;
   47919             : }
   47920             : 
   47921           0 : static PyObject *py_srvsvc_NetTransportAdd_in_get_info(PyObject *obj, void *closure)
   47922             : {
   47923           0 :         struct srvsvc_NetTransportAdd *object = pytalloc_get_ptr(obj);
   47924           0 :         PyObject *py_info;
   47925           0 :         py_info = pyrpc_import_union(&srvsvc_NetTransportInfo_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.info, "union srvsvc_NetTransportInfo");
   47926           0 :         if (py_info == NULL) {
   47927           0 :                 return NULL;
   47928             :         }
   47929           0 :         return py_info;
   47930             : }
   47931             : 
   47932           0 : static int py_srvsvc_NetTransportAdd_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   47933             : {
   47934           0 :         struct srvsvc_NetTransportAdd *object = pytalloc_get_ptr(py_obj);
   47935           0 :         if (value == NULL) {
   47936           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info");
   47937           0 :                 return -1;
   47938             :         }
   47939             :         {
   47940           0 :                 union srvsvc_NetTransportInfo *info_switch_0;
   47941           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");
   47942           0 :                 if (info_switch_0 == NULL) {
   47943           0 :                         return -1;
   47944             :                 }
   47945           0 :                 object->in.info = *info_switch_0;
   47946             :         }
   47947           0 :         return 0;
   47948             : }
   47949             : 
   47950           0 : static PyObject *py_srvsvc_NetTransportAdd_get_result(PyObject *obj, void *closure)
   47951             : {
   47952           0 :         struct srvsvc_NetTransportAdd *object = pytalloc_get_ptr(obj);
   47953           0 :         PyObject *py_result;
   47954           0 :         py_result = PyErr_FromWERROR(object->out.result);
   47955           0 :         return py_result;
   47956             : }
   47957             : 
   47958           0 : static int py_srvsvc_NetTransportAdd_set_result(PyObject *py_obj, PyObject *value, void *closure)
   47959             : {
   47960           0 :         struct srvsvc_NetTransportAdd *object = pytalloc_get_ptr(py_obj);
   47961           0 :         if (value == NULL) {
   47962           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   47963           0 :                 return -1;
   47964             :         }
   47965           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   47966           0 :         return 0;
   47967             : }
   47968             : 
   47969             : static PyGetSetDef py_srvsvc_NetTransportAdd_getsetters[] = {
   47970             :         {
   47971             :                 .name = discard_const_p(char, "in_server_unc"),
   47972             :                 .get = py_srvsvc_NetTransportAdd_in_get_server_unc,
   47973             :                 .set = py_srvsvc_NetTransportAdd_in_set_server_unc,
   47974             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47975             :         },
   47976             :         {
   47977             :                 .name = discard_const_p(char, "in_level"),
   47978             :                 .get = py_srvsvc_NetTransportAdd_in_get_level,
   47979             :                 .set = py_srvsvc_NetTransportAdd_in_set_level,
   47980             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   47981             :         },
   47982             :         {
   47983             :                 .name = discard_const_p(char, "in_info"),
   47984             :                 .get = py_srvsvc_NetTransportAdd_in_get_info,
   47985             :                 .set = py_srvsvc_NetTransportAdd_in_set_info,
   47986             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo")
   47987             :         },
   47988             :         {
   47989             :                 .name = discard_const_p(char, "result"),
   47990             :                 .get = py_srvsvc_NetTransportAdd_get_result,
   47991             :                 .set = py_srvsvc_NetTransportAdd_set_result,
   47992             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   47993             :         },
   47994             :         { .name = NULL }
   47995             : };
   47996             : 
   47997           0 : static PyObject *py_srvsvc_NetTransportAdd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   47998             : {
   47999           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetTransportAdd, type);
   48000           0 :         return self;
   48001             : }
   48002             : 
   48003           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   48004             : {
   48005             : 
   48006             : 
   48007           0 :         return PyLong_FromLong(25);
   48008             : }
   48009             : 
   48010           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   48011             : {
   48012           0 :         const struct ndr_interface_call *call = NULL;
   48013           0 :         struct srvsvc_NetTransportAdd *object = pytalloc_get_ptr(py_obj);
   48014           0 :         PyObject *ret = NULL;
   48015           0 :         struct ndr_push *push = NULL;
   48016           0 :         DATA_BLOB blob;
   48017           0 :         enum ndr_err_code err;
   48018             : 
   48019           0 :         if (ndr_table_srvsvc.num_calls < 26) {
   48020           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportAdd_ndr_pack");
   48021           0 :                 return NULL;
   48022             :         }
   48023           0 :         call = &ndr_table_srvsvc.calls[25];
   48024             : 
   48025           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   48026           0 :         if (push == NULL) {
   48027           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48028           0 :                 return NULL;
   48029             :         }
   48030             : 
   48031           0 :         push->flags |= ndr_push_flags;
   48032             : 
   48033           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   48034           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48035           0 :                 TALLOC_FREE(push);
   48036           0 :                 PyErr_SetNdrError(err);
   48037           0 :                 return NULL;
   48038             :         }
   48039           0 :         blob = ndr_push_blob(push);
   48040           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   48041           0 :         TALLOC_FREE(push);
   48042           0 :         return ret;
   48043             : }
   48044             : 
   48045           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48046             : {
   48047           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48048           0 :         PyObject *bigendian_obj = NULL;
   48049           0 :         PyObject *ndr64_obj = NULL;
   48050           0 :         libndr_flags ndr_push_flags = 0;
   48051             : 
   48052           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   48053             :                 discard_const_p(char *, kwnames),
   48054             :                 &bigendian_obj,
   48055             :                 &ndr64_obj)) {
   48056           0 :                 return NULL;
   48057             :         }
   48058             : 
   48059           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48060           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48061             :         }
   48062           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48063           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48064             :         }
   48065             : 
   48066           0 :         return py_srvsvc_NetTransportAdd_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   48067             : }
   48068             : 
   48069           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48070             : {
   48071           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48072           0 :         PyObject *bigendian_obj = NULL;
   48073           0 :         PyObject *ndr64_obj = NULL;
   48074           0 :         libndr_flags ndr_push_flags = 0;
   48075             : 
   48076           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   48077             :                 discard_const_p(char *, kwnames),
   48078             :                 &bigendian_obj,
   48079             :                 &ndr64_obj)) {
   48080           0 :                 return NULL;
   48081             :         }
   48082             : 
   48083           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48084           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48085             :         }
   48086           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48087           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48088             :         }
   48089             : 
   48090           0 :         return py_srvsvc_NetTransportAdd_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   48091             : }
   48092             : 
   48093           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   48094             : {
   48095           0 :         const struct ndr_interface_call *call = NULL;
   48096           0 :         struct srvsvc_NetTransportAdd *object = pytalloc_get_ptr(py_obj);
   48097           0 :         struct ndr_pull *pull = NULL;
   48098           0 :         enum ndr_err_code err;
   48099             : 
   48100           0 :         if (ndr_table_srvsvc.num_calls < 26) {
   48101           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportAdd_ndr_unpack");
   48102           0 :                 return NULL;
   48103             :         }
   48104           0 :         call = &ndr_table_srvsvc.calls[25];
   48105             : 
   48106           0 :         pull = ndr_pull_init_blob(blob, object);
   48107           0 :         if (pull == NULL) {
   48108           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48109           0 :                 return NULL;
   48110             :         }
   48111             : 
   48112           0 :         pull->flags |= ndr_pull_flags;
   48113             : 
   48114           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   48115           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48116           0 :                 TALLOC_FREE(pull);
   48117           0 :                 PyErr_SetNdrError(err);
   48118           0 :                 return NULL;
   48119             :         }
   48120           0 :         if (!allow_remaining) {
   48121           0 :                 uint32_t highest_ofs;
   48122             : 
   48123           0 :                 if (pull->offset > pull->relative_highest_offset) {
   48124           0 :                         highest_ofs = pull->offset;
   48125             :                 } else {
   48126           0 :                         highest_ofs = pull->relative_highest_offset;
   48127             :                 }
   48128           0 :                 if (highest_ofs < pull->data_size) {
   48129           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   48130             :                                 "not all bytes consumed ofs[%u] size[%u]",
   48131             :                                 highest_ofs, pull->data_size);
   48132           0 :                         TALLOC_FREE(pull);
   48133           0 :                         PyErr_SetNdrError(err);
   48134           0 :                         return NULL;
   48135             :                 }
   48136             :         }
   48137             : 
   48138           0 :         TALLOC_FREE(pull);
   48139           0 :         Py_RETURN_NONE;
   48140             : }
   48141             : 
   48142           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48143             : {
   48144           0 :         DATA_BLOB blob;
   48145           0 :         Py_ssize_t blob_length = 0;
   48146           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48147           0 :         PyObject *bigendian_obj = NULL;
   48148           0 :         PyObject *ndr64_obj = NULL;
   48149           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48150           0 :         PyObject *allow_remaining_obj = NULL;
   48151           0 :         bool allow_remaining = false;
   48152             : 
   48153           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   48154             :                 discard_const_p(char *, kwnames),
   48155             :                 &blob.data, &blob_length,
   48156             :                 &bigendian_obj,
   48157             :                 &ndr64_obj,
   48158             :                 &allow_remaining_obj)) {
   48159           0 :                 return NULL;
   48160             :         }
   48161           0 :         blob.length = blob_length;
   48162             : 
   48163           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48164           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48165             :         }
   48166           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48167           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48168             :         }
   48169             : 
   48170           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48171           0 :                 allow_remaining = true;
   48172             :         }
   48173             : 
   48174           0 :         return py_srvsvc_NetTransportAdd_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   48175             : }
   48176             : 
   48177           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48178             : {
   48179           0 :         DATA_BLOB blob;
   48180           0 :         Py_ssize_t blob_length = 0;
   48181           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48182           0 :         PyObject *bigendian_obj = NULL;
   48183           0 :         PyObject *ndr64_obj = NULL;
   48184           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48185           0 :         PyObject *allow_remaining_obj = NULL;
   48186           0 :         bool allow_remaining = false;
   48187             : 
   48188           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   48189             :                 discard_const_p(char *, kwnames),
   48190             :                 &blob.data, &blob_length,
   48191             :                 &bigendian_obj,
   48192             :                 &ndr64_obj,
   48193             :                 &allow_remaining_obj)) {
   48194           0 :                 return NULL;
   48195             :         }
   48196           0 :         blob.length = blob_length;
   48197             : 
   48198           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48199           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48200             :         }
   48201           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48202           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48203             :         }
   48204             : 
   48205           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48206           0 :                 allow_remaining = true;
   48207             :         }
   48208             : 
   48209           0 :         return py_srvsvc_NetTransportAdd_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   48210             : }
   48211             : 
   48212           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   48213             : {
   48214           0 :         const struct ndr_interface_call *call = NULL;
   48215           0 :         struct srvsvc_NetTransportAdd *object = pytalloc_get_ptr(py_obj);
   48216           0 :         PyObject *ret;
   48217           0 :         char *retstr;
   48218             : 
   48219           0 :         if (ndr_table_srvsvc.num_calls < 26) {
   48220           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportAdd_ndr_print");
   48221           0 :                 return NULL;
   48222             :         }
   48223           0 :         call = &ndr_table_srvsvc.calls[25];
   48224             : 
   48225           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   48226           0 :         ret = PyUnicode_FromString(retstr);
   48227           0 :         TALLOC_FREE(retstr);
   48228             : 
   48229           0 :         return ret;
   48230             : }
   48231             : 
   48232           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   48233             : {
   48234           0 :         return py_srvsvc_NetTransportAdd_ndr_print(py_obj, "srvsvc_NetTransportAdd_in", NDR_IN);
   48235             : }
   48236             : 
   48237           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   48238             : {
   48239           0 :         return py_srvsvc_NetTransportAdd_ndr_print(py_obj, "srvsvc_NetTransportAdd_out", NDR_OUT);
   48240             : }
   48241             : 
   48242             : static PyMethodDef py_srvsvc_NetTransportAdd_methods[] = {
   48243             :         { "opnum", (PyCFunction)py_srvsvc_NetTransportAdd_ndr_opnum, METH_NOARGS|METH_CLASS,
   48244             :                 "srvsvc.NetTransportAdd.opnum() -> 25 (0x19) " },
   48245             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportAdd_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   48246             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   48247             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportAdd_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   48248             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   48249             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportAdd_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   48250             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   48251             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportAdd_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   48252             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   48253             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetTransportAdd_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   48254             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetTransportAdd_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   48255             :         { NULL, NULL, 0, NULL }
   48256             : };
   48257             : 
   48258             : 
   48259             : static PyTypeObject srvsvc_NetTransportAdd_Type = {
   48260             :         PyVarObject_HEAD_INIT(NULL, 0)
   48261             :         .tp_name = "srvsvc.NetTransportAdd",
   48262             :         .tp_getset = py_srvsvc_NetTransportAdd_getsetters,
   48263             :         .tp_methods = py_srvsvc_NetTransportAdd_methods,
   48264             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   48265             :         .tp_new = py_srvsvc_NetTransportAdd_new,
   48266             : };
   48267             : 
   48268           0 : static bool pack_py_srvsvc_NetTransportAdd_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetTransportAdd *r)
   48269             : {
   48270           0 :         PyObject *py_server_unc;
   48271           0 :         PyObject *py_level;
   48272           0 :         PyObject *py_info;
   48273           0 :         const char *kwnames[] = {
   48274             :                 "server_unc", "level", "info", NULL
   48275             :         };
   48276             : 
   48277           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetTransportAdd", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info)) {
   48278           0 :                 return false;
   48279             :         }
   48280             : 
   48281           0 :         if (py_server_unc == NULL) {
   48282           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   48283           0 :                 return false;
   48284             :         }
   48285           0 :         if (py_server_unc == Py_None) {
   48286           0 :                 r->in.server_unc = NULL;
   48287             :         } else {
   48288           0 :                 r->in.server_unc = NULL;
   48289             :                 {
   48290           0 :                         const char *test_str;
   48291           0 :                         const char *talloc_str;
   48292           0 :                         PyObject *unicode = NULL;
   48293           0 :                         if (PyUnicode_Check(py_server_unc)) {
   48294           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   48295           0 :                                 if (unicode == NULL) {
   48296           0 :                                         return false;
   48297             :                                 }
   48298           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   48299           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   48300           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   48301             :                         } else {
   48302           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   48303           0 :                                 return false;
   48304             :                         }
   48305           0 :                         talloc_str = talloc_strdup(r, test_str);
   48306           0 :                         if (unicode != NULL) {
   48307           0 :                                 Py_DECREF(unicode);
   48308             :                         }
   48309           0 :                         if (talloc_str == NULL) {
   48310           0 :                                 PyErr_NoMemory();
   48311           0 :                                 return false;
   48312             :                         }
   48313           0 :                         r->in.server_unc = talloc_str;
   48314             :                 }
   48315             :         }
   48316           0 :         if (py_level == NULL) {
   48317           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   48318           0 :                 return false;
   48319             :         }
   48320             :         {
   48321           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   48322           0 :                 if (PyLong_Check(py_level)) {
   48323           0 :                         unsigned long long test_var;
   48324           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   48325           0 :                         if (PyErr_Occurred() != NULL) {
   48326           0 :                                 return false;
   48327             :                         }
   48328           0 :                         if (test_var > uint_max) {
   48329           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48330             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48331           0 :                                 return false;
   48332             :                         }
   48333           0 :                         r->in.level = test_var;
   48334             :                 } else {
   48335           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   48336             :                           PyLong_Type.tp_name);
   48337           0 :                         return false;
   48338             :                 }
   48339             :         }
   48340           0 :         if (py_info == NULL) {
   48341           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info");
   48342           0 :                 return false;
   48343             :         }
   48344             :         {
   48345           0 :                 union srvsvc_NetTransportInfo *info_switch_0;
   48346           0 :                 info_switch_0 = (union srvsvc_NetTransportInfo *)pyrpc_export_union(&srvsvc_NetTransportInfo_Type, r, r->in.level, py_info, "union srvsvc_NetTransportInfo");
   48347           0 :                 if (info_switch_0 == NULL) {
   48348           0 :                         return false;
   48349             :                 }
   48350           0 :                 r->in.info = *info_switch_0;
   48351             :         }
   48352           0 :         return true;
   48353             : }
   48354             : 
   48355           0 : static PyObject *unpack_py_srvsvc_NetTransportAdd_args_out(struct srvsvc_NetTransportAdd *r)
   48356             : {
   48357           0 :         PyObject *result;
   48358           0 :         result = Py_None;
   48359           0 :         Py_INCREF(result);
   48360           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   48361           0 :                 PyErr_SetWERROR(r->out.result);
   48362           0 :                 return NULL;
   48363             :         }
   48364             : 
   48365           0 :         return result;
   48366             : }
   48367             : 
   48368             : 
   48369           0 : static PyObject *py_srvsvc_NetTransportEnum_in_get_server_unc(PyObject *obj, void *closure)
   48370             : {
   48371           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(obj);
   48372           0 :         PyObject *py_server_unc;
   48373           0 :         if (object->in.server_unc == NULL) {
   48374           0 :                 Py_RETURN_NONE;
   48375             :         }
   48376           0 :         if (object->in.server_unc == NULL) {
   48377           0 :                 py_server_unc = Py_None;
   48378           0 :                 Py_INCREF(py_server_unc);
   48379             :         } else {
   48380           0 :                 if (object->in.server_unc == NULL) {
   48381           0 :                         py_server_unc = Py_None;
   48382           0 :                         Py_INCREF(py_server_unc);
   48383             :                 } else {
   48384           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   48385             :                 }
   48386             :         }
   48387           0 :         return py_server_unc;
   48388             : }
   48389             : 
   48390           0 : static int py_srvsvc_NetTransportEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   48391             : {
   48392           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(py_obj);
   48393           0 :         if (value == NULL) {
   48394           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   48395           0 :                 return -1;
   48396             :         }
   48397           0 :         if (value == Py_None) {
   48398           0 :                 object->in.server_unc = NULL;
   48399             :         } else {
   48400           0 :                 object->in.server_unc = NULL;
   48401             :                 {
   48402           0 :                         const char *test_str;
   48403           0 :                         const char *talloc_str;
   48404           0 :                         PyObject *unicode = NULL;
   48405           0 :                         if (PyUnicode_Check(value)) {
   48406           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48407           0 :                                 if (unicode == NULL) {
   48408           0 :                                         return -1;
   48409             :                                 }
   48410           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   48411           0 :                         } else if (PyBytes_Check(value)) {
   48412           0 :                                 test_str = PyBytes_AS_STRING(value);
   48413             :                         } else {
   48414           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48415           0 :                                 return -1;
   48416             :                         }
   48417           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48418           0 :                         if (unicode != NULL) {
   48419           0 :                                 Py_DECREF(unicode);
   48420             :                         }
   48421           0 :                         if (talloc_str == NULL) {
   48422           0 :                                 PyErr_NoMemory();
   48423           0 :                                 return -1;
   48424             :                         }
   48425           0 :                         object->in.server_unc = talloc_str;
   48426             :                 }
   48427             :         }
   48428           0 :         return 0;
   48429             : }
   48430             : 
   48431           0 : static PyObject *py_srvsvc_NetTransportEnum_in_get_transports(PyObject *obj, void *closure)
   48432             : {
   48433           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(obj);
   48434           0 :         PyObject *py_transports;
   48435           0 :         if (object->in.transports == NULL) {
   48436           0 :                 Py_RETURN_NONE;
   48437             :         }
   48438           0 :         py_transports = pytalloc_reference_ex(&srvsvc_NetTransportInfoCtr_Type, object->in.transports, object->in.transports);
   48439           0 :         return py_transports;
   48440             : }
   48441             : 
   48442           0 : static int py_srvsvc_NetTransportEnum_in_set_transports(PyObject *py_obj, PyObject *value, void *closure)
   48443             : {
   48444           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(py_obj);
   48445           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.transports));
   48446           0 :         if (value == NULL) {
   48447           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.transports");
   48448           0 :                 return -1;
   48449             :         }
   48450           0 :         object->in.transports = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.transports);
   48451           0 :         if (object->in.transports == NULL) {
   48452           0 :                 PyErr_NoMemory();
   48453           0 :                 return -1;
   48454             :         }
   48455           0 :         PY_CHECK_TYPE(&srvsvc_NetTransportInfoCtr_Type, value, return -1;);
   48456           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48457           0 :                 PyErr_NoMemory();
   48458           0 :                 return -1;
   48459             :         }
   48460           0 :         object->in.transports = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(value);
   48461           0 :         return 0;
   48462             : }
   48463             : 
   48464           0 : static PyObject *py_srvsvc_NetTransportEnum_out_get_transports(PyObject *obj, void *closure)
   48465             : {
   48466           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(obj);
   48467           0 :         PyObject *py_transports;
   48468           0 :         if (object->out.transports == NULL) {
   48469           0 :                 Py_RETURN_NONE;
   48470             :         }
   48471           0 :         py_transports = pytalloc_reference_ex(&srvsvc_NetTransportInfoCtr_Type, object->out.transports, object->out.transports);
   48472           0 :         return py_transports;
   48473             : }
   48474             : 
   48475           0 : static int py_srvsvc_NetTransportEnum_out_set_transports(PyObject *py_obj, PyObject *value, void *closure)
   48476             : {
   48477           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(py_obj);
   48478           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.transports));
   48479           0 :         if (value == NULL) {
   48480           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.transports");
   48481           0 :                 return -1;
   48482             :         }
   48483           0 :         object->out.transports = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.transports);
   48484           0 :         if (object->out.transports == NULL) {
   48485           0 :                 PyErr_NoMemory();
   48486           0 :                 return -1;
   48487             :         }
   48488           0 :         PY_CHECK_TYPE(&srvsvc_NetTransportInfoCtr_Type, value, return -1;);
   48489           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48490           0 :                 PyErr_NoMemory();
   48491           0 :                 return -1;
   48492             :         }
   48493           0 :         object->out.transports = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(value);
   48494           0 :         return 0;
   48495             : }
   48496             : 
   48497           0 : static PyObject *py_srvsvc_NetTransportEnum_in_get_max_buffer(PyObject *obj, void *closure)
   48498             : {
   48499           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(obj);
   48500           0 :         PyObject *py_max_buffer;
   48501           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)(object->in.max_buffer));
   48502           0 :         return py_max_buffer;
   48503             : }
   48504             : 
   48505           0 : static int py_srvsvc_NetTransportEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   48506             : {
   48507           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(py_obj);
   48508           0 :         if (value == NULL) {
   48509           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.max_buffer");
   48510           0 :                 return -1;
   48511             :         }
   48512             :         {
   48513           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   48514           0 :                 if (PyLong_Check(value)) {
   48515           0 :                         unsigned long long test_var;
   48516           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   48517           0 :                         if (PyErr_Occurred() != NULL) {
   48518           0 :                                 return -1;
   48519             :                         }
   48520           0 :                         if (test_var > uint_max) {
   48521           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48522             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48523           0 :                                 return -1;
   48524             :                         }
   48525           0 :                         object->in.max_buffer = test_var;
   48526             :                 } else {
   48527           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   48528             :                           PyLong_Type.tp_name);
   48529           0 :                         return -1;
   48530             :                 }
   48531             :         }
   48532           0 :         return 0;
   48533             : }
   48534             : 
   48535           0 : static PyObject *py_srvsvc_NetTransportEnum_out_get_totalentries(PyObject *obj, void *closure)
   48536             : {
   48537           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(obj);
   48538           0 :         PyObject *py_totalentries;
   48539           0 :         if (object->out.totalentries == NULL) {
   48540           0 :                 Py_RETURN_NONE;
   48541             :         }
   48542           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.totalentries));
   48543           0 :         return py_totalentries;
   48544             : }
   48545             : 
   48546           0 : static int py_srvsvc_NetTransportEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   48547             : {
   48548           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(py_obj);
   48549           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   48550           0 :         if (value == NULL) {
   48551           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.totalentries");
   48552           0 :                 return -1;
   48553             :         }
   48554           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   48555           0 :         if (object->out.totalentries == NULL) {
   48556           0 :                 PyErr_NoMemory();
   48557           0 :                 return -1;
   48558             :         }
   48559             :         {
   48560           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   48561           0 :                 if (PyLong_Check(value)) {
   48562           0 :                         unsigned long long test_var;
   48563           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   48564           0 :                         if (PyErr_Occurred() != NULL) {
   48565           0 :                                 return -1;
   48566             :                         }
   48567           0 :                         if (test_var > uint_max) {
   48568           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48569             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48570           0 :                                 return -1;
   48571             :                         }
   48572           0 :                         *object->out.totalentries = test_var;
   48573             :                 } else {
   48574           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   48575             :                           PyLong_Type.tp_name);
   48576           0 :                         return -1;
   48577             :                 }
   48578             :         }
   48579           0 :         return 0;
   48580             : }
   48581             : 
   48582           0 : static PyObject *py_srvsvc_NetTransportEnum_in_get_resume_handle(PyObject *obj, void *closure)
   48583             : {
   48584           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(obj);
   48585           0 :         PyObject *py_resume_handle;
   48586           0 :         if (object->in.resume_handle == NULL) {
   48587           0 :                 Py_RETURN_NONE;
   48588             :         }
   48589           0 :         if (object->in.resume_handle == NULL) {
   48590           0 :                 py_resume_handle = Py_None;
   48591           0 :                 Py_INCREF(py_resume_handle);
   48592             :         } else {
   48593           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.resume_handle));
   48594             :         }
   48595           0 :         return py_resume_handle;
   48596             : }
   48597             : 
   48598           0 : static int py_srvsvc_NetTransportEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   48599             : {
   48600           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(py_obj);
   48601           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   48602           0 :         if (value == NULL) {
   48603           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.resume_handle");
   48604           0 :                 return -1;
   48605             :         }
   48606           0 :         if (value == Py_None) {
   48607           0 :                 object->in.resume_handle = NULL;
   48608             :         } else {
   48609           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   48610           0 :                 if (object->in.resume_handle == NULL) {
   48611           0 :                         PyErr_NoMemory();
   48612           0 :                         return -1;
   48613             :                 }
   48614             :                 {
   48615           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   48616           0 :                         if (PyLong_Check(value)) {
   48617           0 :                                 unsigned long long test_var;
   48618           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   48619           0 :                                 if (PyErr_Occurred() != NULL) {
   48620           0 :                                         return -1;
   48621             :                                 }
   48622           0 :                                 if (test_var > uint_max) {
   48623           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48624             :                                           PyLong_Type.tp_name, uint_max, test_var);
   48625           0 :                                         return -1;
   48626             :                                 }
   48627           0 :                                 *object->in.resume_handle = test_var;
   48628             :                         } else {
   48629           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   48630             :                                   PyLong_Type.tp_name);
   48631           0 :                                 return -1;
   48632             :                         }
   48633             :                 }
   48634             :         }
   48635           0 :         return 0;
   48636             : }
   48637             : 
   48638           0 : static PyObject *py_srvsvc_NetTransportEnum_out_get_resume_handle(PyObject *obj, void *closure)
   48639             : {
   48640           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(obj);
   48641           0 :         PyObject *py_resume_handle;
   48642           0 :         if (object->out.resume_handle == NULL) {
   48643           0 :                 Py_RETURN_NONE;
   48644             :         }
   48645           0 :         if (object->out.resume_handle == NULL) {
   48646           0 :                 py_resume_handle = Py_None;
   48647           0 :                 Py_INCREF(py_resume_handle);
   48648             :         } else {
   48649           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.resume_handle));
   48650             :         }
   48651           0 :         return py_resume_handle;
   48652             : }
   48653             : 
   48654           0 : static int py_srvsvc_NetTransportEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   48655             : {
   48656           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(py_obj);
   48657           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   48658           0 :         if (value == NULL) {
   48659           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.resume_handle");
   48660           0 :                 return -1;
   48661             :         }
   48662           0 :         if (value == Py_None) {
   48663           0 :                 object->out.resume_handle = NULL;
   48664             :         } else {
   48665           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   48666           0 :                 if (object->out.resume_handle == NULL) {
   48667           0 :                         PyErr_NoMemory();
   48668           0 :                         return -1;
   48669             :                 }
   48670             :                 {
   48671           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   48672           0 :                         if (PyLong_Check(value)) {
   48673           0 :                                 unsigned long long test_var;
   48674           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   48675           0 :                                 if (PyErr_Occurred() != NULL) {
   48676           0 :                                         return -1;
   48677             :                                 }
   48678           0 :                                 if (test_var > uint_max) {
   48679           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48680             :                                           PyLong_Type.tp_name, uint_max, test_var);
   48681           0 :                                         return -1;
   48682             :                                 }
   48683           0 :                                 *object->out.resume_handle = test_var;
   48684             :                         } else {
   48685           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   48686             :                                   PyLong_Type.tp_name);
   48687           0 :                                 return -1;
   48688             :                         }
   48689             :                 }
   48690             :         }
   48691           0 :         return 0;
   48692             : }
   48693             : 
   48694           0 : static PyObject *py_srvsvc_NetTransportEnum_get_result(PyObject *obj, void *closure)
   48695             : {
   48696           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(obj);
   48697           0 :         PyObject *py_result;
   48698           0 :         py_result = PyErr_FromWERROR(object->out.result);
   48699           0 :         return py_result;
   48700             : }
   48701             : 
   48702           0 : static int py_srvsvc_NetTransportEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   48703             : {
   48704           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(py_obj);
   48705           0 :         if (value == NULL) {
   48706           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   48707           0 :                 return -1;
   48708             :         }
   48709           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   48710           0 :         return 0;
   48711             : }
   48712             : 
   48713             : static PyGetSetDef py_srvsvc_NetTransportEnum_getsetters[] = {
   48714             :         {
   48715             :                 .name = discard_const_p(char, "in_server_unc"),
   48716             :                 .get = py_srvsvc_NetTransportEnum_in_get_server_unc,
   48717             :                 .set = py_srvsvc_NetTransportEnum_in_set_server_unc,
   48718             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   48719             :         },
   48720             :         {
   48721             :                 .name = discard_const_p(char, "in_transports"),
   48722             :                 .get = py_srvsvc_NetTransportEnum_in_get_transports,
   48723             :                 .set = py_srvsvc_NetTransportEnum_in_set_transports,
   48724             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfoCtr")
   48725             :         },
   48726             :         {
   48727             :                 .name = discard_const_p(char, "out_transports"),
   48728             :                 .get = py_srvsvc_NetTransportEnum_out_get_transports,
   48729             :                 .set = py_srvsvc_NetTransportEnum_out_set_transports,
   48730             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfoCtr")
   48731             :         },
   48732             :         {
   48733             :                 .name = discard_const_p(char, "in_max_buffer"),
   48734             :                 .get = py_srvsvc_NetTransportEnum_in_get_max_buffer,
   48735             :                 .set = py_srvsvc_NetTransportEnum_in_set_max_buffer,
   48736             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   48737             :         },
   48738             :         {
   48739             :                 .name = discard_const_p(char, "out_totalentries"),
   48740             :                 .get = py_srvsvc_NetTransportEnum_out_get_totalentries,
   48741             :                 .set = py_srvsvc_NetTransportEnum_out_set_totalentries,
   48742             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   48743             :         },
   48744             :         {
   48745             :                 .name = discard_const_p(char, "in_resume_handle"),
   48746             :                 .get = py_srvsvc_NetTransportEnum_in_get_resume_handle,
   48747             :                 .set = py_srvsvc_NetTransportEnum_in_set_resume_handle,
   48748             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   48749             :         },
   48750             :         {
   48751             :                 .name = discard_const_p(char, "out_resume_handle"),
   48752             :                 .get = py_srvsvc_NetTransportEnum_out_get_resume_handle,
   48753             :                 .set = py_srvsvc_NetTransportEnum_out_set_resume_handle,
   48754             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   48755             :         },
   48756             :         {
   48757             :                 .name = discard_const_p(char, "result"),
   48758             :                 .get = py_srvsvc_NetTransportEnum_get_result,
   48759             :                 .set = py_srvsvc_NetTransportEnum_set_result,
   48760             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   48761             :         },
   48762             :         { .name = NULL }
   48763             : };
   48764             : 
   48765           0 : static PyObject *py_srvsvc_NetTransportEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   48766             : {
   48767           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetTransportEnum, type);
   48768           0 :         struct srvsvc_NetTransportEnum *_self = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(self);
   48769           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   48770           0 :         _self->in.transports = talloc_zero(mem_ctx, struct srvsvc_NetTransportInfoCtr);
   48771           0 :         _self->out.transports = talloc_zero(mem_ctx, struct srvsvc_NetTransportInfoCtr);
   48772           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   48773           0 :         return self;
   48774             : }
   48775             : 
   48776           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   48777             : {
   48778             : 
   48779             : 
   48780           0 :         return PyLong_FromLong(26);
   48781             : }
   48782             : 
   48783           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   48784             : {
   48785           0 :         const struct ndr_interface_call *call = NULL;
   48786           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(py_obj);
   48787           0 :         PyObject *ret = NULL;
   48788           0 :         struct ndr_push *push = NULL;
   48789           0 :         DATA_BLOB blob;
   48790           0 :         enum ndr_err_code err;
   48791             : 
   48792           0 :         if (ndr_table_srvsvc.num_calls < 27) {
   48793           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportEnum_ndr_pack");
   48794           0 :                 return NULL;
   48795             :         }
   48796           0 :         call = &ndr_table_srvsvc.calls[26];
   48797             : 
   48798           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   48799           0 :         if (push == NULL) {
   48800           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48801           0 :                 return NULL;
   48802             :         }
   48803             : 
   48804           0 :         push->flags |= ndr_push_flags;
   48805             : 
   48806           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   48807           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48808           0 :                 TALLOC_FREE(push);
   48809           0 :                 PyErr_SetNdrError(err);
   48810           0 :                 return NULL;
   48811             :         }
   48812           0 :         blob = ndr_push_blob(push);
   48813           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   48814           0 :         TALLOC_FREE(push);
   48815           0 :         return ret;
   48816             : }
   48817             : 
   48818           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48819             : {
   48820           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48821           0 :         PyObject *bigendian_obj = NULL;
   48822           0 :         PyObject *ndr64_obj = NULL;
   48823           0 :         libndr_flags ndr_push_flags = 0;
   48824             : 
   48825           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   48826             :                 discard_const_p(char *, kwnames),
   48827             :                 &bigendian_obj,
   48828             :                 &ndr64_obj)) {
   48829           0 :                 return NULL;
   48830             :         }
   48831             : 
   48832           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48833           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48834             :         }
   48835           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48836           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48837             :         }
   48838             : 
   48839           0 :         return py_srvsvc_NetTransportEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   48840             : }
   48841             : 
   48842           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48843             : {
   48844           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48845           0 :         PyObject *bigendian_obj = NULL;
   48846           0 :         PyObject *ndr64_obj = NULL;
   48847           0 :         libndr_flags ndr_push_flags = 0;
   48848             : 
   48849           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   48850             :                 discard_const_p(char *, kwnames),
   48851             :                 &bigendian_obj,
   48852             :                 &ndr64_obj)) {
   48853           0 :                 return NULL;
   48854             :         }
   48855             : 
   48856           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48857           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48858             :         }
   48859           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48860           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48861             :         }
   48862             : 
   48863           0 :         return py_srvsvc_NetTransportEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   48864             : }
   48865             : 
   48866           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   48867             : {
   48868           0 :         const struct ndr_interface_call *call = NULL;
   48869           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(py_obj);
   48870           0 :         struct ndr_pull *pull = NULL;
   48871           0 :         enum ndr_err_code err;
   48872             : 
   48873           0 :         if (ndr_table_srvsvc.num_calls < 27) {
   48874           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportEnum_ndr_unpack");
   48875           0 :                 return NULL;
   48876             :         }
   48877           0 :         call = &ndr_table_srvsvc.calls[26];
   48878             : 
   48879           0 :         pull = ndr_pull_init_blob(blob, object);
   48880           0 :         if (pull == NULL) {
   48881           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48882           0 :                 return NULL;
   48883             :         }
   48884             : 
   48885           0 :         pull->flags |= ndr_pull_flags;
   48886             : 
   48887           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   48888           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48889           0 :                 TALLOC_FREE(pull);
   48890           0 :                 PyErr_SetNdrError(err);
   48891           0 :                 return NULL;
   48892             :         }
   48893           0 :         if (!allow_remaining) {
   48894           0 :                 uint32_t highest_ofs;
   48895             : 
   48896           0 :                 if (pull->offset > pull->relative_highest_offset) {
   48897           0 :                         highest_ofs = pull->offset;
   48898             :                 } else {
   48899           0 :                         highest_ofs = pull->relative_highest_offset;
   48900             :                 }
   48901           0 :                 if (highest_ofs < pull->data_size) {
   48902           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   48903             :                                 "not all bytes consumed ofs[%u] size[%u]",
   48904             :                                 highest_ofs, pull->data_size);
   48905           0 :                         TALLOC_FREE(pull);
   48906           0 :                         PyErr_SetNdrError(err);
   48907           0 :                         return NULL;
   48908             :                 }
   48909             :         }
   48910             : 
   48911           0 :         TALLOC_FREE(pull);
   48912           0 :         Py_RETURN_NONE;
   48913             : }
   48914             : 
   48915           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48916             : {
   48917           0 :         DATA_BLOB blob;
   48918           0 :         Py_ssize_t blob_length = 0;
   48919           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48920           0 :         PyObject *bigendian_obj = NULL;
   48921           0 :         PyObject *ndr64_obj = NULL;
   48922           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48923           0 :         PyObject *allow_remaining_obj = NULL;
   48924           0 :         bool allow_remaining = false;
   48925             : 
   48926           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   48927             :                 discard_const_p(char *, kwnames),
   48928             :                 &blob.data, &blob_length,
   48929             :                 &bigendian_obj,
   48930             :                 &ndr64_obj,
   48931             :                 &allow_remaining_obj)) {
   48932           0 :                 return NULL;
   48933             :         }
   48934           0 :         blob.length = blob_length;
   48935             : 
   48936           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48937           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48938             :         }
   48939           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48940           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48941             :         }
   48942             : 
   48943           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48944           0 :                 allow_remaining = true;
   48945             :         }
   48946             : 
   48947           0 :         return py_srvsvc_NetTransportEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   48948             : }
   48949             : 
   48950           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48951             : {
   48952           0 :         DATA_BLOB blob;
   48953           0 :         Py_ssize_t blob_length = 0;
   48954           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48955           0 :         PyObject *bigendian_obj = NULL;
   48956           0 :         PyObject *ndr64_obj = NULL;
   48957           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48958           0 :         PyObject *allow_remaining_obj = NULL;
   48959           0 :         bool allow_remaining = false;
   48960             : 
   48961           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   48962             :                 discard_const_p(char *, kwnames),
   48963             :                 &blob.data, &blob_length,
   48964             :                 &bigendian_obj,
   48965             :                 &ndr64_obj,
   48966             :                 &allow_remaining_obj)) {
   48967           0 :                 return NULL;
   48968             :         }
   48969           0 :         blob.length = blob_length;
   48970             : 
   48971           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48972           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48973             :         }
   48974           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48975           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48976             :         }
   48977             : 
   48978           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48979           0 :                 allow_remaining = true;
   48980             :         }
   48981             : 
   48982           0 :         return py_srvsvc_NetTransportEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   48983             : }
   48984             : 
   48985           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   48986             : {
   48987           0 :         const struct ndr_interface_call *call = NULL;
   48988           0 :         struct srvsvc_NetTransportEnum *object = pytalloc_get_ptr(py_obj);
   48989           0 :         PyObject *ret;
   48990           0 :         char *retstr;
   48991             : 
   48992           0 :         if (ndr_table_srvsvc.num_calls < 27) {
   48993           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportEnum_ndr_print");
   48994           0 :                 return NULL;
   48995             :         }
   48996           0 :         call = &ndr_table_srvsvc.calls[26];
   48997             : 
   48998           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   48999           0 :         ret = PyUnicode_FromString(retstr);
   49000           0 :         TALLOC_FREE(retstr);
   49001             : 
   49002           0 :         return ret;
   49003             : }
   49004             : 
   49005           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49006             : {
   49007           0 :         return py_srvsvc_NetTransportEnum_ndr_print(py_obj, "srvsvc_NetTransportEnum_in", NDR_IN);
   49008             : }
   49009             : 
   49010           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49011             : {
   49012           0 :         return py_srvsvc_NetTransportEnum_ndr_print(py_obj, "srvsvc_NetTransportEnum_out", NDR_OUT);
   49013             : }
   49014             : 
   49015             : static PyMethodDef py_srvsvc_NetTransportEnum_methods[] = {
   49016             :         { "opnum", (PyCFunction)py_srvsvc_NetTransportEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   49017             :                 "srvsvc.NetTransportEnum.opnum() -> 26 (0x1a) " },
   49018             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   49019             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   49020             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   49021             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   49022             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   49023             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   49024             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   49025             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   49026             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetTransportEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   49027             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetTransportEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   49028             :         { NULL, NULL, 0, NULL }
   49029             : };
   49030             : 
   49031             : 
   49032             : static PyTypeObject srvsvc_NetTransportEnum_Type = {
   49033             :         PyVarObject_HEAD_INIT(NULL, 0)
   49034             :         .tp_name = "srvsvc.NetTransportEnum",
   49035             :         .tp_getset = py_srvsvc_NetTransportEnum_getsetters,
   49036             :         .tp_methods = py_srvsvc_NetTransportEnum_methods,
   49037             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   49038             :         .tp_new = py_srvsvc_NetTransportEnum_new,
   49039             : };
   49040             : 
   49041           0 : static bool pack_py_srvsvc_NetTransportEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetTransportEnum *r)
   49042             : {
   49043           0 :         PyObject *py_server_unc;
   49044           0 :         PyObject *py_transports;
   49045           0 :         PyObject *py_max_buffer;
   49046           0 :         PyObject *py_resume_handle;
   49047           0 :         const char *kwnames[] = {
   49048             :                 "server_unc", "transports", "max_buffer", "resume_handle", NULL
   49049             :         };
   49050             : 
   49051           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)) {
   49052           0 :                 return false;
   49053             :         }
   49054             : 
   49055           0 :         if (py_server_unc == NULL) {
   49056           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   49057           0 :                 return false;
   49058             :         }
   49059           0 :         if (py_server_unc == Py_None) {
   49060           0 :                 r->in.server_unc = NULL;
   49061             :         } else {
   49062           0 :                 r->in.server_unc = NULL;
   49063             :                 {
   49064           0 :                         const char *test_str;
   49065           0 :                         const char *talloc_str;
   49066           0 :                         PyObject *unicode = NULL;
   49067           0 :                         if (PyUnicode_Check(py_server_unc)) {
   49068           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   49069           0 :                                 if (unicode == NULL) {
   49070           0 :                                         return false;
   49071             :                                 }
   49072           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49073           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   49074           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   49075             :                         } else {
   49076           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   49077           0 :                                 return false;
   49078             :                         }
   49079           0 :                         talloc_str = talloc_strdup(r, test_str);
   49080           0 :                         if (unicode != NULL) {
   49081           0 :                                 Py_DECREF(unicode);
   49082             :                         }
   49083           0 :                         if (talloc_str == NULL) {
   49084           0 :                                 PyErr_NoMemory();
   49085           0 :                                 return false;
   49086             :                         }
   49087           0 :                         r->in.server_unc = talloc_str;
   49088             :                 }
   49089             :         }
   49090           0 :         if (py_transports == NULL) {
   49091           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.transports");
   49092           0 :                 return false;
   49093             :         }
   49094           0 :         r->in.transports = talloc_ptrtype(r, r->in.transports);
   49095           0 :         if (r->in.transports == NULL) {
   49096           0 :                 PyErr_NoMemory();
   49097           0 :                 return false;
   49098             :         }
   49099           0 :         PY_CHECK_TYPE(&srvsvc_NetTransportInfoCtr_Type, py_transports, return false;);
   49100           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_transports)) == NULL) {
   49101           0 :                 PyErr_NoMemory();
   49102           0 :                 return false;
   49103             :         }
   49104           0 :         r->in.transports = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(py_transports);
   49105           0 :         if (py_max_buffer == NULL) {
   49106           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.max_buffer");
   49107           0 :                 return false;
   49108             :         }
   49109             :         {
   49110           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   49111           0 :                 if (PyLong_Check(py_max_buffer)) {
   49112           0 :                         unsigned long long test_var;
   49113           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   49114           0 :                         if (PyErr_Occurred() != NULL) {
   49115           0 :                                 return false;
   49116             :                         }
   49117           0 :                         if (test_var > uint_max) {
   49118           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49119             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49120           0 :                                 return false;
   49121             :                         }
   49122           0 :                         r->in.max_buffer = test_var;
   49123             :                 } else {
   49124           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   49125             :                           PyLong_Type.tp_name);
   49126           0 :                         return false;
   49127             :                 }
   49128             :         }
   49129           0 :         if (py_resume_handle == NULL) {
   49130           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.resume_handle");
   49131           0 :                 return false;
   49132             :         }
   49133           0 :         if (py_resume_handle == Py_None) {
   49134           0 :                 r->in.resume_handle = NULL;
   49135             :         } else {
   49136           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   49137           0 :                 if (r->in.resume_handle == NULL) {
   49138           0 :                         PyErr_NoMemory();
   49139           0 :                         return false;
   49140             :                 }
   49141             :                 {
   49142           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   49143           0 :                         if (PyLong_Check(py_resume_handle)) {
   49144           0 :                                 unsigned long long test_var;
   49145           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   49146           0 :                                 if (PyErr_Occurred() != NULL) {
   49147           0 :                                         return false;
   49148             :                                 }
   49149           0 :                                 if (test_var > uint_max) {
   49150           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49151             :                                           PyLong_Type.tp_name, uint_max, test_var);
   49152           0 :                                         return false;
   49153             :                                 }
   49154           0 :                                 *r->in.resume_handle = test_var;
   49155             :                         } else {
   49156           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   49157             :                                   PyLong_Type.tp_name);
   49158           0 :                                 return false;
   49159             :                         }
   49160             :                 }
   49161             :         }
   49162           0 :         return true;
   49163             : }
   49164             : 
   49165           0 : static PyObject *unpack_py_srvsvc_NetTransportEnum_args_out(struct srvsvc_NetTransportEnum *r)
   49166             : {
   49167           0 :         PyObject *result;
   49168           0 :         PyObject *py_transports;
   49169           0 :         PyObject *py_totalentries;
   49170           0 :         PyObject *py_resume_handle;
   49171           0 :         result = PyTuple_New(3);
   49172           0 :         py_transports = pytalloc_reference_ex(&srvsvc_NetTransportInfoCtr_Type, r->out.transports, r->out.transports);
   49173           0 :         PyTuple_SetItem(result, 0, py_transports);
   49174           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.totalentries));
   49175           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   49176           0 :         if (r->out.resume_handle == NULL) {
   49177           0 :                 py_resume_handle = Py_None;
   49178           0 :                 Py_INCREF(py_resume_handle);
   49179             :         } else {
   49180           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.resume_handle));
   49181             :         }
   49182           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   49183           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   49184           0 :                 PyErr_SetWERROR(r->out.result);
   49185           0 :                 return NULL;
   49186             :         }
   49187             : 
   49188           0 :         return result;
   49189             : }
   49190             : 
   49191             : 
   49192           0 : static PyObject *py_srvsvc_NetTransportDel_in_get_server_unc(PyObject *obj, void *closure)
   49193             : {
   49194           0 :         struct srvsvc_NetTransportDel *object = pytalloc_get_ptr(obj);
   49195           0 :         PyObject *py_server_unc;
   49196           0 :         if (object->in.server_unc == NULL) {
   49197           0 :                 Py_RETURN_NONE;
   49198             :         }
   49199           0 :         if (object->in.server_unc == NULL) {
   49200           0 :                 py_server_unc = Py_None;
   49201           0 :                 Py_INCREF(py_server_unc);
   49202             :         } else {
   49203           0 :                 if (object->in.server_unc == NULL) {
   49204           0 :                         py_server_unc = Py_None;
   49205           0 :                         Py_INCREF(py_server_unc);
   49206             :                 } else {
   49207           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   49208             :                 }
   49209             :         }
   49210           0 :         return py_server_unc;
   49211             : }
   49212             : 
   49213           0 : static int py_srvsvc_NetTransportDel_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   49214             : {
   49215           0 :         struct srvsvc_NetTransportDel *object = pytalloc_get_ptr(py_obj);
   49216           0 :         if (value == NULL) {
   49217           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   49218           0 :                 return -1;
   49219             :         }
   49220           0 :         if (value == Py_None) {
   49221           0 :                 object->in.server_unc = NULL;
   49222             :         } else {
   49223           0 :                 object->in.server_unc = NULL;
   49224             :                 {
   49225           0 :                         const char *test_str;
   49226           0 :                         const char *talloc_str;
   49227           0 :                         PyObject *unicode = NULL;
   49228           0 :                         if (PyUnicode_Check(value)) {
   49229           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49230           0 :                                 if (unicode == NULL) {
   49231           0 :                                         return -1;
   49232             :                                 }
   49233           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49234           0 :                         } else if (PyBytes_Check(value)) {
   49235           0 :                                 test_str = PyBytes_AS_STRING(value);
   49236             :                         } else {
   49237           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49238           0 :                                 return -1;
   49239             :                         }
   49240           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49241           0 :                         if (unicode != NULL) {
   49242           0 :                                 Py_DECREF(unicode);
   49243             :                         }
   49244           0 :                         if (talloc_str == NULL) {
   49245           0 :                                 PyErr_NoMemory();
   49246           0 :                                 return -1;
   49247             :                         }
   49248           0 :                         object->in.server_unc = talloc_str;
   49249             :                 }
   49250             :         }
   49251           0 :         return 0;
   49252             : }
   49253             : 
   49254           0 : static PyObject *py_srvsvc_NetTransportDel_in_get_level(PyObject *obj, void *closure)
   49255             : {
   49256           0 :         struct srvsvc_NetTransportDel *object = pytalloc_get_ptr(obj);
   49257           0 :         PyObject *py_level;
   49258           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   49259           0 :         return py_level;
   49260             : }
   49261             : 
   49262           0 : static int py_srvsvc_NetTransportDel_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   49263             : {
   49264           0 :         struct srvsvc_NetTransportDel *object = pytalloc_get_ptr(py_obj);
   49265           0 :         if (value == NULL) {
   49266           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   49267           0 :                 return -1;
   49268             :         }
   49269             :         {
   49270           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   49271           0 :                 if (PyLong_Check(value)) {
   49272           0 :                         unsigned long long test_var;
   49273           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   49274           0 :                         if (PyErr_Occurred() != NULL) {
   49275           0 :                                 return -1;
   49276             :                         }
   49277           0 :                         if (test_var > uint_max) {
   49278           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49279             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49280           0 :                                 return -1;
   49281             :                         }
   49282           0 :                         object->in.level = test_var;
   49283             :                 } else {
   49284           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   49285             :                           PyLong_Type.tp_name);
   49286           0 :                         return -1;
   49287             :                 }
   49288             :         }
   49289           0 :         return 0;
   49290             : }
   49291             : 
   49292           0 : static PyObject *py_srvsvc_NetTransportDel_in_get_info0(PyObject *obj, void *closure)
   49293             : {
   49294           0 :         struct srvsvc_NetTransportDel *object = pytalloc_get_ptr(obj);
   49295           0 :         PyObject *py_info0;
   49296           0 :         if (object->in.info0 == NULL) {
   49297           0 :                 Py_RETURN_NONE;
   49298             :         }
   49299           0 :         py_info0 = pytalloc_reference_ex(&srvsvc_NetTransportInfo0_Type, object->in.info0, object->in.info0);
   49300           0 :         return py_info0;
   49301             : }
   49302             : 
   49303           0 : static int py_srvsvc_NetTransportDel_in_set_info0(PyObject *py_obj, PyObject *value, void *closure)
   49304             : {
   49305           0 :         struct srvsvc_NetTransportDel *object = pytalloc_get_ptr(py_obj);
   49306           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info0));
   49307           0 :         if (value == NULL) {
   49308           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info0");
   49309           0 :                 return -1;
   49310             :         }
   49311           0 :         object->in.info0 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info0);
   49312           0 :         if (object->in.info0 == NULL) {
   49313           0 :                 PyErr_NoMemory();
   49314           0 :                 return -1;
   49315             :         }
   49316           0 :         PY_CHECK_TYPE(&srvsvc_NetTransportInfo0_Type, value, return -1;);
   49317           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49318           0 :                 PyErr_NoMemory();
   49319           0 :                 return -1;
   49320             :         }
   49321           0 :         object->in.info0 = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(value);
   49322           0 :         return 0;
   49323             : }
   49324             : 
   49325           0 : static PyObject *py_srvsvc_NetTransportDel_get_result(PyObject *obj, void *closure)
   49326             : {
   49327           0 :         struct srvsvc_NetTransportDel *object = pytalloc_get_ptr(obj);
   49328           0 :         PyObject *py_result;
   49329           0 :         py_result = PyErr_FromWERROR(object->out.result);
   49330           0 :         return py_result;
   49331             : }
   49332             : 
   49333           0 : static int py_srvsvc_NetTransportDel_set_result(PyObject *py_obj, PyObject *value, void *closure)
   49334             : {
   49335           0 :         struct srvsvc_NetTransportDel *object = pytalloc_get_ptr(py_obj);
   49336           0 :         if (value == NULL) {
   49337           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   49338           0 :                 return -1;
   49339             :         }
   49340           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   49341           0 :         return 0;
   49342             : }
   49343             : 
   49344             : static PyGetSetDef py_srvsvc_NetTransportDel_getsetters[] = {
   49345             :         {
   49346             :                 .name = discard_const_p(char, "in_server_unc"),
   49347             :                 .get = py_srvsvc_NetTransportDel_in_get_server_unc,
   49348             :                 .set = py_srvsvc_NetTransportDel_in_set_server_unc,
   49349             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49350             :         },
   49351             :         {
   49352             :                 .name = discard_const_p(char, "in_level"),
   49353             :                 .get = py_srvsvc_NetTransportDel_in_get_level,
   49354             :                 .set = py_srvsvc_NetTransportDel_in_set_level,
   49355             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   49356             :         },
   49357             :         {
   49358             :                 .name = discard_const_p(char, "in_info0"),
   49359             :                 .get = py_srvsvc_NetTransportDel_in_get_info0,
   49360             :                 .set = py_srvsvc_NetTransportDel_in_set_info0,
   49361             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo0")
   49362             :         },
   49363             :         {
   49364             :                 .name = discard_const_p(char, "result"),
   49365             :                 .get = py_srvsvc_NetTransportDel_get_result,
   49366             :                 .set = py_srvsvc_NetTransportDel_set_result,
   49367             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   49368             :         },
   49369             :         { .name = NULL }
   49370             : };
   49371             : 
   49372           0 : static PyObject *py_srvsvc_NetTransportDel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   49373             : {
   49374           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetTransportDel, type);
   49375           0 :         struct srvsvc_NetTransportDel *_self = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(self);
   49376           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   49377           0 :         _self->in.info0 = talloc_zero(mem_ctx, struct srvsvc_NetTransportInfo0);
   49378           0 :         return self;
   49379             : }
   49380             : 
   49381           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   49382             : {
   49383             : 
   49384             : 
   49385           0 :         return PyLong_FromLong(27);
   49386             : }
   49387             : 
   49388           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   49389             : {
   49390           0 :         const struct ndr_interface_call *call = NULL;
   49391           0 :         struct srvsvc_NetTransportDel *object = pytalloc_get_ptr(py_obj);
   49392           0 :         PyObject *ret = NULL;
   49393           0 :         struct ndr_push *push = NULL;
   49394           0 :         DATA_BLOB blob;
   49395           0 :         enum ndr_err_code err;
   49396             : 
   49397           0 :         if (ndr_table_srvsvc.num_calls < 28) {
   49398           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportDel_ndr_pack");
   49399           0 :                 return NULL;
   49400             :         }
   49401           0 :         call = &ndr_table_srvsvc.calls[27];
   49402             : 
   49403           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   49404           0 :         if (push == NULL) {
   49405           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   49406           0 :                 return NULL;
   49407             :         }
   49408             : 
   49409           0 :         push->flags |= ndr_push_flags;
   49410             : 
   49411           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   49412           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   49413           0 :                 TALLOC_FREE(push);
   49414           0 :                 PyErr_SetNdrError(err);
   49415           0 :                 return NULL;
   49416             :         }
   49417           0 :         blob = ndr_push_blob(push);
   49418           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   49419           0 :         TALLOC_FREE(push);
   49420           0 :         return ret;
   49421             : }
   49422             : 
   49423           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49424             : {
   49425           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49426           0 :         PyObject *bigendian_obj = NULL;
   49427           0 :         PyObject *ndr64_obj = NULL;
   49428           0 :         libndr_flags ndr_push_flags = 0;
   49429             : 
   49430           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   49431             :                 discard_const_p(char *, kwnames),
   49432             :                 &bigendian_obj,
   49433             :                 &ndr64_obj)) {
   49434           0 :                 return NULL;
   49435             :         }
   49436             : 
   49437           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49438           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49439             :         }
   49440           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49441           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49442             :         }
   49443             : 
   49444           0 :         return py_srvsvc_NetTransportDel_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   49445             : }
   49446             : 
   49447           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49448             : {
   49449           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49450           0 :         PyObject *bigendian_obj = NULL;
   49451           0 :         PyObject *ndr64_obj = NULL;
   49452           0 :         libndr_flags ndr_push_flags = 0;
   49453             : 
   49454           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   49455             :                 discard_const_p(char *, kwnames),
   49456             :                 &bigendian_obj,
   49457             :                 &ndr64_obj)) {
   49458           0 :                 return NULL;
   49459             :         }
   49460             : 
   49461           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49462           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49463             :         }
   49464           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49465           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49466             :         }
   49467             : 
   49468           0 :         return py_srvsvc_NetTransportDel_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   49469             : }
   49470             : 
   49471           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   49472             : {
   49473           0 :         const struct ndr_interface_call *call = NULL;
   49474           0 :         struct srvsvc_NetTransportDel *object = pytalloc_get_ptr(py_obj);
   49475           0 :         struct ndr_pull *pull = NULL;
   49476           0 :         enum ndr_err_code err;
   49477             : 
   49478           0 :         if (ndr_table_srvsvc.num_calls < 28) {
   49479           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportDel_ndr_unpack");
   49480           0 :                 return NULL;
   49481             :         }
   49482           0 :         call = &ndr_table_srvsvc.calls[27];
   49483             : 
   49484           0 :         pull = ndr_pull_init_blob(blob, object);
   49485           0 :         if (pull == NULL) {
   49486           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   49487           0 :                 return NULL;
   49488             :         }
   49489             : 
   49490           0 :         pull->flags |= ndr_pull_flags;
   49491             : 
   49492           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   49493           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   49494           0 :                 TALLOC_FREE(pull);
   49495           0 :                 PyErr_SetNdrError(err);
   49496           0 :                 return NULL;
   49497             :         }
   49498           0 :         if (!allow_remaining) {
   49499           0 :                 uint32_t highest_ofs;
   49500             : 
   49501           0 :                 if (pull->offset > pull->relative_highest_offset) {
   49502           0 :                         highest_ofs = pull->offset;
   49503             :                 } else {
   49504           0 :                         highest_ofs = pull->relative_highest_offset;
   49505             :                 }
   49506           0 :                 if (highest_ofs < pull->data_size) {
   49507           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   49508             :                                 "not all bytes consumed ofs[%u] size[%u]",
   49509             :                                 highest_ofs, pull->data_size);
   49510           0 :                         TALLOC_FREE(pull);
   49511           0 :                         PyErr_SetNdrError(err);
   49512           0 :                         return NULL;
   49513             :                 }
   49514             :         }
   49515             : 
   49516           0 :         TALLOC_FREE(pull);
   49517           0 :         Py_RETURN_NONE;
   49518             : }
   49519             : 
   49520           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49521             : {
   49522           0 :         DATA_BLOB blob;
   49523           0 :         Py_ssize_t blob_length = 0;
   49524           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   49525           0 :         PyObject *bigendian_obj = NULL;
   49526           0 :         PyObject *ndr64_obj = NULL;
   49527           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   49528           0 :         PyObject *allow_remaining_obj = NULL;
   49529           0 :         bool allow_remaining = false;
   49530             : 
   49531           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   49532             :                 discard_const_p(char *, kwnames),
   49533             :                 &blob.data, &blob_length,
   49534             :                 &bigendian_obj,
   49535             :                 &ndr64_obj,
   49536             :                 &allow_remaining_obj)) {
   49537           0 :                 return NULL;
   49538             :         }
   49539           0 :         blob.length = blob_length;
   49540             : 
   49541           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49542           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   49543             :         }
   49544           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49545           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   49546             :         }
   49547             : 
   49548           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   49549           0 :                 allow_remaining = true;
   49550             :         }
   49551             : 
   49552           0 :         return py_srvsvc_NetTransportDel_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   49553             : }
   49554             : 
   49555           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49556             : {
   49557           0 :         DATA_BLOB blob;
   49558           0 :         Py_ssize_t blob_length = 0;
   49559           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   49560           0 :         PyObject *bigendian_obj = NULL;
   49561           0 :         PyObject *ndr64_obj = NULL;
   49562           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   49563           0 :         PyObject *allow_remaining_obj = NULL;
   49564           0 :         bool allow_remaining = false;
   49565             : 
   49566           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   49567             :                 discard_const_p(char *, kwnames),
   49568             :                 &blob.data, &blob_length,
   49569             :                 &bigendian_obj,
   49570             :                 &ndr64_obj,
   49571             :                 &allow_remaining_obj)) {
   49572           0 :                 return NULL;
   49573             :         }
   49574           0 :         blob.length = blob_length;
   49575             : 
   49576           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49577           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   49578             :         }
   49579           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49580           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   49581             :         }
   49582             : 
   49583           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   49584           0 :                 allow_remaining = true;
   49585             :         }
   49586             : 
   49587           0 :         return py_srvsvc_NetTransportDel_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   49588             : }
   49589             : 
   49590           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   49591             : {
   49592           0 :         const struct ndr_interface_call *call = NULL;
   49593           0 :         struct srvsvc_NetTransportDel *object = pytalloc_get_ptr(py_obj);
   49594           0 :         PyObject *ret;
   49595           0 :         char *retstr;
   49596             : 
   49597           0 :         if (ndr_table_srvsvc.num_calls < 28) {
   49598           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportDel_ndr_print");
   49599           0 :                 return NULL;
   49600             :         }
   49601           0 :         call = &ndr_table_srvsvc.calls[27];
   49602             : 
   49603           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   49604           0 :         ret = PyUnicode_FromString(retstr);
   49605           0 :         TALLOC_FREE(retstr);
   49606             : 
   49607           0 :         return ret;
   49608             : }
   49609             : 
   49610           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49611             : {
   49612           0 :         return py_srvsvc_NetTransportDel_ndr_print(py_obj, "srvsvc_NetTransportDel_in", NDR_IN);
   49613             : }
   49614             : 
   49615           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49616             : {
   49617           0 :         return py_srvsvc_NetTransportDel_ndr_print(py_obj, "srvsvc_NetTransportDel_out", NDR_OUT);
   49618             : }
   49619             : 
   49620             : static PyMethodDef py_srvsvc_NetTransportDel_methods[] = {
   49621             :         { "opnum", (PyCFunction)py_srvsvc_NetTransportDel_ndr_opnum, METH_NOARGS|METH_CLASS,
   49622             :                 "srvsvc.NetTransportDel.opnum() -> 27 (0x1b) " },
   49623             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportDel_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   49624             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   49625             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportDel_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   49626             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   49627             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportDel_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   49628             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   49629             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportDel_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   49630             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   49631             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetTransportDel_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   49632             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetTransportDel_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   49633             :         { NULL, NULL, 0, NULL }
   49634             : };
   49635             : 
   49636             : 
   49637             : static PyTypeObject srvsvc_NetTransportDel_Type = {
   49638             :         PyVarObject_HEAD_INIT(NULL, 0)
   49639             :         .tp_name = "srvsvc.NetTransportDel",
   49640             :         .tp_getset = py_srvsvc_NetTransportDel_getsetters,
   49641             :         .tp_methods = py_srvsvc_NetTransportDel_methods,
   49642             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   49643             :         .tp_new = py_srvsvc_NetTransportDel_new,
   49644             : };
   49645             : 
   49646           0 : static bool pack_py_srvsvc_NetTransportDel_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetTransportDel *r)
   49647             : {
   49648           0 :         PyObject *py_server_unc;
   49649           0 :         PyObject *py_level;
   49650           0 :         PyObject *py_info0;
   49651           0 :         const char *kwnames[] = {
   49652             :                 "server_unc", "level", "info0", NULL
   49653             :         };
   49654             : 
   49655           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetTransportDel", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info0)) {
   49656           0 :                 return false;
   49657             :         }
   49658             : 
   49659           0 :         if (py_server_unc == NULL) {
   49660           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   49661           0 :                 return false;
   49662             :         }
   49663           0 :         if (py_server_unc == Py_None) {
   49664           0 :                 r->in.server_unc = NULL;
   49665             :         } else {
   49666           0 :                 r->in.server_unc = NULL;
   49667             :                 {
   49668           0 :                         const char *test_str;
   49669           0 :                         const char *talloc_str;
   49670           0 :                         PyObject *unicode = NULL;
   49671           0 :                         if (PyUnicode_Check(py_server_unc)) {
   49672           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   49673           0 :                                 if (unicode == NULL) {
   49674           0 :                                         return false;
   49675             :                                 }
   49676           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49677           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   49678           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   49679             :                         } else {
   49680           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   49681           0 :                                 return false;
   49682             :                         }
   49683           0 :                         talloc_str = talloc_strdup(r, test_str);
   49684           0 :                         if (unicode != NULL) {
   49685           0 :                                 Py_DECREF(unicode);
   49686             :                         }
   49687           0 :                         if (talloc_str == NULL) {
   49688           0 :                                 PyErr_NoMemory();
   49689           0 :                                 return false;
   49690             :                         }
   49691           0 :                         r->in.server_unc = talloc_str;
   49692             :                 }
   49693             :         }
   49694           0 :         if (py_level == NULL) {
   49695           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   49696           0 :                 return false;
   49697             :         }
   49698             :         {
   49699           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   49700           0 :                 if (PyLong_Check(py_level)) {
   49701           0 :                         unsigned long long test_var;
   49702           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   49703           0 :                         if (PyErr_Occurred() != NULL) {
   49704           0 :                                 return false;
   49705             :                         }
   49706           0 :                         if (test_var > uint_max) {
   49707           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49708             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49709           0 :                                 return false;
   49710             :                         }
   49711           0 :                         r->in.level = test_var;
   49712             :                 } else {
   49713           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   49714             :                           PyLong_Type.tp_name);
   49715           0 :                         return false;
   49716             :                 }
   49717             :         }
   49718           0 :         if (py_info0 == NULL) {
   49719           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info0");
   49720           0 :                 return false;
   49721             :         }
   49722           0 :         r->in.info0 = talloc_ptrtype(r, r->in.info0);
   49723           0 :         if (r->in.info0 == NULL) {
   49724           0 :                 PyErr_NoMemory();
   49725           0 :                 return false;
   49726             :         }
   49727           0 :         PY_CHECK_TYPE(&srvsvc_NetTransportInfo0_Type, py_info0, return false;);
   49728           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info0)) == NULL) {
   49729           0 :                 PyErr_NoMemory();
   49730           0 :                 return false;
   49731             :         }
   49732           0 :         r->in.info0 = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_info0);
   49733           0 :         return true;
   49734             : }
   49735             : 
   49736           0 : static PyObject *unpack_py_srvsvc_NetTransportDel_args_out(struct srvsvc_NetTransportDel *r)
   49737             : {
   49738           0 :         PyObject *result;
   49739           0 :         result = Py_None;
   49740           0 :         Py_INCREF(result);
   49741           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   49742           0 :                 PyErr_SetWERROR(r->out.result);
   49743           0 :                 return NULL;
   49744             :         }
   49745             : 
   49746           0 :         return result;
   49747             : }
   49748             : 
   49749             : 
   49750           0 : static PyObject *py_srvsvc_NetRemoteTOD_in_get_server_unc(PyObject *obj, void *closure)
   49751             : {
   49752           0 :         struct srvsvc_NetRemoteTOD *object = pytalloc_get_ptr(obj);
   49753           0 :         PyObject *py_server_unc;
   49754           0 :         if (object->in.server_unc == NULL) {
   49755           0 :                 Py_RETURN_NONE;
   49756             :         }
   49757           0 :         if (object->in.server_unc == NULL) {
   49758           0 :                 py_server_unc = Py_None;
   49759           0 :                 Py_INCREF(py_server_unc);
   49760             :         } else {
   49761           0 :                 if (object->in.server_unc == NULL) {
   49762           0 :                         py_server_unc = Py_None;
   49763           0 :                         Py_INCREF(py_server_unc);
   49764             :                 } else {
   49765           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   49766             :                 }
   49767             :         }
   49768           0 :         return py_server_unc;
   49769             : }
   49770             : 
   49771           0 : static int py_srvsvc_NetRemoteTOD_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   49772             : {
   49773           0 :         struct srvsvc_NetRemoteTOD *object = pytalloc_get_ptr(py_obj);
   49774           0 :         if (value == NULL) {
   49775           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   49776           0 :                 return -1;
   49777             :         }
   49778           0 :         if (value == Py_None) {
   49779           0 :                 object->in.server_unc = NULL;
   49780             :         } else {
   49781           0 :                 object->in.server_unc = NULL;
   49782             :                 {
   49783           0 :                         const char *test_str;
   49784           0 :                         const char *talloc_str;
   49785           0 :                         PyObject *unicode = NULL;
   49786           0 :                         if (PyUnicode_Check(value)) {
   49787           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49788           0 :                                 if (unicode == NULL) {
   49789           0 :                                         return -1;
   49790             :                                 }
   49791           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49792           0 :                         } else if (PyBytes_Check(value)) {
   49793           0 :                                 test_str = PyBytes_AS_STRING(value);
   49794             :                         } else {
   49795           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49796           0 :                                 return -1;
   49797             :                         }
   49798           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49799           0 :                         if (unicode != NULL) {
   49800           0 :                                 Py_DECREF(unicode);
   49801             :                         }
   49802           0 :                         if (talloc_str == NULL) {
   49803           0 :                                 PyErr_NoMemory();
   49804           0 :                                 return -1;
   49805             :                         }
   49806           0 :                         object->in.server_unc = talloc_str;
   49807             :                 }
   49808             :         }
   49809           0 :         return 0;
   49810             : }
   49811             : 
   49812           0 : static PyObject *py_srvsvc_NetRemoteTOD_out_get_info(PyObject *obj, void *closure)
   49813             : {
   49814           0 :         struct srvsvc_NetRemoteTOD *object = pytalloc_get_ptr(obj);
   49815           0 :         PyObject *py_info;
   49816           0 :         if (object->out.info == NULL) {
   49817           0 :                 Py_RETURN_NONE;
   49818             :         }
   49819           0 :         if (*object->out.info == NULL) {
   49820           0 :                 py_info = Py_None;
   49821           0 :                 Py_INCREF(py_info);
   49822             :         } else {
   49823           0 :                 py_info = pytalloc_reference_ex(&srvsvc_NetRemoteTODInfo_Type, *object->out.info, *object->out.info);
   49824             :         }
   49825           0 :         return py_info;
   49826             : }
   49827             : 
   49828           0 : static int py_srvsvc_NetRemoteTOD_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   49829             : {
   49830           0 :         struct srvsvc_NetRemoteTOD *object = pytalloc_get_ptr(py_obj);
   49831           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   49832           0 :         if (value == NULL) {
   49833           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
   49834           0 :                 return -1;
   49835             :         }
   49836           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   49837           0 :         if (object->out.info == NULL) {
   49838           0 :                 PyErr_NoMemory();
   49839           0 :                 return -1;
   49840             :         }
   49841           0 :         if (value == Py_None) {
   49842           0 :                 *object->out.info = NULL;
   49843             :         } else {
   49844           0 :                 *object->out.info = NULL;
   49845           0 :                 PY_CHECK_TYPE(&srvsvc_NetRemoteTODInfo_Type, value, return -1;);
   49846           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49847           0 :                         PyErr_NoMemory();
   49848           0 :                         return -1;
   49849             :                 }
   49850           0 :                 *object->out.info = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(value);
   49851             :         }
   49852           0 :         return 0;
   49853             : }
   49854             : 
   49855           0 : static PyObject *py_srvsvc_NetRemoteTOD_get_result(PyObject *obj, void *closure)
   49856             : {
   49857           0 :         struct srvsvc_NetRemoteTOD *object = pytalloc_get_ptr(obj);
   49858           0 :         PyObject *py_result;
   49859           0 :         py_result = PyErr_FromWERROR(object->out.result);
   49860           0 :         return py_result;
   49861             : }
   49862             : 
   49863           0 : static int py_srvsvc_NetRemoteTOD_set_result(PyObject *py_obj, PyObject *value, void *closure)
   49864             : {
   49865           0 :         struct srvsvc_NetRemoteTOD *object = pytalloc_get_ptr(py_obj);
   49866           0 :         if (value == NULL) {
   49867           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   49868           0 :                 return -1;
   49869             :         }
   49870           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   49871           0 :         return 0;
   49872             : }
   49873             : 
   49874             : static PyGetSetDef py_srvsvc_NetRemoteTOD_getsetters[] = {
   49875             :         {
   49876             :                 .name = discard_const_p(char, "in_server_unc"),
   49877             :                 .get = py_srvsvc_NetRemoteTOD_in_get_server_unc,
   49878             :                 .set = py_srvsvc_NetRemoteTOD_in_set_server_unc,
   49879             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49880             :         },
   49881             :         {
   49882             :                 .name = discard_const_p(char, "out_info"),
   49883             :                 .get = py_srvsvc_NetRemoteTOD_out_get_info,
   49884             :                 .set = py_srvsvc_NetRemoteTOD_out_set_info,
   49885             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetRemoteTODInfo")
   49886             :         },
   49887             :         {
   49888             :                 .name = discard_const_p(char, "result"),
   49889             :                 .get = py_srvsvc_NetRemoteTOD_get_result,
   49890             :                 .set = py_srvsvc_NetRemoteTOD_set_result,
   49891             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   49892             :         },
   49893             :         { .name = NULL }
   49894             : };
   49895             : 
   49896           0 : static PyObject *py_srvsvc_NetRemoteTOD_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   49897             : {
   49898           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetRemoteTOD, type);
   49899           0 :         struct srvsvc_NetRemoteTOD *_self = (struct srvsvc_NetRemoteTOD *)pytalloc_get_ptr(self);
   49900           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   49901             :         /* a pointer to a NULL pointer */
   49902           0 :         _self->out.info = talloc_zero(mem_ctx, struct srvsvc_NetRemoteTODInfo *);
   49903           0 :         return self;
   49904             : }
   49905             : 
   49906           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   49907             : {
   49908             : 
   49909             : 
   49910           0 :         return PyLong_FromLong(28);
   49911             : }
   49912             : 
   49913           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   49914             : {
   49915           0 :         const struct ndr_interface_call *call = NULL;
   49916           0 :         struct srvsvc_NetRemoteTOD *object = pytalloc_get_ptr(py_obj);
   49917           0 :         PyObject *ret = NULL;
   49918           0 :         struct ndr_push *push = NULL;
   49919           0 :         DATA_BLOB blob;
   49920           0 :         enum ndr_err_code err;
   49921             : 
   49922           0 :         if (ndr_table_srvsvc.num_calls < 29) {
   49923           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetRemoteTOD_ndr_pack");
   49924           0 :                 return NULL;
   49925             :         }
   49926           0 :         call = &ndr_table_srvsvc.calls[28];
   49927             : 
   49928           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   49929           0 :         if (push == NULL) {
   49930           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   49931           0 :                 return NULL;
   49932             :         }
   49933             : 
   49934           0 :         push->flags |= ndr_push_flags;
   49935             : 
   49936           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   49937           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   49938           0 :                 TALLOC_FREE(push);
   49939           0 :                 PyErr_SetNdrError(err);
   49940           0 :                 return NULL;
   49941             :         }
   49942           0 :         blob = ndr_push_blob(push);
   49943           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   49944           0 :         TALLOC_FREE(push);
   49945           0 :         return ret;
   49946             : }
   49947             : 
   49948           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49949             : {
   49950           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49951           0 :         PyObject *bigendian_obj = NULL;
   49952           0 :         PyObject *ndr64_obj = NULL;
   49953           0 :         libndr_flags ndr_push_flags = 0;
   49954             : 
   49955           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   49956             :                 discard_const_p(char *, kwnames),
   49957             :                 &bigendian_obj,
   49958             :                 &ndr64_obj)) {
   49959           0 :                 return NULL;
   49960             :         }
   49961             : 
   49962           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49963           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49964             :         }
   49965           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49966           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49967             :         }
   49968             : 
   49969           0 :         return py_srvsvc_NetRemoteTOD_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   49970             : }
   49971             : 
   49972           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49973             : {
   49974           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49975           0 :         PyObject *bigendian_obj = NULL;
   49976           0 :         PyObject *ndr64_obj = NULL;
   49977           0 :         libndr_flags ndr_push_flags = 0;
   49978             : 
   49979           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   49980             :                 discard_const_p(char *, kwnames),
   49981             :                 &bigendian_obj,
   49982             :                 &ndr64_obj)) {
   49983           0 :                 return NULL;
   49984             :         }
   49985             : 
   49986           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49987           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49988             :         }
   49989           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49990           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49991             :         }
   49992             : 
   49993           0 :         return py_srvsvc_NetRemoteTOD_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   49994             : }
   49995             : 
   49996           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   49997             : {
   49998           0 :         const struct ndr_interface_call *call = NULL;
   49999           0 :         struct srvsvc_NetRemoteTOD *object = pytalloc_get_ptr(py_obj);
   50000           0 :         struct ndr_pull *pull = NULL;
   50001           0 :         enum ndr_err_code err;
   50002             : 
   50003           0 :         if (ndr_table_srvsvc.num_calls < 29) {
   50004           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetRemoteTOD_ndr_unpack");
   50005           0 :                 return NULL;
   50006             :         }
   50007           0 :         call = &ndr_table_srvsvc.calls[28];
   50008             : 
   50009           0 :         pull = ndr_pull_init_blob(blob, object);
   50010           0 :         if (pull == NULL) {
   50011           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50012           0 :                 return NULL;
   50013             :         }
   50014             : 
   50015           0 :         pull->flags |= ndr_pull_flags;
   50016             : 
   50017           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   50018           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50019           0 :                 TALLOC_FREE(pull);
   50020           0 :                 PyErr_SetNdrError(err);
   50021           0 :                 return NULL;
   50022             :         }
   50023           0 :         if (!allow_remaining) {
   50024           0 :                 uint32_t highest_ofs;
   50025             : 
   50026           0 :                 if (pull->offset > pull->relative_highest_offset) {
   50027           0 :                         highest_ofs = pull->offset;
   50028             :                 } else {
   50029           0 :                         highest_ofs = pull->relative_highest_offset;
   50030             :                 }
   50031           0 :                 if (highest_ofs < pull->data_size) {
   50032           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   50033             :                                 "not all bytes consumed ofs[%u] size[%u]",
   50034             :                                 highest_ofs, pull->data_size);
   50035           0 :                         TALLOC_FREE(pull);
   50036           0 :                         PyErr_SetNdrError(err);
   50037           0 :                         return NULL;
   50038             :                 }
   50039             :         }
   50040             : 
   50041           0 :         TALLOC_FREE(pull);
   50042           0 :         Py_RETURN_NONE;
   50043             : }
   50044             : 
   50045           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50046             : {
   50047           0 :         DATA_BLOB blob;
   50048           0 :         Py_ssize_t blob_length = 0;
   50049           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50050           0 :         PyObject *bigendian_obj = NULL;
   50051           0 :         PyObject *ndr64_obj = NULL;
   50052           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50053           0 :         PyObject *allow_remaining_obj = NULL;
   50054           0 :         bool allow_remaining = false;
   50055             : 
   50056           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   50057             :                 discard_const_p(char *, kwnames),
   50058             :                 &blob.data, &blob_length,
   50059             :                 &bigendian_obj,
   50060             :                 &ndr64_obj,
   50061             :                 &allow_remaining_obj)) {
   50062           0 :                 return NULL;
   50063             :         }
   50064           0 :         blob.length = blob_length;
   50065             : 
   50066           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50067           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50068             :         }
   50069           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50070           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50071             :         }
   50072             : 
   50073           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50074           0 :                 allow_remaining = true;
   50075             :         }
   50076             : 
   50077           0 :         return py_srvsvc_NetRemoteTOD_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   50078             : }
   50079             : 
   50080           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50081             : {
   50082           0 :         DATA_BLOB blob;
   50083           0 :         Py_ssize_t blob_length = 0;
   50084           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50085           0 :         PyObject *bigendian_obj = NULL;
   50086           0 :         PyObject *ndr64_obj = NULL;
   50087           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50088           0 :         PyObject *allow_remaining_obj = NULL;
   50089           0 :         bool allow_remaining = false;
   50090             : 
   50091           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   50092             :                 discard_const_p(char *, kwnames),
   50093             :                 &blob.data, &blob_length,
   50094             :                 &bigendian_obj,
   50095             :                 &ndr64_obj,
   50096             :                 &allow_remaining_obj)) {
   50097           0 :                 return NULL;
   50098             :         }
   50099           0 :         blob.length = blob_length;
   50100             : 
   50101           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50102           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50103             :         }
   50104           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50105           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50106             :         }
   50107             : 
   50108           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50109           0 :                 allow_remaining = true;
   50110             :         }
   50111             : 
   50112           0 :         return py_srvsvc_NetRemoteTOD_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   50113             : }
   50114             : 
   50115           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   50116             : {
   50117           0 :         const struct ndr_interface_call *call = NULL;
   50118           0 :         struct srvsvc_NetRemoteTOD *object = pytalloc_get_ptr(py_obj);
   50119           0 :         PyObject *ret;
   50120           0 :         char *retstr;
   50121             : 
   50122           0 :         if (ndr_table_srvsvc.num_calls < 29) {
   50123           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetRemoteTOD_ndr_print");
   50124           0 :                 return NULL;
   50125             :         }
   50126           0 :         call = &ndr_table_srvsvc.calls[28];
   50127             : 
   50128           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   50129           0 :         ret = PyUnicode_FromString(retstr);
   50130           0 :         TALLOC_FREE(retstr);
   50131             : 
   50132           0 :         return ret;
   50133             : }
   50134             : 
   50135           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50136             : {
   50137           0 :         return py_srvsvc_NetRemoteTOD_ndr_print(py_obj, "srvsvc_NetRemoteTOD_in", NDR_IN);
   50138             : }
   50139             : 
   50140           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50141             : {
   50142           0 :         return py_srvsvc_NetRemoteTOD_ndr_print(py_obj, "srvsvc_NetRemoteTOD_out", NDR_OUT);
   50143             : }
   50144             : 
   50145             : static PyMethodDef py_srvsvc_NetRemoteTOD_methods[] = {
   50146             :         { "opnum", (PyCFunction)py_srvsvc_NetRemoteTOD_ndr_opnum, METH_NOARGS|METH_CLASS,
   50147             :                 "srvsvc.NetRemoteTOD.opnum() -> 28 (0x1c) " },
   50148             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetRemoteTOD_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   50149             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   50150             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetRemoteTOD_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   50151             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   50152             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetRemoteTOD_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   50153             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   50154             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetRemoteTOD_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   50155             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   50156             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetRemoteTOD_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   50157             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetRemoteTOD_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   50158             :         { NULL, NULL, 0, NULL }
   50159             : };
   50160             : 
   50161             : 
   50162             : static PyTypeObject srvsvc_NetRemoteTOD_Type = {
   50163             :         PyVarObject_HEAD_INIT(NULL, 0)
   50164             :         .tp_name = "srvsvc.NetRemoteTOD",
   50165             :         .tp_getset = py_srvsvc_NetRemoteTOD_getsetters,
   50166             :         .tp_methods = py_srvsvc_NetRemoteTOD_methods,
   50167             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   50168             :         .tp_new = py_srvsvc_NetRemoteTOD_new,
   50169             : };
   50170             : 
   50171           0 : static bool pack_py_srvsvc_NetRemoteTOD_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetRemoteTOD *r)
   50172             : {
   50173           0 :         PyObject *py_server_unc;
   50174           0 :         const char *kwnames[] = {
   50175             :                 "server_unc", NULL
   50176             :         };
   50177             : 
   50178           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:srvsvc_NetRemoteTOD", discard_const_p(char *, kwnames), &py_server_unc)) {
   50179           0 :                 return false;
   50180             :         }
   50181             : 
   50182           0 :         if (py_server_unc == NULL) {
   50183           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   50184           0 :                 return false;
   50185             :         }
   50186           0 :         if (py_server_unc == Py_None) {
   50187           0 :                 r->in.server_unc = NULL;
   50188             :         } else {
   50189           0 :                 r->in.server_unc = NULL;
   50190             :                 {
   50191           0 :                         const char *test_str;
   50192           0 :                         const char *talloc_str;
   50193           0 :                         PyObject *unicode = NULL;
   50194           0 :                         if (PyUnicode_Check(py_server_unc)) {
   50195           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   50196           0 :                                 if (unicode == NULL) {
   50197           0 :                                         return false;
   50198             :                                 }
   50199           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50200           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   50201           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   50202             :                         } else {
   50203           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   50204           0 :                                 return false;
   50205             :                         }
   50206           0 :                         talloc_str = talloc_strdup(r, test_str);
   50207           0 :                         if (unicode != NULL) {
   50208           0 :                                 Py_DECREF(unicode);
   50209             :                         }
   50210           0 :                         if (talloc_str == NULL) {
   50211           0 :                                 PyErr_NoMemory();
   50212           0 :                                 return false;
   50213             :                         }
   50214           0 :                         r->in.server_unc = talloc_str;
   50215             :                 }
   50216             :         }
   50217           0 :         return true;
   50218             : }
   50219             : 
   50220           0 : static PyObject *unpack_py_srvsvc_NetRemoteTOD_args_out(struct srvsvc_NetRemoteTOD *r)
   50221             : {
   50222           0 :         PyObject *result;
   50223           0 :         PyObject *py_info;
   50224           0 :         if (*r->out.info == NULL) {
   50225           0 :                 py_info = Py_None;
   50226           0 :                 Py_INCREF(py_info);
   50227             :         } else {
   50228           0 :                 py_info = pytalloc_reference_ex(&srvsvc_NetRemoteTODInfo_Type, *r->out.info, *r->out.info);
   50229             :         }
   50230           0 :         result = py_info;
   50231           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   50232           0 :                 PyErr_SetWERROR(r->out.result);
   50233           0 :                 return NULL;
   50234             :         }
   50235             : 
   50236           0 :         return result;
   50237             : }
   50238             : 
   50239             : 
   50240           0 : static PyObject *py_srvsvc_NetSetServiceBits_in_get_server_unc(PyObject *obj, void *closure)
   50241             : {
   50242           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(obj);
   50243           0 :         PyObject *py_server_unc;
   50244           0 :         if (object->in.server_unc == NULL) {
   50245           0 :                 Py_RETURN_NONE;
   50246             :         }
   50247           0 :         if (object->in.server_unc == NULL) {
   50248           0 :                 py_server_unc = Py_None;
   50249           0 :                 Py_INCREF(py_server_unc);
   50250             :         } else {
   50251           0 :                 if (object->in.server_unc == NULL) {
   50252           0 :                         py_server_unc = Py_None;
   50253           0 :                         Py_INCREF(py_server_unc);
   50254             :                 } else {
   50255           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   50256             :                 }
   50257             :         }
   50258           0 :         return py_server_unc;
   50259             : }
   50260             : 
   50261           0 : static int py_srvsvc_NetSetServiceBits_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   50262             : {
   50263           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(py_obj);
   50264           0 :         if (value == NULL) {
   50265           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   50266           0 :                 return -1;
   50267             :         }
   50268           0 :         if (value == Py_None) {
   50269           0 :                 object->in.server_unc = NULL;
   50270             :         } else {
   50271           0 :                 object->in.server_unc = NULL;
   50272             :                 {
   50273           0 :                         const char *test_str;
   50274           0 :                         const char *talloc_str;
   50275           0 :                         PyObject *unicode = NULL;
   50276           0 :                         if (PyUnicode_Check(value)) {
   50277           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   50278           0 :                                 if (unicode == NULL) {
   50279           0 :                                         return -1;
   50280             :                                 }
   50281           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50282           0 :                         } else if (PyBytes_Check(value)) {
   50283           0 :                                 test_str = PyBytes_AS_STRING(value);
   50284             :                         } else {
   50285           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   50286           0 :                                 return -1;
   50287             :                         }
   50288           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   50289           0 :                         if (unicode != NULL) {
   50290           0 :                                 Py_DECREF(unicode);
   50291             :                         }
   50292           0 :                         if (talloc_str == NULL) {
   50293           0 :                                 PyErr_NoMemory();
   50294           0 :                                 return -1;
   50295             :                         }
   50296           0 :                         object->in.server_unc = talloc_str;
   50297             :                 }
   50298             :         }
   50299           0 :         return 0;
   50300             : }
   50301             : 
   50302           0 : static PyObject *py_srvsvc_NetSetServiceBits_in_get_transport(PyObject *obj, void *closure)
   50303             : {
   50304           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(obj);
   50305           0 :         PyObject *py_transport;
   50306           0 :         if (object->in.transport == NULL) {
   50307           0 :                 Py_RETURN_NONE;
   50308             :         }
   50309           0 :         if (object->in.transport == NULL) {
   50310           0 :                 py_transport = Py_None;
   50311           0 :                 Py_INCREF(py_transport);
   50312             :         } else {
   50313           0 :                 if (object->in.transport == NULL) {
   50314           0 :                         py_transport = Py_None;
   50315           0 :                         Py_INCREF(py_transport);
   50316             :                 } else {
   50317           0 :                         py_transport = PyUnicode_Decode(object->in.transport, strlen(object->in.transport), "utf-8", "ignore");
   50318             :                 }
   50319             :         }
   50320           0 :         return py_transport;
   50321             : }
   50322             : 
   50323           0 : static int py_srvsvc_NetSetServiceBits_in_set_transport(PyObject *py_obj, PyObject *value, void *closure)
   50324             : {
   50325           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(py_obj);
   50326           0 :         if (value == NULL) {
   50327           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.transport");
   50328           0 :                 return -1;
   50329             :         }
   50330           0 :         if (value == Py_None) {
   50331           0 :                 object->in.transport = NULL;
   50332             :         } else {
   50333           0 :                 object->in.transport = NULL;
   50334             :                 {
   50335           0 :                         const char *test_str;
   50336           0 :                         const char *talloc_str;
   50337           0 :                         PyObject *unicode = NULL;
   50338           0 :                         if (PyUnicode_Check(value)) {
   50339           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   50340           0 :                                 if (unicode == NULL) {
   50341           0 :                                         return -1;
   50342             :                                 }
   50343           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50344           0 :                         } else if (PyBytes_Check(value)) {
   50345           0 :                                 test_str = PyBytes_AS_STRING(value);
   50346             :                         } else {
   50347           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   50348           0 :                                 return -1;
   50349             :                         }
   50350           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   50351           0 :                         if (unicode != NULL) {
   50352           0 :                                 Py_DECREF(unicode);
   50353             :                         }
   50354           0 :                         if (talloc_str == NULL) {
   50355           0 :                                 PyErr_NoMemory();
   50356           0 :                                 return -1;
   50357             :                         }
   50358           0 :                         object->in.transport = talloc_str;
   50359             :                 }
   50360             :         }
   50361           0 :         return 0;
   50362             : }
   50363             : 
   50364           0 : static PyObject *py_srvsvc_NetSetServiceBits_in_get_servicebits(PyObject *obj, void *closure)
   50365             : {
   50366           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(obj);
   50367           0 :         PyObject *py_servicebits;
   50368           0 :         py_servicebits = PyLong_FromUnsignedLongLong((uint32_t)(object->in.servicebits));
   50369           0 :         return py_servicebits;
   50370             : }
   50371             : 
   50372           0 : static int py_srvsvc_NetSetServiceBits_in_set_servicebits(PyObject *py_obj, PyObject *value, void *closure)
   50373             : {
   50374           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(py_obj);
   50375           0 :         if (value == NULL) {
   50376           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servicebits");
   50377           0 :                 return -1;
   50378             :         }
   50379             :         {
   50380           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.servicebits));
   50381           0 :                 if (PyLong_Check(value)) {
   50382           0 :                         unsigned long long test_var;
   50383           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   50384           0 :                         if (PyErr_Occurred() != NULL) {
   50385           0 :                                 return -1;
   50386             :                         }
   50387           0 :                         if (test_var > uint_max) {
   50388           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50389             :                                   PyLong_Type.tp_name, uint_max, test_var);
   50390           0 :                                 return -1;
   50391             :                         }
   50392           0 :                         object->in.servicebits = test_var;
   50393             :                 } else {
   50394           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50395             :                           PyLong_Type.tp_name);
   50396           0 :                         return -1;
   50397             :                 }
   50398             :         }
   50399           0 :         return 0;
   50400             : }
   50401             : 
   50402           0 : static PyObject *py_srvsvc_NetSetServiceBits_in_get_updateimmediately(PyObject *obj, void *closure)
   50403             : {
   50404           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(obj);
   50405           0 :         PyObject *py_updateimmediately;
   50406           0 :         py_updateimmediately = PyLong_FromUnsignedLongLong((uint32_t)(object->in.updateimmediately));
   50407           0 :         return py_updateimmediately;
   50408             : }
   50409             : 
   50410           0 : static int py_srvsvc_NetSetServiceBits_in_set_updateimmediately(PyObject *py_obj, PyObject *value, void *closure)
   50411             : {
   50412           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(py_obj);
   50413           0 :         if (value == NULL) {
   50414           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.updateimmediately");
   50415           0 :                 return -1;
   50416             :         }
   50417             :         {
   50418           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.updateimmediately));
   50419           0 :                 if (PyLong_Check(value)) {
   50420           0 :                         unsigned long long test_var;
   50421           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   50422           0 :                         if (PyErr_Occurred() != NULL) {
   50423           0 :                                 return -1;
   50424             :                         }
   50425           0 :                         if (test_var > uint_max) {
   50426           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50427             :                                   PyLong_Type.tp_name, uint_max, test_var);
   50428           0 :                                 return -1;
   50429             :                         }
   50430           0 :                         object->in.updateimmediately = test_var;
   50431             :                 } else {
   50432           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50433             :                           PyLong_Type.tp_name);
   50434           0 :                         return -1;
   50435             :                 }
   50436             :         }
   50437           0 :         return 0;
   50438             : }
   50439             : 
   50440           0 : static PyObject *py_srvsvc_NetSetServiceBits_get_result(PyObject *obj, void *closure)
   50441             : {
   50442           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(obj);
   50443           0 :         PyObject *py_result;
   50444           0 :         py_result = PyErr_FromWERROR(object->out.result);
   50445           0 :         return py_result;
   50446             : }
   50447             : 
   50448           0 : static int py_srvsvc_NetSetServiceBits_set_result(PyObject *py_obj, PyObject *value, void *closure)
   50449             : {
   50450           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(py_obj);
   50451           0 :         if (value == NULL) {
   50452           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   50453           0 :                 return -1;
   50454             :         }
   50455           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   50456           0 :         return 0;
   50457             : }
   50458             : 
   50459             : static PyGetSetDef py_srvsvc_NetSetServiceBits_getsetters[] = {
   50460             :         {
   50461             :                 .name = discard_const_p(char, "in_server_unc"),
   50462             :                 .get = py_srvsvc_NetSetServiceBits_in_get_server_unc,
   50463             :                 .set = py_srvsvc_NetSetServiceBits_in_set_server_unc,
   50464             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   50465             :         },
   50466             :         {
   50467             :                 .name = discard_const_p(char, "in_transport"),
   50468             :                 .get = py_srvsvc_NetSetServiceBits_in_get_transport,
   50469             :                 .set = py_srvsvc_NetSetServiceBits_in_set_transport,
   50470             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   50471             :         },
   50472             :         {
   50473             :                 .name = discard_const_p(char, "in_servicebits"),
   50474             :                 .get = py_srvsvc_NetSetServiceBits_in_get_servicebits,
   50475             :                 .set = py_srvsvc_NetSetServiceBits_in_set_servicebits,
   50476             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   50477             :         },
   50478             :         {
   50479             :                 .name = discard_const_p(char, "in_updateimmediately"),
   50480             :                 .get = py_srvsvc_NetSetServiceBits_in_get_updateimmediately,
   50481             :                 .set = py_srvsvc_NetSetServiceBits_in_set_updateimmediately,
   50482             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   50483             :         },
   50484             :         {
   50485             :                 .name = discard_const_p(char, "result"),
   50486             :                 .get = py_srvsvc_NetSetServiceBits_get_result,
   50487             :                 .set = py_srvsvc_NetSetServiceBits_set_result,
   50488             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   50489             :         },
   50490             :         { .name = NULL }
   50491             : };
   50492             : 
   50493           0 : static PyObject *py_srvsvc_NetSetServiceBits_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   50494             : {
   50495           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetSetServiceBits, type);
   50496           0 :         return self;
   50497             : }
   50498             : 
   50499           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   50500             : {
   50501             : 
   50502             : 
   50503           0 :         return PyLong_FromLong(29);
   50504             : }
   50505             : 
   50506           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   50507             : {
   50508           0 :         const struct ndr_interface_call *call = NULL;
   50509           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(py_obj);
   50510           0 :         PyObject *ret = NULL;
   50511           0 :         struct ndr_push *push = NULL;
   50512           0 :         DATA_BLOB blob;
   50513           0 :         enum ndr_err_code err;
   50514             : 
   50515           0 :         if (ndr_table_srvsvc.num_calls < 30) {
   50516           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSetServiceBits_ndr_pack");
   50517           0 :                 return NULL;
   50518             :         }
   50519           0 :         call = &ndr_table_srvsvc.calls[29];
   50520             : 
   50521           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   50522           0 :         if (push == NULL) {
   50523           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50524           0 :                 return NULL;
   50525             :         }
   50526             : 
   50527           0 :         push->flags |= ndr_push_flags;
   50528             : 
   50529           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   50530           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50531           0 :                 TALLOC_FREE(push);
   50532           0 :                 PyErr_SetNdrError(err);
   50533           0 :                 return NULL;
   50534             :         }
   50535           0 :         blob = ndr_push_blob(push);
   50536           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   50537           0 :         TALLOC_FREE(push);
   50538           0 :         return ret;
   50539             : }
   50540             : 
   50541           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50542             : {
   50543           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50544           0 :         PyObject *bigendian_obj = NULL;
   50545           0 :         PyObject *ndr64_obj = NULL;
   50546           0 :         libndr_flags ndr_push_flags = 0;
   50547             : 
   50548           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   50549             :                 discard_const_p(char *, kwnames),
   50550             :                 &bigendian_obj,
   50551             :                 &ndr64_obj)) {
   50552           0 :                 return NULL;
   50553             :         }
   50554             : 
   50555           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50556           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50557             :         }
   50558           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50559           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50560             :         }
   50561             : 
   50562           0 :         return py_srvsvc_NetSetServiceBits_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   50563             : }
   50564             : 
   50565           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50566             : {
   50567           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50568           0 :         PyObject *bigendian_obj = NULL;
   50569           0 :         PyObject *ndr64_obj = NULL;
   50570           0 :         libndr_flags ndr_push_flags = 0;
   50571             : 
   50572           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   50573             :                 discard_const_p(char *, kwnames),
   50574             :                 &bigendian_obj,
   50575             :                 &ndr64_obj)) {
   50576           0 :                 return NULL;
   50577             :         }
   50578             : 
   50579           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50580           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50581             :         }
   50582           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50583           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50584             :         }
   50585             : 
   50586           0 :         return py_srvsvc_NetSetServiceBits_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   50587             : }
   50588             : 
   50589           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   50590             : {
   50591           0 :         const struct ndr_interface_call *call = NULL;
   50592           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(py_obj);
   50593           0 :         struct ndr_pull *pull = NULL;
   50594           0 :         enum ndr_err_code err;
   50595             : 
   50596           0 :         if (ndr_table_srvsvc.num_calls < 30) {
   50597           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSetServiceBits_ndr_unpack");
   50598           0 :                 return NULL;
   50599             :         }
   50600           0 :         call = &ndr_table_srvsvc.calls[29];
   50601             : 
   50602           0 :         pull = ndr_pull_init_blob(blob, object);
   50603           0 :         if (pull == NULL) {
   50604           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50605           0 :                 return NULL;
   50606             :         }
   50607             : 
   50608           0 :         pull->flags |= ndr_pull_flags;
   50609             : 
   50610           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   50611           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50612           0 :                 TALLOC_FREE(pull);
   50613           0 :                 PyErr_SetNdrError(err);
   50614           0 :                 return NULL;
   50615             :         }
   50616           0 :         if (!allow_remaining) {
   50617           0 :                 uint32_t highest_ofs;
   50618             : 
   50619           0 :                 if (pull->offset > pull->relative_highest_offset) {
   50620           0 :                         highest_ofs = pull->offset;
   50621             :                 } else {
   50622           0 :                         highest_ofs = pull->relative_highest_offset;
   50623             :                 }
   50624           0 :                 if (highest_ofs < pull->data_size) {
   50625           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   50626             :                                 "not all bytes consumed ofs[%u] size[%u]",
   50627             :                                 highest_ofs, pull->data_size);
   50628           0 :                         TALLOC_FREE(pull);
   50629           0 :                         PyErr_SetNdrError(err);
   50630           0 :                         return NULL;
   50631             :                 }
   50632             :         }
   50633             : 
   50634           0 :         TALLOC_FREE(pull);
   50635           0 :         Py_RETURN_NONE;
   50636             : }
   50637             : 
   50638           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50639             : {
   50640           0 :         DATA_BLOB blob;
   50641           0 :         Py_ssize_t blob_length = 0;
   50642           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50643           0 :         PyObject *bigendian_obj = NULL;
   50644           0 :         PyObject *ndr64_obj = NULL;
   50645           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50646           0 :         PyObject *allow_remaining_obj = NULL;
   50647           0 :         bool allow_remaining = false;
   50648             : 
   50649           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   50650             :                 discard_const_p(char *, kwnames),
   50651             :                 &blob.data, &blob_length,
   50652             :                 &bigendian_obj,
   50653             :                 &ndr64_obj,
   50654             :                 &allow_remaining_obj)) {
   50655           0 :                 return NULL;
   50656             :         }
   50657           0 :         blob.length = blob_length;
   50658             : 
   50659           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50660           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50661             :         }
   50662           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50663           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50664             :         }
   50665             : 
   50666           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50667           0 :                 allow_remaining = true;
   50668             :         }
   50669             : 
   50670           0 :         return py_srvsvc_NetSetServiceBits_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   50671             : }
   50672             : 
   50673           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50674             : {
   50675           0 :         DATA_BLOB blob;
   50676           0 :         Py_ssize_t blob_length = 0;
   50677           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50678           0 :         PyObject *bigendian_obj = NULL;
   50679           0 :         PyObject *ndr64_obj = NULL;
   50680           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50681           0 :         PyObject *allow_remaining_obj = NULL;
   50682           0 :         bool allow_remaining = false;
   50683             : 
   50684           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   50685             :                 discard_const_p(char *, kwnames),
   50686             :                 &blob.data, &blob_length,
   50687             :                 &bigendian_obj,
   50688             :                 &ndr64_obj,
   50689             :                 &allow_remaining_obj)) {
   50690           0 :                 return NULL;
   50691             :         }
   50692           0 :         blob.length = blob_length;
   50693             : 
   50694           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50695           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50696             :         }
   50697           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50698           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50699             :         }
   50700             : 
   50701           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50702           0 :                 allow_remaining = true;
   50703             :         }
   50704             : 
   50705           0 :         return py_srvsvc_NetSetServiceBits_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   50706             : }
   50707             : 
   50708           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   50709             : {
   50710           0 :         const struct ndr_interface_call *call = NULL;
   50711           0 :         struct srvsvc_NetSetServiceBits *object = pytalloc_get_ptr(py_obj);
   50712           0 :         PyObject *ret;
   50713           0 :         char *retstr;
   50714             : 
   50715           0 :         if (ndr_table_srvsvc.num_calls < 30) {
   50716           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSetServiceBits_ndr_print");
   50717           0 :                 return NULL;
   50718             :         }
   50719           0 :         call = &ndr_table_srvsvc.calls[29];
   50720             : 
   50721           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   50722           0 :         ret = PyUnicode_FromString(retstr);
   50723           0 :         TALLOC_FREE(retstr);
   50724             : 
   50725           0 :         return ret;
   50726             : }
   50727             : 
   50728           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50729             : {
   50730           0 :         return py_srvsvc_NetSetServiceBits_ndr_print(py_obj, "srvsvc_NetSetServiceBits_in", NDR_IN);
   50731             : }
   50732             : 
   50733           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50734             : {
   50735           0 :         return py_srvsvc_NetSetServiceBits_ndr_print(py_obj, "srvsvc_NetSetServiceBits_out", NDR_OUT);
   50736             : }
   50737             : 
   50738             : static PyMethodDef py_srvsvc_NetSetServiceBits_methods[] = {
   50739             :         { "opnum", (PyCFunction)py_srvsvc_NetSetServiceBits_ndr_opnum, METH_NOARGS|METH_CLASS,
   50740             :                 "srvsvc.NetSetServiceBits.opnum() -> 29 (0x1d) " },
   50741             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetServiceBits_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   50742             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   50743             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetServiceBits_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   50744             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   50745             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetServiceBits_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   50746             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   50747             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetServiceBits_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   50748             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   50749             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetSetServiceBits_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   50750             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetSetServiceBits_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   50751             :         { NULL, NULL, 0, NULL }
   50752             : };
   50753             : 
   50754             : 
   50755             : static PyTypeObject srvsvc_NetSetServiceBits_Type = {
   50756             :         PyVarObject_HEAD_INIT(NULL, 0)
   50757             :         .tp_name = "srvsvc.NetSetServiceBits",
   50758             :         .tp_getset = py_srvsvc_NetSetServiceBits_getsetters,
   50759             :         .tp_methods = py_srvsvc_NetSetServiceBits_methods,
   50760             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   50761             :         .tp_new = py_srvsvc_NetSetServiceBits_new,
   50762             : };
   50763             : 
   50764           0 : static bool pack_py_srvsvc_NetSetServiceBits_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSetServiceBits *r)
   50765             : {
   50766           0 :         PyObject *py_server_unc;
   50767           0 :         PyObject *py_transport;
   50768           0 :         PyObject *py_servicebits;
   50769           0 :         PyObject *py_updateimmediately;
   50770           0 :         const char *kwnames[] = {
   50771             :                 "server_unc", "transport", "servicebits", "updateimmediately", NULL
   50772             :         };
   50773             : 
   50774           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetSetServiceBits", discard_const_p(char *, kwnames), &py_server_unc, &py_transport, &py_servicebits, &py_updateimmediately)) {
   50775           0 :                 return false;
   50776             :         }
   50777             : 
   50778           0 :         if (py_server_unc == NULL) {
   50779           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   50780           0 :                 return false;
   50781             :         }
   50782           0 :         if (py_server_unc == Py_None) {
   50783           0 :                 r->in.server_unc = NULL;
   50784             :         } else {
   50785           0 :                 r->in.server_unc = NULL;
   50786             :                 {
   50787           0 :                         const char *test_str;
   50788           0 :                         const char *talloc_str;
   50789           0 :                         PyObject *unicode = NULL;
   50790           0 :                         if (PyUnicode_Check(py_server_unc)) {
   50791           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   50792           0 :                                 if (unicode == NULL) {
   50793           0 :                                         return false;
   50794             :                                 }
   50795           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50796           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   50797           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   50798             :                         } else {
   50799           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   50800           0 :                                 return false;
   50801             :                         }
   50802           0 :                         talloc_str = talloc_strdup(r, test_str);
   50803           0 :                         if (unicode != NULL) {
   50804           0 :                                 Py_DECREF(unicode);
   50805             :                         }
   50806           0 :                         if (talloc_str == NULL) {
   50807           0 :                                 PyErr_NoMemory();
   50808           0 :                                 return false;
   50809             :                         }
   50810           0 :                         r->in.server_unc = talloc_str;
   50811             :                 }
   50812             :         }
   50813           0 :         if (py_transport == NULL) {
   50814           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.transport");
   50815           0 :                 return false;
   50816             :         }
   50817           0 :         if (py_transport == Py_None) {
   50818           0 :                 r->in.transport = NULL;
   50819             :         } else {
   50820           0 :                 r->in.transport = NULL;
   50821             :                 {
   50822           0 :                         const char *test_str;
   50823           0 :                         const char *talloc_str;
   50824           0 :                         PyObject *unicode = NULL;
   50825           0 :                         if (PyUnicode_Check(py_transport)) {
   50826           0 :                                 unicode = PyUnicode_AsEncodedString(py_transport, "utf-8", "ignore");
   50827           0 :                                 if (unicode == NULL) {
   50828           0 :                                         return false;
   50829             :                                 }
   50830           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50831           0 :                         } else if (PyBytes_Check(py_transport)) {
   50832           0 :                                 test_str = PyBytes_AS_STRING(py_transport);
   50833             :                         } else {
   50834           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_transport)->tp_name);
   50835           0 :                                 return false;
   50836             :                         }
   50837           0 :                         talloc_str = talloc_strdup(r, test_str);
   50838           0 :                         if (unicode != NULL) {
   50839           0 :                                 Py_DECREF(unicode);
   50840             :                         }
   50841           0 :                         if (talloc_str == NULL) {
   50842           0 :                                 PyErr_NoMemory();
   50843           0 :                                 return false;
   50844             :                         }
   50845           0 :                         r->in.transport = talloc_str;
   50846             :                 }
   50847             :         }
   50848           0 :         if (py_servicebits == NULL) {
   50849           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servicebits");
   50850           0 :                 return false;
   50851             :         }
   50852             :         {
   50853           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.servicebits));
   50854           0 :                 if (PyLong_Check(py_servicebits)) {
   50855           0 :                         unsigned long long test_var;
   50856           0 :                         test_var = PyLong_AsUnsignedLongLong(py_servicebits);
   50857           0 :                         if (PyErr_Occurred() != NULL) {
   50858           0 :                                 return false;
   50859             :                         }
   50860           0 :                         if (test_var > uint_max) {
   50861           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50862             :                                   PyLong_Type.tp_name, uint_max, test_var);
   50863           0 :                                 return false;
   50864             :                         }
   50865           0 :                         r->in.servicebits = test_var;
   50866             :                 } else {
   50867           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50868             :                           PyLong_Type.tp_name);
   50869           0 :                         return false;
   50870             :                 }
   50871             :         }
   50872           0 :         if (py_updateimmediately == NULL) {
   50873           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.updateimmediately");
   50874           0 :                 return false;
   50875             :         }
   50876             :         {
   50877           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.updateimmediately));
   50878           0 :                 if (PyLong_Check(py_updateimmediately)) {
   50879           0 :                         unsigned long long test_var;
   50880           0 :                         test_var = PyLong_AsUnsignedLongLong(py_updateimmediately);
   50881           0 :                         if (PyErr_Occurred() != NULL) {
   50882           0 :                                 return false;
   50883             :                         }
   50884           0 :                         if (test_var > uint_max) {
   50885           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50886             :                                   PyLong_Type.tp_name, uint_max, test_var);
   50887           0 :                                 return false;
   50888             :                         }
   50889           0 :                         r->in.updateimmediately = test_var;
   50890             :                 } else {
   50891           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50892             :                           PyLong_Type.tp_name);
   50893           0 :                         return false;
   50894             :                 }
   50895             :         }
   50896           0 :         return true;
   50897             : }
   50898             : 
   50899           0 : static PyObject *unpack_py_srvsvc_NetSetServiceBits_args_out(struct srvsvc_NetSetServiceBits *r)
   50900             : {
   50901           0 :         PyObject *result;
   50902           0 :         result = Py_None;
   50903           0 :         Py_INCREF(result);
   50904           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   50905           0 :                 PyErr_SetWERROR(r->out.result);
   50906           0 :                 return NULL;
   50907             :         }
   50908             : 
   50909           0 :         return result;
   50910             : }
   50911             : 
   50912             : 
   50913           0 : static PyObject *py_srvsvc_NetPathType_in_get_server_unc(PyObject *obj, void *closure)
   50914             : {
   50915           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(obj);
   50916           0 :         PyObject *py_server_unc;
   50917           0 :         if (object->in.server_unc == NULL) {
   50918           0 :                 Py_RETURN_NONE;
   50919             :         }
   50920           0 :         if (object->in.server_unc == NULL) {
   50921           0 :                 py_server_unc = Py_None;
   50922           0 :                 Py_INCREF(py_server_unc);
   50923             :         } else {
   50924           0 :                 if (object->in.server_unc == NULL) {
   50925           0 :                         py_server_unc = Py_None;
   50926           0 :                         Py_INCREF(py_server_unc);
   50927             :                 } else {
   50928           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   50929             :                 }
   50930             :         }
   50931           0 :         return py_server_unc;
   50932             : }
   50933             : 
   50934           0 : static int py_srvsvc_NetPathType_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   50935             : {
   50936           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(py_obj);
   50937           0 :         if (value == NULL) {
   50938           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   50939           0 :                 return -1;
   50940             :         }
   50941           0 :         if (value == Py_None) {
   50942           0 :                 object->in.server_unc = NULL;
   50943             :         } else {
   50944           0 :                 object->in.server_unc = NULL;
   50945             :                 {
   50946           0 :                         const char *test_str;
   50947           0 :                         const char *talloc_str;
   50948           0 :                         PyObject *unicode = NULL;
   50949           0 :                         if (PyUnicode_Check(value)) {
   50950           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   50951           0 :                                 if (unicode == NULL) {
   50952           0 :                                         return -1;
   50953             :                                 }
   50954           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50955           0 :                         } else if (PyBytes_Check(value)) {
   50956           0 :                                 test_str = PyBytes_AS_STRING(value);
   50957             :                         } else {
   50958           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   50959           0 :                                 return -1;
   50960             :                         }
   50961           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   50962           0 :                         if (unicode != NULL) {
   50963           0 :                                 Py_DECREF(unicode);
   50964             :                         }
   50965           0 :                         if (talloc_str == NULL) {
   50966           0 :                                 PyErr_NoMemory();
   50967           0 :                                 return -1;
   50968             :                         }
   50969           0 :                         object->in.server_unc = talloc_str;
   50970             :                 }
   50971             :         }
   50972           0 :         return 0;
   50973             : }
   50974             : 
   50975           0 : static PyObject *py_srvsvc_NetPathType_in_get_path(PyObject *obj, void *closure)
   50976             : {
   50977           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(obj);
   50978           0 :         PyObject *py_path;
   50979           0 :         if (object->in.path == NULL) {
   50980           0 :                 py_path = Py_None;
   50981           0 :                 Py_INCREF(py_path);
   50982             :         } else {
   50983           0 :                 py_path = PyUnicode_Decode(object->in.path, strlen(object->in.path), "utf-8", "ignore");
   50984             :         }
   50985           0 :         return py_path;
   50986             : }
   50987             : 
   50988           0 : static int py_srvsvc_NetPathType_in_set_path(PyObject *py_obj, PyObject *value, void *closure)
   50989             : {
   50990           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(py_obj);
   50991           0 :         if (value == NULL) {
   50992           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.path");
   50993           0 :                 return -1;
   50994             :         }
   50995             :         {
   50996           0 :                 const char *test_str;
   50997           0 :                 const char *talloc_str;
   50998           0 :                 PyObject *unicode = NULL;
   50999           0 :                 if (PyUnicode_Check(value)) {
   51000           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51001           0 :                         if (unicode == NULL) {
   51002           0 :                                 return -1;
   51003             :                         }
   51004           0 :                         test_str = PyBytes_AS_STRING(unicode);
   51005           0 :                 } else if (PyBytes_Check(value)) {
   51006           0 :                         test_str = PyBytes_AS_STRING(value);
   51007             :                 } else {
   51008           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51009           0 :                         return -1;
   51010             :                 }
   51011           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51012           0 :                 if (unicode != NULL) {
   51013           0 :                         Py_DECREF(unicode);
   51014             :                 }
   51015           0 :                 if (talloc_str == NULL) {
   51016           0 :                         PyErr_NoMemory();
   51017           0 :                         return -1;
   51018             :                 }
   51019           0 :                 object->in.path = talloc_str;
   51020             :         }
   51021           0 :         return 0;
   51022             : }
   51023             : 
   51024           0 : static PyObject *py_srvsvc_NetPathType_in_get_pathflags(PyObject *obj, void *closure)
   51025             : {
   51026           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(obj);
   51027           0 :         PyObject *py_pathflags;
   51028           0 :         py_pathflags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.pathflags));
   51029           0 :         return py_pathflags;
   51030             : }
   51031             : 
   51032           0 : static int py_srvsvc_NetPathType_in_set_pathflags(PyObject *py_obj, PyObject *value, void *closure)
   51033             : {
   51034           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(py_obj);
   51035           0 :         if (value == NULL) {
   51036           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pathflags");
   51037           0 :                 return -1;
   51038             :         }
   51039             :         {
   51040           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.pathflags));
   51041           0 :                 if (PyLong_Check(value)) {
   51042           0 :                         unsigned long long test_var;
   51043           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51044           0 :                         if (PyErr_Occurred() != NULL) {
   51045           0 :                                 return -1;
   51046             :                         }
   51047           0 :                         if (test_var > uint_max) {
   51048           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51049             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51050           0 :                                 return -1;
   51051             :                         }
   51052           0 :                         object->in.pathflags = test_var;
   51053             :                 } else {
   51054           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51055             :                           PyLong_Type.tp_name);
   51056           0 :                         return -1;
   51057             :                 }
   51058             :         }
   51059           0 :         return 0;
   51060             : }
   51061             : 
   51062           0 : static PyObject *py_srvsvc_NetPathType_out_get_pathtype(PyObject *obj, void *closure)
   51063             : {
   51064           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(obj);
   51065           0 :         PyObject *py_pathtype;
   51066           0 :         if (object->out.pathtype == NULL) {
   51067           0 :                 Py_RETURN_NONE;
   51068             :         }
   51069           0 :         py_pathtype = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.pathtype));
   51070           0 :         return py_pathtype;
   51071             : }
   51072             : 
   51073           0 : static int py_srvsvc_NetPathType_out_set_pathtype(PyObject *py_obj, PyObject *value, void *closure)
   51074             : {
   51075           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(py_obj);
   51076           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pathtype));
   51077           0 :         if (value == NULL) {
   51078           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.pathtype");
   51079           0 :                 return -1;
   51080             :         }
   51081           0 :         object->out.pathtype = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pathtype);
   51082           0 :         if (object->out.pathtype == NULL) {
   51083           0 :                 PyErr_NoMemory();
   51084           0 :                 return -1;
   51085             :         }
   51086             :         {
   51087           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pathtype));
   51088           0 :                 if (PyLong_Check(value)) {
   51089           0 :                         unsigned long long test_var;
   51090           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51091           0 :                         if (PyErr_Occurred() != NULL) {
   51092           0 :                                 return -1;
   51093             :                         }
   51094           0 :                         if (test_var > uint_max) {
   51095           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51096             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51097           0 :                                 return -1;
   51098             :                         }
   51099           0 :                         *object->out.pathtype = test_var;
   51100             :                 } else {
   51101           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51102             :                           PyLong_Type.tp_name);
   51103           0 :                         return -1;
   51104             :                 }
   51105             :         }
   51106           0 :         return 0;
   51107             : }
   51108             : 
   51109           0 : static PyObject *py_srvsvc_NetPathType_get_result(PyObject *obj, void *closure)
   51110             : {
   51111           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(obj);
   51112           0 :         PyObject *py_result;
   51113           0 :         py_result = PyErr_FromWERROR(object->out.result);
   51114           0 :         return py_result;
   51115             : }
   51116             : 
   51117           0 : static int py_srvsvc_NetPathType_set_result(PyObject *py_obj, PyObject *value, void *closure)
   51118             : {
   51119           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(py_obj);
   51120           0 :         if (value == NULL) {
   51121           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   51122           0 :                 return -1;
   51123             :         }
   51124           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   51125           0 :         return 0;
   51126             : }
   51127             : 
   51128             : static PyGetSetDef py_srvsvc_NetPathType_getsetters[] = {
   51129             :         {
   51130             :                 .name = discard_const_p(char, "in_server_unc"),
   51131             :                 .get = py_srvsvc_NetPathType_in_get_server_unc,
   51132             :                 .set = py_srvsvc_NetPathType_in_set_server_unc,
   51133             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51134             :         },
   51135             :         {
   51136             :                 .name = discard_const_p(char, "in_path"),
   51137             :                 .get = py_srvsvc_NetPathType_in_get_path,
   51138             :                 .set = py_srvsvc_NetPathType_in_set_path,
   51139             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51140             :         },
   51141             :         {
   51142             :                 .name = discard_const_p(char, "in_pathflags"),
   51143             :                 .get = py_srvsvc_NetPathType_in_get_pathflags,
   51144             :                 .set = py_srvsvc_NetPathType_in_set_pathflags,
   51145             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   51146             :         },
   51147             :         {
   51148             :                 .name = discard_const_p(char, "out_pathtype"),
   51149             :                 .get = py_srvsvc_NetPathType_out_get_pathtype,
   51150             :                 .set = py_srvsvc_NetPathType_out_set_pathtype,
   51151             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   51152             :         },
   51153             :         {
   51154             :                 .name = discard_const_p(char, "result"),
   51155             :                 .get = py_srvsvc_NetPathType_get_result,
   51156             :                 .set = py_srvsvc_NetPathType_set_result,
   51157             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   51158             :         },
   51159             :         { .name = NULL }
   51160             : };
   51161             : 
   51162           0 : static PyObject *py_srvsvc_NetPathType_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   51163             : {
   51164           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetPathType, type);
   51165           0 :         struct srvsvc_NetPathType *_self = (struct srvsvc_NetPathType *)pytalloc_get_ptr(self);
   51166           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   51167           0 :         _self->out.pathtype = talloc_zero(mem_ctx, uint32_t);
   51168           0 :         return self;
   51169             : }
   51170             : 
   51171           0 : static PyObject *py_srvsvc_NetPathType_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   51172             : {
   51173             : 
   51174             : 
   51175           0 :         return PyLong_FromLong(30);
   51176             : }
   51177             : 
   51178           0 : static PyObject *py_srvsvc_NetPathType_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   51179             : {
   51180           0 :         const struct ndr_interface_call *call = NULL;
   51181           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(py_obj);
   51182           0 :         PyObject *ret = NULL;
   51183           0 :         struct ndr_push *push = NULL;
   51184           0 :         DATA_BLOB blob;
   51185           0 :         enum ndr_err_code err;
   51186             : 
   51187           0 :         if (ndr_table_srvsvc.num_calls < 31) {
   51188           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathType_ndr_pack");
   51189           0 :                 return NULL;
   51190             :         }
   51191           0 :         call = &ndr_table_srvsvc.calls[30];
   51192             : 
   51193           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   51194           0 :         if (push == NULL) {
   51195           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   51196           0 :                 return NULL;
   51197             :         }
   51198             : 
   51199           0 :         push->flags |= ndr_push_flags;
   51200             : 
   51201           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   51202           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   51203           0 :                 TALLOC_FREE(push);
   51204           0 :                 PyErr_SetNdrError(err);
   51205           0 :                 return NULL;
   51206             :         }
   51207           0 :         blob = ndr_push_blob(push);
   51208           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   51209           0 :         TALLOC_FREE(push);
   51210           0 :         return ret;
   51211             : }
   51212             : 
   51213           0 : static PyObject *py_srvsvc_NetPathType_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51214             : {
   51215           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   51216           0 :         PyObject *bigendian_obj = NULL;
   51217           0 :         PyObject *ndr64_obj = NULL;
   51218           0 :         libndr_flags ndr_push_flags = 0;
   51219             : 
   51220           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   51221             :                 discard_const_p(char *, kwnames),
   51222             :                 &bigendian_obj,
   51223             :                 &ndr64_obj)) {
   51224           0 :                 return NULL;
   51225             :         }
   51226             : 
   51227           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51228           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   51229             :         }
   51230           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51231           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   51232             :         }
   51233             : 
   51234           0 :         return py_srvsvc_NetPathType_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   51235             : }
   51236             : 
   51237           0 : static PyObject *py_srvsvc_NetPathType_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51238             : {
   51239           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   51240           0 :         PyObject *bigendian_obj = NULL;
   51241           0 :         PyObject *ndr64_obj = NULL;
   51242           0 :         libndr_flags ndr_push_flags = 0;
   51243             : 
   51244           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   51245             :                 discard_const_p(char *, kwnames),
   51246             :                 &bigendian_obj,
   51247             :                 &ndr64_obj)) {
   51248           0 :                 return NULL;
   51249             :         }
   51250             : 
   51251           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51252           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   51253             :         }
   51254           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51255           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   51256             :         }
   51257             : 
   51258           0 :         return py_srvsvc_NetPathType_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   51259             : }
   51260             : 
   51261           0 : static PyObject *py_srvsvc_NetPathType_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   51262             : {
   51263           0 :         const struct ndr_interface_call *call = NULL;
   51264           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(py_obj);
   51265           0 :         struct ndr_pull *pull = NULL;
   51266           0 :         enum ndr_err_code err;
   51267             : 
   51268           0 :         if (ndr_table_srvsvc.num_calls < 31) {
   51269           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathType_ndr_unpack");
   51270           0 :                 return NULL;
   51271             :         }
   51272           0 :         call = &ndr_table_srvsvc.calls[30];
   51273             : 
   51274           0 :         pull = ndr_pull_init_blob(blob, object);
   51275           0 :         if (pull == NULL) {
   51276           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   51277           0 :                 return NULL;
   51278             :         }
   51279             : 
   51280           0 :         pull->flags |= ndr_pull_flags;
   51281             : 
   51282           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   51283           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   51284           0 :                 TALLOC_FREE(pull);
   51285           0 :                 PyErr_SetNdrError(err);
   51286           0 :                 return NULL;
   51287             :         }
   51288           0 :         if (!allow_remaining) {
   51289           0 :                 uint32_t highest_ofs;
   51290             : 
   51291           0 :                 if (pull->offset > pull->relative_highest_offset) {
   51292           0 :                         highest_ofs = pull->offset;
   51293             :                 } else {
   51294           0 :                         highest_ofs = pull->relative_highest_offset;
   51295             :                 }
   51296           0 :                 if (highest_ofs < pull->data_size) {
   51297           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   51298             :                                 "not all bytes consumed ofs[%u] size[%u]",
   51299             :                                 highest_ofs, pull->data_size);
   51300           0 :                         TALLOC_FREE(pull);
   51301           0 :                         PyErr_SetNdrError(err);
   51302           0 :                         return NULL;
   51303             :                 }
   51304             :         }
   51305             : 
   51306           0 :         TALLOC_FREE(pull);
   51307           0 :         Py_RETURN_NONE;
   51308             : }
   51309             : 
   51310           0 : static PyObject *py_srvsvc_NetPathType_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51311             : {
   51312           0 :         DATA_BLOB blob;
   51313           0 :         Py_ssize_t blob_length = 0;
   51314           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   51315           0 :         PyObject *bigendian_obj = NULL;
   51316           0 :         PyObject *ndr64_obj = NULL;
   51317           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   51318           0 :         PyObject *allow_remaining_obj = NULL;
   51319           0 :         bool allow_remaining = false;
   51320             : 
   51321           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   51322             :                 discard_const_p(char *, kwnames),
   51323             :                 &blob.data, &blob_length,
   51324             :                 &bigendian_obj,
   51325             :                 &ndr64_obj,
   51326             :                 &allow_remaining_obj)) {
   51327           0 :                 return NULL;
   51328             :         }
   51329           0 :         blob.length = blob_length;
   51330             : 
   51331           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51332           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   51333             :         }
   51334           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51335           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   51336             :         }
   51337             : 
   51338           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   51339           0 :                 allow_remaining = true;
   51340             :         }
   51341             : 
   51342           0 :         return py_srvsvc_NetPathType_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   51343             : }
   51344             : 
   51345           0 : static PyObject *py_srvsvc_NetPathType_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51346             : {
   51347           0 :         DATA_BLOB blob;
   51348           0 :         Py_ssize_t blob_length = 0;
   51349           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   51350           0 :         PyObject *bigendian_obj = NULL;
   51351           0 :         PyObject *ndr64_obj = NULL;
   51352           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   51353           0 :         PyObject *allow_remaining_obj = NULL;
   51354           0 :         bool allow_remaining = false;
   51355             : 
   51356           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   51357             :                 discard_const_p(char *, kwnames),
   51358             :                 &blob.data, &blob_length,
   51359             :                 &bigendian_obj,
   51360             :                 &ndr64_obj,
   51361             :                 &allow_remaining_obj)) {
   51362           0 :                 return NULL;
   51363             :         }
   51364           0 :         blob.length = blob_length;
   51365             : 
   51366           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51367           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   51368             :         }
   51369           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51370           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   51371             :         }
   51372             : 
   51373           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   51374           0 :                 allow_remaining = true;
   51375             :         }
   51376             : 
   51377           0 :         return py_srvsvc_NetPathType_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   51378             : }
   51379             : 
   51380           0 : static PyObject *py_srvsvc_NetPathType_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   51381             : {
   51382           0 :         const struct ndr_interface_call *call = NULL;
   51383           0 :         struct srvsvc_NetPathType *object = pytalloc_get_ptr(py_obj);
   51384           0 :         PyObject *ret;
   51385           0 :         char *retstr;
   51386             : 
   51387           0 :         if (ndr_table_srvsvc.num_calls < 31) {
   51388           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathType_ndr_print");
   51389           0 :                 return NULL;
   51390             :         }
   51391           0 :         call = &ndr_table_srvsvc.calls[30];
   51392             : 
   51393           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   51394           0 :         ret = PyUnicode_FromString(retstr);
   51395           0 :         TALLOC_FREE(retstr);
   51396             : 
   51397           0 :         return ret;
   51398             : }
   51399             : 
   51400           0 : static PyObject *py_srvsvc_NetPathType_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   51401             : {
   51402           0 :         return py_srvsvc_NetPathType_ndr_print(py_obj, "srvsvc_NetPathType_in", NDR_IN);
   51403             : }
   51404             : 
   51405           0 : static PyObject *py_srvsvc_NetPathType_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   51406             : {
   51407           0 :         return py_srvsvc_NetPathType_ndr_print(py_obj, "srvsvc_NetPathType_out", NDR_OUT);
   51408             : }
   51409             : 
   51410             : static PyMethodDef py_srvsvc_NetPathType_methods[] = {
   51411             :         { "opnum", (PyCFunction)py_srvsvc_NetPathType_ndr_opnum, METH_NOARGS|METH_CLASS,
   51412             :                 "srvsvc.NetPathType.opnum() -> 30 (0x1e) " },
   51413             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathType_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   51414             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   51415             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathType_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   51416             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   51417             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathType_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   51418             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   51419             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathType_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   51420             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   51421             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetPathType_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   51422             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetPathType_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   51423             :         { NULL, NULL, 0, NULL }
   51424             : };
   51425             : 
   51426             : 
   51427             : static PyTypeObject srvsvc_NetPathType_Type = {
   51428             :         PyVarObject_HEAD_INIT(NULL, 0)
   51429             :         .tp_name = "srvsvc.NetPathType",
   51430             :         .tp_getset = py_srvsvc_NetPathType_getsetters,
   51431             :         .tp_methods = py_srvsvc_NetPathType_methods,
   51432             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   51433             :         .tp_new = py_srvsvc_NetPathType_new,
   51434             : };
   51435             : 
   51436           0 : static bool pack_py_srvsvc_NetPathType_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetPathType *r)
   51437             : {
   51438           0 :         PyObject *py_server_unc;
   51439           0 :         PyObject *py_path;
   51440           0 :         PyObject *py_pathflags;
   51441           0 :         const char *kwnames[] = {
   51442             :                 "server_unc", "path", "pathflags", NULL
   51443             :         };
   51444             : 
   51445           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetPathType", discard_const_p(char *, kwnames), &py_server_unc, &py_path, &py_pathflags)) {
   51446           0 :                 return false;
   51447             :         }
   51448             : 
   51449           0 :         if (py_server_unc == NULL) {
   51450           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   51451           0 :                 return false;
   51452             :         }
   51453           0 :         if (py_server_unc == Py_None) {
   51454           0 :                 r->in.server_unc = NULL;
   51455             :         } else {
   51456           0 :                 r->in.server_unc = NULL;
   51457             :                 {
   51458           0 :                         const char *test_str;
   51459           0 :                         const char *talloc_str;
   51460           0 :                         PyObject *unicode = NULL;
   51461           0 :                         if (PyUnicode_Check(py_server_unc)) {
   51462           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   51463           0 :                                 if (unicode == NULL) {
   51464           0 :                                         return false;
   51465             :                                 }
   51466           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51467           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   51468           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   51469             :                         } else {
   51470           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   51471           0 :                                 return false;
   51472             :                         }
   51473           0 :                         talloc_str = talloc_strdup(r, test_str);
   51474           0 :                         if (unicode != NULL) {
   51475           0 :                                 Py_DECREF(unicode);
   51476             :                         }
   51477           0 :                         if (talloc_str == NULL) {
   51478           0 :                                 PyErr_NoMemory();
   51479           0 :                                 return false;
   51480             :                         }
   51481           0 :                         r->in.server_unc = talloc_str;
   51482             :                 }
   51483             :         }
   51484           0 :         if (py_path == NULL) {
   51485           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.path");
   51486           0 :                 return false;
   51487             :         }
   51488             :         {
   51489           0 :                 const char *test_str;
   51490           0 :                 const char *talloc_str;
   51491           0 :                 PyObject *unicode = NULL;
   51492           0 :                 if (PyUnicode_Check(py_path)) {
   51493           0 :                         unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
   51494           0 :                         if (unicode == NULL) {
   51495           0 :                                 return false;
   51496             :                         }
   51497           0 :                         test_str = PyBytes_AS_STRING(unicode);
   51498           0 :                 } else if (PyBytes_Check(py_path)) {
   51499           0 :                         test_str = PyBytes_AS_STRING(py_path);
   51500             :                 } else {
   51501           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
   51502           0 :                         return false;
   51503             :                 }
   51504           0 :                 talloc_str = talloc_strdup(r, test_str);
   51505           0 :                 if (unicode != NULL) {
   51506           0 :                         Py_DECREF(unicode);
   51507             :                 }
   51508           0 :                 if (talloc_str == NULL) {
   51509           0 :                         PyErr_NoMemory();
   51510           0 :                         return false;
   51511             :                 }
   51512           0 :                 r->in.path = talloc_str;
   51513             :         }
   51514           0 :         if (py_pathflags == NULL) {
   51515           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pathflags");
   51516           0 :                 return false;
   51517             :         }
   51518             :         {
   51519           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathflags));
   51520           0 :                 if (PyLong_Check(py_pathflags)) {
   51521           0 :                         unsigned long long test_var;
   51522           0 :                         test_var = PyLong_AsUnsignedLongLong(py_pathflags);
   51523           0 :                         if (PyErr_Occurred() != NULL) {
   51524           0 :                                 return false;
   51525             :                         }
   51526           0 :                         if (test_var > uint_max) {
   51527           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51528             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51529           0 :                                 return false;
   51530             :                         }
   51531           0 :                         r->in.pathflags = test_var;
   51532             :                 } else {
   51533           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51534             :                           PyLong_Type.tp_name);
   51535           0 :                         return false;
   51536             :                 }
   51537             :         }
   51538           0 :         return true;
   51539             : }
   51540             : 
   51541           0 : static PyObject *unpack_py_srvsvc_NetPathType_args_out(struct srvsvc_NetPathType *r)
   51542             : {
   51543           0 :         PyObject *result;
   51544           0 :         PyObject *py_pathtype;
   51545           0 :         py_pathtype = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.pathtype));
   51546           0 :         result = py_pathtype;
   51547           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   51548           0 :                 PyErr_SetWERROR(r->out.result);
   51549           0 :                 return NULL;
   51550             :         }
   51551             : 
   51552           0 :         return result;
   51553             : }
   51554             : 
   51555             : 
   51556           0 : static PyObject *py_srvsvc_NetPathCanonicalize_in_get_server_unc(PyObject *obj, void *closure)
   51557             : {
   51558           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(obj);
   51559           0 :         PyObject *py_server_unc;
   51560           0 :         if (object->in.server_unc == NULL) {
   51561           0 :                 Py_RETURN_NONE;
   51562             :         }
   51563           0 :         if (object->in.server_unc == NULL) {
   51564           0 :                 py_server_unc = Py_None;
   51565           0 :                 Py_INCREF(py_server_unc);
   51566             :         } else {
   51567           0 :                 if (object->in.server_unc == NULL) {
   51568           0 :                         py_server_unc = Py_None;
   51569           0 :                         Py_INCREF(py_server_unc);
   51570             :                 } else {
   51571           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   51572             :                 }
   51573             :         }
   51574           0 :         return py_server_unc;
   51575             : }
   51576             : 
   51577           0 : static int py_srvsvc_NetPathCanonicalize_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   51578             : {
   51579           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(py_obj);
   51580           0 :         if (value == NULL) {
   51581           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   51582           0 :                 return -1;
   51583             :         }
   51584           0 :         if (value == Py_None) {
   51585           0 :                 object->in.server_unc = NULL;
   51586             :         } else {
   51587           0 :                 object->in.server_unc = NULL;
   51588             :                 {
   51589           0 :                         const char *test_str;
   51590           0 :                         const char *talloc_str;
   51591           0 :                         PyObject *unicode = NULL;
   51592           0 :                         if (PyUnicode_Check(value)) {
   51593           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51594           0 :                                 if (unicode == NULL) {
   51595           0 :                                         return -1;
   51596             :                                 }
   51597           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51598           0 :                         } else if (PyBytes_Check(value)) {
   51599           0 :                                 test_str = PyBytes_AS_STRING(value);
   51600             :                         } else {
   51601           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51602           0 :                                 return -1;
   51603             :                         }
   51604           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51605           0 :                         if (unicode != NULL) {
   51606           0 :                                 Py_DECREF(unicode);
   51607             :                         }
   51608           0 :                         if (talloc_str == NULL) {
   51609           0 :                                 PyErr_NoMemory();
   51610           0 :                                 return -1;
   51611             :                         }
   51612           0 :                         object->in.server_unc = talloc_str;
   51613             :                 }
   51614             :         }
   51615           0 :         return 0;
   51616             : }
   51617             : 
   51618           0 : static PyObject *py_srvsvc_NetPathCanonicalize_in_get_path(PyObject *obj, void *closure)
   51619             : {
   51620           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(obj);
   51621           0 :         PyObject *py_path;
   51622           0 :         if (object->in.path == NULL) {
   51623           0 :                 py_path = Py_None;
   51624           0 :                 Py_INCREF(py_path);
   51625             :         } else {
   51626           0 :                 py_path = PyUnicode_Decode(object->in.path, strlen(object->in.path), "utf-8", "ignore");
   51627             :         }
   51628           0 :         return py_path;
   51629             : }
   51630             : 
   51631           0 : static int py_srvsvc_NetPathCanonicalize_in_set_path(PyObject *py_obj, PyObject *value, void *closure)
   51632             : {
   51633           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(py_obj);
   51634           0 :         if (value == NULL) {
   51635           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.path");
   51636           0 :                 return -1;
   51637             :         }
   51638             :         {
   51639           0 :                 const char *test_str;
   51640           0 :                 const char *talloc_str;
   51641           0 :                 PyObject *unicode = NULL;
   51642           0 :                 if (PyUnicode_Check(value)) {
   51643           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51644           0 :                         if (unicode == NULL) {
   51645           0 :                                 return -1;
   51646             :                         }
   51647           0 :                         test_str = PyBytes_AS_STRING(unicode);
   51648           0 :                 } else if (PyBytes_Check(value)) {
   51649           0 :                         test_str = PyBytes_AS_STRING(value);
   51650             :                 } else {
   51651           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51652           0 :                         return -1;
   51653             :                 }
   51654           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51655           0 :                 if (unicode != NULL) {
   51656           0 :                         Py_DECREF(unicode);
   51657             :                 }
   51658           0 :                 if (talloc_str == NULL) {
   51659           0 :                         PyErr_NoMemory();
   51660           0 :                         return -1;
   51661             :                 }
   51662           0 :                 object->in.path = talloc_str;
   51663             :         }
   51664           0 :         return 0;
   51665             : }
   51666             : 
   51667           0 : static PyObject *py_srvsvc_NetPathCanonicalize_out_get_can_path(PyObject *obj, void *closure)
   51668             : {
   51669           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(obj);
   51670           0 :         PyObject *py_can_path;
   51671           0 :         py_can_path = PyList_New(object->in.maxbuf);
   51672           0 :         if (py_can_path == NULL) {
   51673           0 :                 return NULL;
   51674             :         }
   51675             :         {
   51676             :                 int can_path_cntr_0;
   51677           0 :                 for (can_path_cntr_0 = 0; can_path_cntr_0 < (object->in.maxbuf); can_path_cntr_0++) {
   51678           0 :                         PyObject *py_can_path_0;
   51679           0 :                         py_can_path_0 = PyLong_FromLong((uint16_t)((object->out.can_path)[can_path_cntr_0]));
   51680           0 :                         PyList_SetItem(py_can_path, can_path_cntr_0, py_can_path_0);
   51681             :                 }
   51682             :         }
   51683           0 :         return py_can_path;
   51684             : }
   51685             : 
   51686           0 : static int py_srvsvc_NetPathCanonicalize_out_set_can_path(PyObject *py_obj, PyObject *value, void *closure)
   51687             : {
   51688           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(py_obj);
   51689           0 :         if (value == NULL) {
   51690           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.can_path");
   51691           0 :                 return -1;
   51692             :         }
   51693           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   51694             :         {
   51695           0 :                 int can_path_cntr_0;
   51696           0 :                 object->out.can_path = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.can_path, PyList_GET_SIZE(value));
   51697           0 :                 if (!object->out.can_path) { return -1; }
   51698           0 :                 talloc_set_name_const(object->out.can_path, "ARRAY: object->out.can_path");
   51699           0 :                 for (can_path_cntr_0 = 0; can_path_cntr_0 < PyList_GET_SIZE(value); can_path_cntr_0++) {
   51700           0 :                         if (PyList_GET_ITEM(value, can_path_cntr_0) == NULL) {
   51701           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->out.can_path)[can_path_cntr_0]");
   51702           0 :                                 return -1;
   51703             :                         }
   51704             :                         {
   51705           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->out.can_path)[can_path_cntr_0]));
   51706           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, can_path_cntr_0))) {
   51707           0 :                                         unsigned long long test_var;
   51708           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, can_path_cntr_0));
   51709           0 :                                         if (PyErr_Occurred() != NULL) {
   51710           0 :                                                 return -1;
   51711             :                                         }
   51712           0 :                                         if (test_var > uint_max) {
   51713           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51714             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   51715           0 :                                                 return -1;
   51716             :                                         }
   51717           0 :                                         (object->out.can_path)[can_path_cntr_0] = test_var;
   51718             :                                 } else {
   51719           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51720             :                                           PyLong_Type.tp_name);
   51721           0 :                                         return -1;
   51722             :                                 }
   51723             :                         }
   51724             :                 }
   51725             :         }
   51726           0 :         return 0;
   51727             : }
   51728             : 
   51729           0 : static PyObject *py_srvsvc_NetPathCanonicalize_in_get_maxbuf(PyObject *obj, void *closure)
   51730             : {
   51731           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(obj);
   51732           0 :         PyObject *py_maxbuf;
   51733           0 :         py_maxbuf = PyLong_FromUnsignedLongLong((uint32_t)(object->in.maxbuf));
   51734           0 :         return py_maxbuf;
   51735             : }
   51736             : 
   51737           0 : static int py_srvsvc_NetPathCanonicalize_in_set_maxbuf(PyObject *py_obj, PyObject *value, void *closure)
   51738             : {
   51739           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(py_obj);
   51740           0 :         if (value == NULL) {
   51741           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.maxbuf");
   51742           0 :                 return -1;
   51743             :         }
   51744             :         {
   51745           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.maxbuf));
   51746           0 :                 if (PyLong_Check(value)) {
   51747           0 :                         unsigned long long test_var;
   51748           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51749           0 :                         if (PyErr_Occurred() != NULL) {
   51750           0 :                                 return -1;
   51751             :                         }
   51752           0 :                         if (test_var > uint_max) {
   51753           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51754             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51755           0 :                                 return -1;
   51756             :                         }
   51757           0 :                         object->in.maxbuf = test_var;
   51758             :                 } else {
   51759           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51760             :                           PyLong_Type.tp_name);
   51761           0 :                         return -1;
   51762             :                 }
   51763             :         }
   51764           0 :         return 0;
   51765             : }
   51766             : 
   51767           0 : static PyObject *py_srvsvc_NetPathCanonicalize_in_get_prefix(PyObject *obj, void *closure)
   51768             : {
   51769           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(obj);
   51770           0 :         PyObject *py_prefix;
   51771           0 :         if (object->in.prefix == NULL) {
   51772           0 :                 py_prefix = Py_None;
   51773           0 :                 Py_INCREF(py_prefix);
   51774             :         } else {
   51775           0 :                 py_prefix = PyUnicode_Decode(object->in.prefix, strlen(object->in.prefix), "utf-8", "ignore");
   51776             :         }
   51777           0 :         return py_prefix;
   51778             : }
   51779             : 
   51780           0 : static int py_srvsvc_NetPathCanonicalize_in_set_prefix(PyObject *py_obj, PyObject *value, void *closure)
   51781             : {
   51782           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(py_obj);
   51783           0 :         if (value == NULL) {
   51784           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.prefix");
   51785           0 :                 return -1;
   51786             :         }
   51787             :         {
   51788           0 :                 const char *test_str;
   51789           0 :                 const char *talloc_str;
   51790           0 :                 PyObject *unicode = NULL;
   51791           0 :                 if (PyUnicode_Check(value)) {
   51792           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51793           0 :                         if (unicode == NULL) {
   51794           0 :                                 return -1;
   51795             :                         }
   51796           0 :                         test_str = PyBytes_AS_STRING(unicode);
   51797           0 :                 } else if (PyBytes_Check(value)) {
   51798           0 :                         test_str = PyBytes_AS_STRING(value);
   51799             :                 } else {
   51800           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51801           0 :                         return -1;
   51802             :                 }
   51803           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51804           0 :                 if (unicode != NULL) {
   51805           0 :                         Py_DECREF(unicode);
   51806             :                 }
   51807           0 :                 if (talloc_str == NULL) {
   51808           0 :                         PyErr_NoMemory();
   51809           0 :                         return -1;
   51810             :                 }
   51811           0 :                 object->in.prefix = talloc_str;
   51812             :         }
   51813           0 :         return 0;
   51814             : }
   51815             : 
   51816           0 : static PyObject *py_srvsvc_NetPathCanonicalize_in_get_pathtype(PyObject *obj, void *closure)
   51817             : {
   51818           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(obj);
   51819           0 :         PyObject *py_pathtype;
   51820           0 :         if (object->in.pathtype == NULL) {
   51821           0 :                 Py_RETURN_NONE;
   51822             :         }
   51823           0 :         py_pathtype = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.pathtype));
   51824           0 :         return py_pathtype;
   51825             : }
   51826             : 
   51827           0 : static int py_srvsvc_NetPathCanonicalize_in_set_pathtype(PyObject *py_obj, PyObject *value, void *closure)
   51828             : {
   51829           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(py_obj);
   51830           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.pathtype));
   51831           0 :         if (value == NULL) {
   51832           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pathtype");
   51833           0 :                 return -1;
   51834             :         }
   51835           0 :         object->in.pathtype = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.pathtype);
   51836           0 :         if (object->in.pathtype == NULL) {
   51837           0 :                 PyErr_NoMemory();
   51838           0 :                 return -1;
   51839             :         }
   51840             :         {
   51841           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.pathtype));
   51842           0 :                 if (PyLong_Check(value)) {
   51843           0 :                         unsigned long long test_var;
   51844           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51845           0 :                         if (PyErr_Occurred() != NULL) {
   51846           0 :                                 return -1;
   51847             :                         }
   51848           0 :                         if (test_var > uint_max) {
   51849           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51850             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51851           0 :                                 return -1;
   51852             :                         }
   51853           0 :                         *object->in.pathtype = test_var;
   51854             :                 } else {
   51855           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51856             :                           PyLong_Type.tp_name);
   51857           0 :                         return -1;
   51858             :                 }
   51859             :         }
   51860           0 :         return 0;
   51861             : }
   51862             : 
   51863           0 : static PyObject *py_srvsvc_NetPathCanonicalize_out_get_pathtype(PyObject *obj, void *closure)
   51864             : {
   51865           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(obj);
   51866           0 :         PyObject *py_pathtype;
   51867           0 :         if (object->out.pathtype == NULL) {
   51868           0 :                 Py_RETURN_NONE;
   51869             :         }
   51870           0 :         py_pathtype = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.pathtype));
   51871           0 :         return py_pathtype;
   51872             : }
   51873             : 
   51874           0 : static int py_srvsvc_NetPathCanonicalize_out_set_pathtype(PyObject *py_obj, PyObject *value, void *closure)
   51875             : {
   51876           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(py_obj);
   51877           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pathtype));
   51878           0 :         if (value == NULL) {
   51879           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.pathtype");
   51880           0 :                 return -1;
   51881             :         }
   51882           0 :         object->out.pathtype = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pathtype);
   51883           0 :         if (object->out.pathtype == NULL) {
   51884           0 :                 PyErr_NoMemory();
   51885           0 :                 return -1;
   51886             :         }
   51887             :         {
   51888           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pathtype));
   51889           0 :                 if (PyLong_Check(value)) {
   51890           0 :                         unsigned long long test_var;
   51891           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51892           0 :                         if (PyErr_Occurred() != NULL) {
   51893           0 :                                 return -1;
   51894             :                         }
   51895           0 :                         if (test_var > uint_max) {
   51896           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51897             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51898           0 :                                 return -1;
   51899             :                         }
   51900           0 :                         *object->out.pathtype = test_var;
   51901             :                 } else {
   51902           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51903             :                           PyLong_Type.tp_name);
   51904           0 :                         return -1;
   51905             :                 }
   51906             :         }
   51907           0 :         return 0;
   51908             : }
   51909             : 
   51910           0 : static PyObject *py_srvsvc_NetPathCanonicalize_in_get_pathflags(PyObject *obj, void *closure)
   51911             : {
   51912           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(obj);
   51913           0 :         PyObject *py_pathflags;
   51914           0 :         py_pathflags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.pathflags));
   51915           0 :         return py_pathflags;
   51916             : }
   51917             : 
   51918           0 : static int py_srvsvc_NetPathCanonicalize_in_set_pathflags(PyObject *py_obj, PyObject *value, void *closure)
   51919             : {
   51920           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(py_obj);
   51921           0 :         if (value == NULL) {
   51922           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pathflags");
   51923           0 :                 return -1;
   51924             :         }
   51925             :         {
   51926           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.pathflags));
   51927           0 :                 if (PyLong_Check(value)) {
   51928           0 :                         unsigned long long test_var;
   51929           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51930           0 :                         if (PyErr_Occurred() != NULL) {
   51931           0 :                                 return -1;
   51932             :                         }
   51933           0 :                         if (test_var > uint_max) {
   51934           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51935             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51936           0 :                                 return -1;
   51937             :                         }
   51938           0 :                         object->in.pathflags = test_var;
   51939             :                 } else {
   51940           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51941             :                           PyLong_Type.tp_name);
   51942           0 :                         return -1;
   51943             :                 }
   51944             :         }
   51945           0 :         return 0;
   51946             : }
   51947             : 
   51948           0 : static PyObject *py_srvsvc_NetPathCanonicalize_get_result(PyObject *obj, void *closure)
   51949             : {
   51950           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(obj);
   51951           0 :         PyObject *py_result;
   51952           0 :         py_result = PyErr_FromWERROR(object->out.result);
   51953           0 :         return py_result;
   51954             : }
   51955             : 
   51956           0 : static int py_srvsvc_NetPathCanonicalize_set_result(PyObject *py_obj, PyObject *value, void *closure)
   51957             : {
   51958           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(py_obj);
   51959           0 :         if (value == NULL) {
   51960           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   51961           0 :                 return -1;
   51962             :         }
   51963           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   51964           0 :         return 0;
   51965             : }
   51966             : 
   51967             : static PyGetSetDef py_srvsvc_NetPathCanonicalize_getsetters[] = {
   51968             :         {
   51969             :                 .name = discard_const_p(char, "in_server_unc"),
   51970             :                 .get = py_srvsvc_NetPathCanonicalize_in_get_server_unc,
   51971             :                 .set = py_srvsvc_NetPathCanonicalize_in_set_server_unc,
   51972             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51973             :         },
   51974             :         {
   51975             :                 .name = discard_const_p(char, "in_path"),
   51976             :                 .get = py_srvsvc_NetPathCanonicalize_in_get_path,
   51977             :                 .set = py_srvsvc_NetPathCanonicalize_in_set_path,
   51978             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51979             :         },
   51980             :         {
   51981             :                 .name = discard_const_p(char, "out_can_path"),
   51982             :                 .get = py_srvsvc_NetPathCanonicalize_out_get_can_path,
   51983             :                 .set = py_srvsvc_NetPathCanonicalize_out_set_can_path,
   51984             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   51985             :         },
   51986             :         {
   51987             :                 .name = discard_const_p(char, "in_maxbuf"),
   51988             :                 .get = py_srvsvc_NetPathCanonicalize_in_get_maxbuf,
   51989             :                 .set = py_srvsvc_NetPathCanonicalize_in_set_maxbuf,
   51990             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   51991             :         },
   51992             :         {
   51993             :                 .name = discard_const_p(char, "in_prefix"),
   51994             :                 .get = py_srvsvc_NetPathCanonicalize_in_get_prefix,
   51995             :                 .set = py_srvsvc_NetPathCanonicalize_in_set_prefix,
   51996             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51997             :         },
   51998             :         {
   51999             :                 .name = discard_const_p(char, "in_pathtype"),
   52000             :                 .get = py_srvsvc_NetPathCanonicalize_in_get_pathtype,
   52001             :                 .set = py_srvsvc_NetPathCanonicalize_in_set_pathtype,
   52002             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52003             :         },
   52004             :         {
   52005             :                 .name = discard_const_p(char, "out_pathtype"),
   52006             :                 .get = py_srvsvc_NetPathCanonicalize_out_get_pathtype,
   52007             :                 .set = py_srvsvc_NetPathCanonicalize_out_set_pathtype,
   52008             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52009             :         },
   52010             :         {
   52011             :                 .name = discard_const_p(char, "in_pathflags"),
   52012             :                 .get = py_srvsvc_NetPathCanonicalize_in_get_pathflags,
   52013             :                 .set = py_srvsvc_NetPathCanonicalize_in_set_pathflags,
   52014             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52015             :         },
   52016             :         {
   52017             :                 .name = discard_const_p(char, "result"),
   52018             :                 .get = py_srvsvc_NetPathCanonicalize_get_result,
   52019             :                 .set = py_srvsvc_NetPathCanonicalize_set_result,
   52020             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   52021             :         },
   52022             :         { .name = NULL }
   52023             : };
   52024             : 
   52025           0 : static PyObject *py_srvsvc_NetPathCanonicalize_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   52026             : {
   52027           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetPathCanonicalize, type);
   52028           0 :         struct srvsvc_NetPathCanonicalize *_self = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(self);
   52029           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   52030           0 :         _self->in.pathtype = talloc_zero(mem_ctx, uint32_t);
   52031           0 :         _self->out.pathtype = talloc_zero(mem_ctx, uint32_t);
   52032           0 :         return self;
   52033             : }
   52034             : 
   52035           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   52036             : {
   52037             : 
   52038             : 
   52039           0 :         return PyLong_FromLong(31);
   52040             : }
   52041             : 
   52042           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   52043             : {
   52044           0 :         const struct ndr_interface_call *call = NULL;
   52045           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(py_obj);
   52046           0 :         PyObject *ret = NULL;
   52047           0 :         struct ndr_push *push = NULL;
   52048           0 :         DATA_BLOB blob;
   52049           0 :         enum ndr_err_code err;
   52050             : 
   52051           0 :         if (ndr_table_srvsvc.num_calls < 32) {
   52052           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathCanonicalize_ndr_pack");
   52053           0 :                 return NULL;
   52054             :         }
   52055           0 :         call = &ndr_table_srvsvc.calls[31];
   52056             : 
   52057           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   52058           0 :         if (push == NULL) {
   52059           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52060           0 :                 return NULL;
   52061             :         }
   52062             : 
   52063           0 :         push->flags |= ndr_push_flags;
   52064             : 
   52065           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   52066           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52067           0 :                 TALLOC_FREE(push);
   52068           0 :                 PyErr_SetNdrError(err);
   52069           0 :                 return NULL;
   52070             :         }
   52071           0 :         blob = ndr_push_blob(push);
   52072           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   52073           0 :         TALLOC_FREE(push);
   52074           0 :         return ret;
   52075             : }
   52076             : 
   52077           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52078             : {
   52079           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52080           0 :         PyObject *bigendian_obj = NULL;
   52081           0 :         PyObject *ndr64_obj = NULL;
   52082           0 :         libndr_flags ndr_push_flags = 0;
   52083             : 
   52084           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   52085             :                 discard_const_p(char *, kwnames),
   52086             :                 &bigendian_obj,
   52087             :                 &ndr64_obj)) {
   52088           0 :                 return NULL;
   52089             :         }
   52090             : 
   52091           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52092           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52093             :         }
   52094           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52095           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52096             :         }
   52097             : 
   52098           0 :         return py_srvsvc_NetPathCanonicalize_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   52099             : }
   52100             : 
   52101           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52102             : {
   52103           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52104           0 :         PyObject *bigendian_obj = NULL;
   52105           0 :         PyObject *ndr64_obj = NULL;
   52106           0 :         libndr_flags ndr_push_flags = 0;
   52107             : 
   52108           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   52109             :                 discard_const_p(char *, kwnames),
   52110             :                 &bigendian_obj,
   52111             :                 &ndr64_obj)) {
   52112           0 :                 return NULL;
   52113             :         }
   52114             : 
   52115           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52116           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52117             :         }
   52118           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52119           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52120             :         }
   52121             : 
   52122           0 :         return py_srvsvc_NetPathCanonicalize_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   52123             : }
   52124             : 
   52125           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   52126             : {
   52127           0 :         const struct ndr_interface_call *call = NULL;
   52128           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(py_obj);
   52129           0 :         struct ndr_pull *pull = NULL;
   52130           0 :         enum ndr_err_code err;
   52131             : 
   52132           0 :         if (ndr_table_srvsvc.num_calls < 32) {
   52133           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathCanonicalize_ndr_unpack");
   52134           0 :                 return NULL;
   52135             :         }
   52136           0 :         call = &ndr_table_srvsvc.calls[31];
   52137             : 
   52138           0 :         pull = ndr_pull_init_blob(blob, object);
   52139           0 :         if (pull == NULL) {
   52140           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52141           0 :                 return NULL;
   52142             :         }
   52143             : 
   52144           0 :         pull->flags |= ndr_pull_flags;
   52145             : 
   52146           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   52147           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52148           0 :                 TALLOC_FREE(pull);
   52149           0 :                 PyErr_SetNdrError(err);
   52150           0 :                 return NULL;
   52151             :         }
   52152           0 :         if (!allow_remaining) {
   52153           0 :                 uint32_t highest_ofs;
   52154             : 
   52155           0 :                 if (pull->offset > pull->relative_highest_offset) {
   52156           0 :                         highest_ofs = pull->offset;
   52157             :                 } else {
   52158           0 :                         highest_ofs = pull->relative_highest_offset;
   52159             :                 }
   52160           0 :                 if (highest_ofs < pull->data_size) {
   52161           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   52162             :                                 "not all bytes consumed ofs[%u] size[%u]",
   52163             :                                 highest_ofs, pull->data_size);
   52164           0 :                         TALLOC_FREE(pull);
   52165           0 :                         PyErr_SetNdrError(err);
   52166           0 :                         return NULL;
   52167             :                 }
   52168             :         }
   52169             : 
   52170           0 :         TALLOC_FREE(pull);
   52171           0 :         Py_RETURN_NONE;
   52172             : }
   52173             : 
   52174           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52175             : {
   52176           0 :         DATA_BLOB blob;
   52177           0 :         Py_ssize_t blob_length = 0;
   52178           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52179           0 :         PyObject *bigendian_obj = NULL;
   52180           0 :         PyObject *ndr64_obj = NULL;
   52181           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52182           0 :         PyObject *allow_remaining_obj = NULL;
   52183           0 :         bool allow_remaining = false;
   52184             : 
   52185           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   52186             :                 discard_const_p(char *, kwnames),
   52187             :                 &blob.data, &blob_length,
   52188             :                 &bigendian_obj,
   52189             :                 &ndr64_obj,
   52190             :                 &allow_remaining_obj)) {
   52191           0 :                 return NULL;
   52192             :         }
   52193           0 :         blob.length = blob_length;
   52194             : 
   52195           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52196           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52197             :         }
   52198           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52199           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52200             :         }
   52201             : 
   52202           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52203           0 :                 allow_remaining = true;
   52204             :         }
   52205             : 
   52206           0 :         return py_srvsvc_NetPathCanonicalize_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   52207             : }
   52208             : 
   52209           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52210             : {
   52211           0 :         DATA_BLOB blob;
   52212           0 :         Py_ssize_t blob_length = 0;
   52213           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52214           0 :         PyObject *bigendian_obj = NULL;
   52215           0 :         PyObject *ndr64_obj = NULL;
   52216           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52217           0 :         PyObject *allow_remaining_obj = NULL;
   52218           0 :         bool allow_remaining = false;
   52219             : 
   52220           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   52221             :                 discard_const_p(char *, kwnames),
   52222             :                 &blob.data, &blob_length,
   52223             :                 &bigendian_obj,
   52224             :                 &ndr64_obj,
   52225             :                 &allow_remaining_obj)) {
   52226           0 :                 return NULL;
   52227             :         }
   52228           0 :         blob.length = blob_length;
   52229             : 
   52230           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52231           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52232             :         }
   52233           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52234           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52235             :         }
   52236             : 
   52237           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52238           0 :                 allow_remaining = true;
   52239             :         }
   52240             : 
   52241           0 :         return py_srvsvc_NetPathCanonicalize_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   52242             : }
   52243             : 
   52244           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   52245             : {
   52246           0 :         const struct ndr_interface_call *call = NULL;
   52247           0 :         struct srvsvc_NetPathCanonicalize *object = pytalloc_get_ptr(py_obj);
   52248           0 :         PyObject *ret;
   52249           0 :         char *retstr;
   52250             : 
   52251           0 :         if (ndr_table_srvsvc.num_calls < 32) {
   52252           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathCanonicalize_ndr_print");
   52253           0 :                 return NULL;
   52254             :         }
   52255           0 :         call = &ndr_table_srvsvc.calls[31];
   52256             : 
   52257           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   52258           0 :         ret = PyUnicode_FromString(retstr);
   52259           0 :         TALLOC_FREE(retstr);
   52260             : 
   52261           0 :         return ret;
   52262             : }
   52263             : 
   52264           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   52265             : {
   52266           0 :         return py_srvsvc_NetPathCanonicalize_ndr_print(py_obj, "srvsvc_NetPathCanonicalize_in", NDR_IN);
   52267             : }
   52268             : 
   52269           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   52270             : {
   52271           0 :         return py_srvsvc_NetPathCanonicalize_ndr_print(py_obj, "srvsvc_NetPathCanonicalize_out", NDR_OUT);
   52272             : }
   52273             : 
   52274             : static PyMethodDef py_srvsvc_NetPathCanonicalize_methods[] = {
   52275             :         { "opnum", (PyCFunction)py_srvsvc_NetPathCanonicalize_ndr_opnum, METH_NOARGS|METH_CLASS,
   52276             :                 "srvsvc.NetPathCanonicalize.opnum() -> 31 (0x1f) " },
   52277             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCanonicalize_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   52278             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   52279             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCanonicalize_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   52280             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   52281             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCanonicalize_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   52282             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   52283             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCanonicalize_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   52284             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   52285             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetPathCanonicalize_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   52286             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetPathCanonicalize_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   52287             :         { NULL, NULL, 0, NULL }
   52288             : };
   52289             : 
   52290             : 
   52291             : static PyTypeObject srvsvc_NetPathCanonicalize_Type = {
   52292             :         PyVarObject_HEAD_INIT(NULL, 0)
   52293             :         .tp_name = "srvsvc.NetPathCanonicalize",
   52294             :         .tp_getset = py_srvsvc_NetPathCanonicalize_getsetters,
   52295             :         .tp_methods = py_srvsvc_NetPathCanonicalize_methods,
   52296             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   52297             :         .tp_new = py_srvsvc_NetPathCanonicalize_new,
   52298             : };
   52299             : 
   52300           0 : static bool pack_py_srvsvc_NetPathCanonicalize_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetPathCanonicalize *r)
   52301             : {
   52302           0 :         PyObject *py_server_unc;
   52303           0 :         PyObject *py_path;
   52304           0 :         PyObject *py_maxbuf;
   52305           0 :         PyObject *py_prefix;
   52306           0 :         PyObject *py_pathtype;
   52307           0 :         PyObject *py_pathflags;
   52308           0 :         const char *kwnames[] = {
   52309             :                 "server_unc", "path", "maxbuf", "prefix", "pathtype", "pathflags", NULL
   52310             :         };
   52311             : 
   52312           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)) {
   52313           0 :                 return false;
   52314             :         }
   52315             : 
   52316           0 :         if (py_server_unc == NULL) {
   52317           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   52318           0 :                 return false;
   52319             :         }
   52320           0 :         if (py_server_unc == Py_None) {
   52321           0 :                 r->in.server_unc = NULL;
   52322             :         } else {
   52323           0 :                 r->in.server_unc = NULL;
   52324             :                 {
   52325           0 :                         const char *test_str;
   52326           0 :                         const char *talloc_str;
   52327           0 :                         PyObject *unicode = NULL;
   52328           0 :                         if (PyUnicode_Check(py_server_unc)) {
   52329           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   52330           0 :                                 if (unicode == NULL) {
   52331           0 :                                         return false;
   52332             :                                 }
   52333           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52334           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   52335           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   52336             :                         } else {
   52337           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   52338           0 :                                 return false;
   52339             :                         }
   52340           0 :                         talloc_str = talloc_strdup(r, test_str);
   52341           0 :                         if (unicode != NULL) {
   52342           0 :                                 Py_DECREF(unicode);
   52343             :                         }
   52344           0 :                         if (talloc_str == NULL) {
   52345           0 :                                 PyErr_NoMemory();
   52346           0 :                                 return false;
   52347             :                         }
   52348           0 :                         r->in.server_unc = talloc_str;
   52349             :                 }
   52350             :         }
   52351           0 :         if (py_path == NULL) {
   52352           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.path");
   52353           0 :                 return false;
   52354             :         }
   52355             :         {
   52356           0 :                 const char *test_str;
   52357           0 :                 const char *talloc_str;
   52358           0 :                 PyObject *unicode = NULL;
   52359           0 :                 if (PyUnicode_Check(py_path)) {
   52360           0 :                         unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
   52361           0 :                         if (unicode == NULL) {
   52362           0 :                                 return false;
   52363             :                         }
   52364           0 :                         test_str = PyBytes_AS_STRING(unicode);
   52365           0 :                 } else if (PyBytes_Check(py_path)) {
   52366           0 :                         test_str = PyBytes_AS_STRING(py_path);
   52367             :                 } else {
   52368           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
   52369           0 :                         return false;
   52370             :                 }
   52371           0 :                 talloc_str = talloc_strdup(r, test_str);
   52372           0 :                 if (unicode != NULL) {
   52373           0 :                         Py_DECREF(unicode);
   52374             :                 }
   52375           0 :                 if (talloc_str == NULL) {
   52376           0 :                         PyErr_NoMemory();
   52377           0 :                         return false;
   52378             :                 }
   52379           0 :                 r->in.path = talloc_str;
   52380             :         }
   52381           0 :         if (py_maxbuf == NULL) {
   52382           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.maxbuf");
   52383           0 :                 return false;
   52384             :         }
   52385             :         {
   52386           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.maxbuf));
   52387           0 :                 if (PyLong_Check(py_maxbuf)) {
   52388           0 :                         unsigned long long test_var;
   52389           0 :                         test_var = PyLong_AsUnsignedLongLong(py_maxbuf);
   52390           0 :                         if (PyErr_Occurred() != NULL) {
   52391           0 :                                 return false;
   52392             :                         }
   52393           0 :                         if (test_var > uint_max) {
   52394           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52395             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52396           0 :                                 return false;
   52397             :                         }
   52398           0 :                         r->in.maxbuf = test_var;
   52399             :                 } else {
   52400           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52401             :                           PyLong_Type.tp_name);
   52402           0 :                         return false;
   52403             :                 }
   52404             :         }
   52405           0 :         if (py_prefix == NULL) {
   52406           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.prefix");
   52407           0 :                 return false;
   52408             :         }
   52409             :         {
   52410           0 :                 const char *test_str;
   52411           0 :                 const char *talloc_str;
   52412           0 :                 PyObject *unicode = NULL;
   52413           0 :                 if (PyUnicode_Check(py_prefix)) {
   52414           0 :                         unicode = PyUnicode_AsEncodedString(py_prefix, "utf-8", "ignore");
   52415           0 :                         if (unicode == NULL) {
   52416           0 :                                 return false;
   52417             :                         }
   52418           0 :                         test_str = PyBytes_AS_STRING(unicode);
   52419           0 :                 } else if (PyBytes_Check(py_prefix)) {
   52420           0 :                         test_str = PyBytes_AS_STRING(py_prefix);
   52421             :                 } else {
   52422           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_prefix)->tp_name);
   52423           0 :                         return false;
   52424             :                 }
   52425           0 :                 talloc_str = talloc_strdup(r, test_str);
   52426           0 :                 if (unicode != NULL) {
   52427           0 :                         Py_DECREF(unicode);
   52428             :                 }
   52429           0 :                 if (talloc_str == NULL) {
   52430           0 :                         PyErr_NoMemory();
   52431           0 :                         return false;
   52432             :                 }
   52433           0 :                 r->in.prefix = talloc_str;
   52434             :         }
   52435           0 :         if (py_pathtype == NULL) {
   52436           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pathtype");
   52437           0 :                 return false;
   52438             :         }
   52439           0 :         r->in.pathtype = talloc_ptrtype(r, r->in.pathtype);
   52440           0 :         if (r->in.pathtype == NULL) {
   52441           0 :                 PyErr_NoMemory();
   52442           0 :                 return false;
   52443             :         }
   52444             :         {
   52445           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.pathtype));
   52446           0 :                 if (PyLong_Check(py_pathtype)) {
   52447           0 :                         unsigned long long test_var;
   52448           0 :                         test_var = PyLong_AsUnsignedLongLong(py_pathtype);
   52449           0 :                         if (PyErr_Occurred() != NULL) {
   52450           0 :                                 return false;
   52451             :                         }
   52452           0 :                         if (test_var > uint_max) {
   52453           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52454             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52455           0 :                                 return false;
   52456             :                         }
   52457           0 :                         *r->in.pathtype = test_var;
   52458             :                 } else {
   52459           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52460             :                           PyLong_Type.tp_name);
   52461           0 :                         return false;
   52462             :                 }
   52463             :         }
   52464           0 :         if (py_pathflags == NULL) {
   52465           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pathflags");
   52466           0 :                 return false;
   52467             :         }
   52468             :         {
   52469           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathflags));
   52470           0 :                 if (PyLong_Check(py_pathflags)) {
   52471           0 :                         unsigned long long test_var;
   52472           0 :                         test_var = PyLong_AsUnsignedLongLong(py_pathflags);
   52473           0 :                         if (PyErr_Occurred() != NULL) {
   52474           0 :                                 return false;
   52475             :                         }
   52476           0 :                         if (test_var > uint_max) {
   52477           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52478             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52479           0 :                                 return false;
   52480             :                         }
   52481           0 :                         r->in.pathflags = test_var;
   52482             :                 } else {
   52483           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52484             :                           PyLong_Type.tp_name);
   52485           0 :                         return false;
   52486             :                 }
   52487             :         }
   52488           0 :         return true;
   52489             : }
   52490             : 
   52491           0 : static PyObject *unpack_py_srvsvc_NetPathCanonicalize_args_out(struct srvsvc_NetPathCanonicalize *r)
   52492             : {
   52493           0 :         PyObject *result;
   52494           0 :         PyObject *py_can_path;
   52495           0 :         PyObject *py_pathtype;
   52496           0 :         result = PyTuple_New(2);
   52497           0 :         py_can_path = PyList_New(r->in.maxbuf);
   52498           0 :         if (py_can_path == NULL) {
   52499           0 :                 return NULL;
   52500             :         }
   52501             :         {
   52502             :                 int can_path_cntr_0;
   52503           0 :                 for (can_path_cntr_0 = 0; can_path_cntr_0 < (r->in.maxbuf); can_path_cntr_0++) {
   52504           0 :                         PyObject *py_can_path_0;
   52505           0 :                         py_can_path_0 = PyLong_FromLong((uint16_t)((r->out.can_path)[can_path_cntr_0]));
   52506           0 :                         PyList_SetItem(py_can_path, can_path_cntr_0, py_can_path_0);
   52507             :                 }
   52508             :         }
   52509           0 :         PyTuple_SetItem(result, 0, py_can_path);
   52510           0 :         py_pathtype = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.pathtype));
   52511           0 :         PyTuple_SetItem(result, 1, py_pathtype);
   52512           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   52513           0 :                 PyErr_SetWERROR(r->out.result);
   52514           0 :                 return NULL;
   52515             :         }
   52516             : 
   52517           0 :         return result;
   52518             : }
   52519             : 
   52520             : 
   52521           0 : static PyObject *py_srvsvc_NetPathCompare_in_get_server_unc(PyObject *obj, void *closure)
   52522             : {
   52523           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(obj);
   52524           0 :         PyObject *py_server_unc;
   52525           0 :         if (object->in.server_unc == NULL) {
   52526           0 :                 Py_RETURN_NONE;
   52527             :         }
   52528           0 :         if (object->in.server_unc == NULL) {
   52529           0 :                 py_server_unc = Py_None;
   52530           0 :                 Py_INCREF(py_server_unc);
   52531             :         } else {
   52532           0 :                 if (object->in.server_unc == NULL) {
   52533           0 :                         py_server_unc = Py_None;
   52534           0 :                         Py_INCREF(py_server_unc);
   52535             :                 } else {
   52536           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   52537             :                 }
   52538             :         }
   52539           0 :         return py_server_unc;
   52540             : }
   52541             : 
   52542           0 : static int py_srvsvc_NetPathCompare_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   52543             : {
   52544           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(py_obj);
   52545           0 :         if (value == NULL) {
   52546           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   52547           0 :                 return -1;
   52548             :         }
   52549           0 :         if (value == Py_None) {
   52550           0 :                 object->in.server_unc = NULL;
   52551             :         } else {
   52552           0 :                 object->in.server_unc = NULL;
   52553             :                 {
   52554           0 :                         const char *test_str;
   52555           0 :                         const char *talloc_str;
   52556           0 :                         PyObject *unicode = NULL;
   52557           0 :                         if (PyUnicode_Check(value)) {
   52558           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   52559           0 :                                 if (unicode == NULL) {
   52560           0 :                                         return -1;
   52561             :                                 }
   52562           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52563           0 :                         } else if (PyBytes_Check(value)) {
   52564           0 :                                 test_str = PyBytes_AS_STRING(value);
   52565             :                         } else {
   52566           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   52567           0 :                                 return -1;
   52568             :                         }
   52569           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   52570           0 :                         if (unicode != NULL) {
   52571           0 :                                 Py_DECREF(unicode);
   52572             :                         }
   52573           0 :                         if (talloc_str == NULL) {
   52574           0 :                                 PyErr_NoMemory();
   52575           0 :                                 return -1;
   52576             :                         }
   52577           0 :                         object->in.server_unc = talloc_str;
   52578             :                 }
   52579             :         }
   52580           0 :         return 0;
   52581             : }
   52582             : 
   52583           0 : static PyObject *py_srvsvc_NetPathCompare_in_get_path1(PyObject *obj, void *closure)
   52584             : {
   52585           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(obj);
   52586           0 :         PyObject *py_path1;
   52587           0 :         if (object->in.path1 == NULL) {
   52588           0 :                 py_path1 = Py_None;
   52589           0 :                 Py_INCREF(py_path1);
   52590             :         } else {
   52591           0 :                 py_path1 = PyUnicode_Decode(object->in.path1, strlen(object->in.path1), "utf-8", "ignore");
   52592             :         }
   52593           0 :         return py_path1;
   52594             : }
   52595             : 
   52596           0 : static int py_srvsvc_NetPathCompare_in_set_path1(PyObject *py_obj, PyObject *value, void *closure)
   52597             : {
   52598           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(py_obj);
   52599           0 :         if (value == NULL) {
   52600           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.path1");
   52601           0 :                 return -1;
   52602             :         }
   52603             :         {
   52604           0 :                 const char *test_str;
   52605           0 :                 const char *talloc_str;
   52606           0 :                 PyObject *unicode = NULL;
   52607           0 :                 if (PyUnicode_Check(value)) {
   52608           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   52609           0 :                         if (unicode == NULL) {
   52610           0 :                                 return -1;
   52611             :                         }
   52612           0 :                         test_str = PyBytes_AS_STRING(unicode);
   52613           0 :                 } else if (PyBytes_Check(value)) {
   52614           0 :                         test_str = PyBytes_AS_STRING(value);
   52615             :                 } else {
   52616           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   52617           0 :                         return -1;
   52618             :                 }
   52619           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   52620           0 :                 if (unicode != NULL) {
   52621           0 :                         Py_DECREF(unicode);
   52622             :                 }
   52623           0 :                 if (talloc_str == NULL) {
   52624           0 :                         PyErr_NoMemory();
   52625           0 :                         return -1;
   52626             :                 }
   52627           0 :                 object->in.path1 = talloc_str;
   52628             :         }
   52629           0 :         return 0;
   52630             : }
   52631             : 
   52632           0 : static PyObject *py_srvsvc_NetPathCompare_in_get_path2(PyObject *obj, void *closure)
   52633             : {
   52634           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(obj);
   52635           0 :         PyObject *py_path2;
   52636           0 :         if (object->in.path2 == NULL) {
   52637           0 :                 py_path2 = Py_None;
   52638           0 :                 Py_INCREF(py_path2);
   52639             :         } else {
   52640           0 :                 py_path2 = PyUnicode_Decode(object->in.path2, strlen(object->in.path2), "utf-8", "ignore");
   52641             :         }
   52642           0 :         return py_path2;
   52643             : }
   52644             : 
   52645           0 : static int py_srvsvc_NetPathCompare_in_set_path2(PyObject *py_obj, PyObject *value, void *closure)
   52646             : {
   52647           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(py_obj);
   52648           0 :         if (value == NULL) {
   52649           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.path2");
   52650           0 :                 return -1;
   52651             :         }
   52652             :         {
   52653           0 :                 const char *test_str;
   52654           0 :                 const char *talloc_str;
   52655           0 :                 PyObject *unicode = NULL;
   52656           0 :                 if (PyUnicode_Check(value)) {
   52657           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   52658           0 :                         if (unicode == NULL) {
   52659           0 :                                 return -1;
   52660             :                         }
   52661           0 :                         test_str = PyBytes_AS_STRING(unicode);
   52662           0 :                 } else if (PyBytes_Check(value)) {
   52663           0 :                         test_str = PyBytes_AS_STRING(value);
   52664             :                 } else {
   52665           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   52666           0 :                         return -1;
   52667             :                 }
   52668           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   52669           0 :                 if (unicode != NULL) {
   52670           0 :                         Py_DECREF(unicode);
   52671             :                 }
   52672           0 :                 if (talloc_str == NULL) {
   52673           0 :                         PyErr_NoMemory();
   52674           0 :                         return -1;
   52675             :                 }
   52676           0 :                 object->in.path2 = talloc_str;
   52677             :         }
   52678           0 :         return 0;
   52679             : }
   52680             : 
   52681           0 : static PyObject *py_srvsvc_NetPathCompare_in_get_pathtype(PyObject *obj, void *closure)
   52682             : {
   52683           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(obj);
   52684           0 :         PyObject *py_pathtype;
   52685           0 :         py_pathtype = PyLong_FromUnsignedLongLong((uint32_t)(object->in.pathtype));
   52686           0 :         return py_pathtype;
   52687             : }
   52688             : 
   52689           0 : static int py_srvsvc_NetPathCompare_in_set_pathtype(PyObject *py_obj, PyObject *value, void *closure)
   52690             : {
   52691           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(py_obj);
   52692           0 :         if (value == NULL) {
   52693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pathtype");
   52694           0 :                 return -1;
   52695             :         }
   52696             :         {
   52697           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.pathtype));
   52698           0 :                 if (PyLong_Check(value)) {
   52699           0 :                         unsigned long long test_var;
   52700           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   52701           0 :                         if (PyErr_Occurred() != NULL) {
   52702           0 :                                 return -1;
   52703             :                         }
   52704           0 :                         if (test_var > uint_max) {
   52705           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52706             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52707           0 :                                 return -1;
   52708             :                         }
   52709           0 :                         object->in.pathtype = test_var;
   52710             :                 } else {
   52711           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52712             :                           PyLong_Type.tp_name);
   52713           0 :                         return -1;
   52714             :                 }
   52715             :         }
   52716           0 :         return 0;
   52717             : }
   52718             : 
   52719           0 : static PyObject *py_srvsvc_NetPathCompare_in_get_pathflags(PyObject *obj, void *closure)
   52720             : {
   52721           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(obj);
   52722           0 :         PyObject *py_pathflags;
   52723           0 :         py_pathflags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.pathflags));
   52724           0 :         return py_pathflags;
   52725             : }
   52726             : 
   52727           0 : static int py_srvsvc_NetPathCompare_in_set_pathflags(PyObject *py_obj, PyObject *value, void *closure)
   52728             : {
   52729           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(py_obj);
   52730           0 :         if (value == NULL) {
   52731           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pathflags");
   52732           0 :                 return -1;
   52733             :         }
   52734             :         {
   52735           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.pathflags));
   52736           0 :                 if (PyLong_Check(value)) {
   52737           0 :                         unsigned long long test_var;
   52738           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   52739           0 :                         if (PyErr_Occurred() != NULL) {
   52740           0 :                                 return -1;
   52741             :                         }
   52742           0 :                         if (test_var > uint_max) {
   52743           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52744             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52745           0 :                                 return -1;
   52746             :                         }
   52747           0 :                         object->in.pathflags = test_var;
   52748             :                 } else {
   52749           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52750             :                           PyLong_Type.tp_name);
   52751           0 :                         return -1;
   52752             :                 }
   52753             :         }
   52754           0 :         return 0;
   52755             : }
   52756             : 
   52757           0 : static PyObject *py_srvsvc_NetPathCompare_get_result(PyObject *obj, void *closure)
   52758             : {
   52759           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(obj);
   52760           0 :         PyObject *py_result;
   52761           0 :         py_result = PyErr_FromWERROR(object->out.result);
   52762           0 :         return py_result;
   52763             : }
   52764             : 
   52765           0 : static int py_srvsvc_NetPathCompare_set_result(PyObject *py_obj, PyObject *value, void *closure)
   52766             : {
   52767           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(py_obj);
   52768           0 :         if (value == NULL) {
   52769           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   52770           0 :                 return -1;
   52771             :         }
   52772           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   52773           0 :         return 0;
   52774             : }
   52775             : 
   52776             : static PyGetSetDef py_srvsvc_NetPathCompare_getsetters[] = {
   52777             :         {
   52778             :                 .name = discard_const_p(char, "in_server_unc"),
   52779             :                 .get = py_srvsvc_NetPathCompare_in_get_server_unc,
   52780             :                 .set = py_srvsvc_NetPathCompare_in_set_server_unc,
   52781             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52782             :         },
   52783             :         {
   52784             :                 .name = discard_const_p(char, "in_path1"),
   52785             :                 .get = py_srvsvc_NetPathCompare_in_get_path1,
   52786             :                 .set = py_srvsvc_NetPathCompare_in_set_path1,
   52787             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52788             :         },
   52789             :         {
   52790             :                 .name = discard_const_p(char, "in_path2"),
   52791             :                 .get = py_srvsvc_NetPathCompare_in_get_path2,
   52792             :                 .set = py_srvsvc_NetPathCompare_in_set_path2,
   52793             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52794             :         },
   52795             :         {
   52796             :                 .name = discard_const_p(char, "in_pathtype"),
   52797             :                 .get = py_srvsvc_NetPathCompare_in_get_pathtype,
   52798             :                 .set = py_srvsvc_NetPathCompare_in_set_pathtype,
   52799             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52800             :         },
   52801             :         {
   52802             :                 .name = discard_const_p(char, "in_pathflags"),
   52803             :                 .get = py_srvsvc_NetPathCompare_in_get_pathflags,
   52804             :                 .set = py_srvsvc_NetPathCompare_in_set_pathflags,
   52805             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52806             :         },
   52807             :         {
   52808             :                 .name = discard_const_p(char, "result"),
   52809             :                 .get = py_srvsvc_NetPathCompare_get_result,
   52810             :                 .set = py_srvsvc_NetPathCompare_set_result,
   52811             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   52812             :         },
   52813             :         { .name = NULL }
   52814             : };
   52815             : 
   52816           0 : static PyObject *py_srvsvc_NetPathCompare_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   52817             : {
   52818           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetPathCompare, type);
   52819           0 :         return self;
   52820             : }
   52821             : 
   52822           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   52823             : {
   52824             : 
   52825             : 
   52826           0 :         return PyLong_FromLong(32);
   52827             : }
   52828             : 
   52829           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   52830             : {
   52831           0 :         const struct ndr_interface_call *call = NULL;
   52832           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(py_obj);
   52833           0 :         PyObject *ret = NULL;
   52834           0 :         struct ndr_push *push = NULL;
   52835           0 :         DATA_BLOB blob;
   52836           0 :         enum ndr_err_code err;
   52837             : 
   52838           0 :         if (ndr_table_srvsvc.num_calls < 33) {
   52839           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathCompare_ndr_pack");
   52840           0 :                 return NULL;
   52841             :         }
   52842           0 :         call = &ndr_table_srvsvc.calls[32];
   52843             : 
   52844           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   52845           0 :         if (push == NULL) {
   52846           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52847           0 :                 return NULL;
   52848             :         }
   52849             : 
   52850           0 :         push->flags |= ndr_push_flags;
   52851             : 
   52852           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   52853           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52854           0 :                 TALLOC_FREE(push);
   52855           0 :                 PyErr_SetNdrError(err);
   52856           0 :                 return NULL;
   52857             :         }
   52858           0 :         blob = ndr_push_blob(push);
   52859           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   52860           0 :         TALLOC_FREE(push);
   52861           0 :         return ret;
   52862             : }
   52863             : 
   52864           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52865             : {
   52866           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52867           0 :         PyObject *bigendian_obj = NULL;
   52868           0 :         PyObject *ndr64_obj = NULL;
   52869           0 :         libndr_flags ndr_push_flags = 0;
   52870             : 
   52871           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   52872             :                 discard_const_p(char *, kwnames),
   52873             :                 &bigendian_obj,
   52874             :                 &ndr64_obj)) {
   52875           0 :                 return NULL;
   52876             :         }
   52877             : 
   52878           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52879           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52880             :         }
   52881           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52882           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52883             :         }
   52884             : 
   52885           0 :         return py_srvsvc_NetPathCompare_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   52886             : }
   52887             : 
   52888           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52889             : {
   52890           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52891           0 :         PyObject *bigendian_obj = NULL;
   52892           0 :         PyObject *ndr64_obj = NULL;
   52893           0 :         libndr_flags ndr_push_flags = 0;
   52894             : 
   52895           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   52896             :                 discard_const_p(char *, kwnames),
   52897             :                 &bigendian_obj,
   52898             :                 &ndr64_obj)) {
   52899           0 :                 return NULL;
   52900             :         }
   52901             : 
   52902           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52903           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52904             :         }
   52905           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52906           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52907             :         }
   52908             : 
   52909           0 :         return py_srvsvc_NetPathCompare_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   52910             : }
   52911             : 
   52912           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   52913             : {
   52914           0 :         const struct ndr_interface_call *call = NULL;
   52915           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(py_obj);
   52916           0 :         struct ndr_pull *pull = NULL;
   52917           0 :         enum ndr_err_code err;
   52918             : 
   52919           0 :         if (ndr_table_srvsvc.num_calls < 33) {
   52920           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathCompare_ndr_unpack");
   52921           0 :                 return NULL;
   52922             :         }
   52923           0 :         call = &ndr_table_srvsvc.calls[32];
   52924             : 
   52925           0 :         pull = ndr_pull_init_blob(blob, object);
   52926           0 :         if (pull == NULL) {
   52927           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52928           0 :                 return NULL;
   52929             :         }
   52930             : 
   52931           0 :         pull->flags |= ndr_pull_flags;
   52932             : 
   52933           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   52934           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52935           0 :                 TALLOC_FREE(pull);
   52936           0 :                 PyErr_SetNdrError(err);
   52937           0 :                 return NULL;
   52938             :         }
   52939           0 :         if (!allow_remaining) {
   52940           0 :                 uint32_t highest_ofs;
   52941             : 
   52942           0 :                 if (pull->offset > pull->relative_highest_offset) {
   52943           0 :                         highest_ofs = pull->offset;
   52944             :                 } else {
   52945           0 :                         highest_ofs = pull->relative_highest_offset;
   52946             :                 }
   52947           0 :                 if (highest_ofs < pull->data_size) {
   52948           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   52949             :                                 "not all bytes consumed ofs[%u] size[%u]",
   52950             :                                 highest_ofs, pull->data_size);
   52951           0 :                         TALLOC_FREE(pull);
   52952           0 :                         PyErr_SetNdrError(err);
   52953           0 :                         return NULL;
   52954             :                 }
   52955             :         }
   52956             : 
   52957           0 :         TALLOC_FREE(pull);
   52958           0 :         Py_RETURN_NONE;
   52959             : }
   52960             : 
   52961           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52962             : {
   52963           0 :         DATA_BLOB blob;
   52964           0 :         Py_ssize_t blob_length = 0;
   52965           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52966           0 :         PyObject *bigendian_obj = NULL;
   52967           0 :         PyObject *ndr64_obj = NULL;
   52968           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52969           0 :         PyObject *allow_remaining_obj = NULL;
   52970           0 :         bool allow_remaining = false;
   52971             : 
   52972           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   52973             :                 discard_const_p(char *, kwnames),
   52974             :                 &blob.data, &blob_length,
   52975             :                 &bigendian_obj,
   52976             :                 &ndr64_obj,
   52977             :                 &allow_remaining_obj)) {
   52978           0 :                 return NULL;
   52979             :         }
   52980           0 :         blob.length = blob_length;
   52981             : 
   52982           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52983           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52984             :         }
   52985           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52986           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52987             :         }
   52988             : 
   52989           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52990           0 :                 allow_remaining = true;
   52991             :         }
   52992             : 
   52993           0 :         return py_srvsvc_NetPathCompare_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   52994             : }
   52995             : 
   52996           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52997             : {
   52998           0 :         DATA_BLOB blob;
   52999           0 :         Py_ssize_t blob_length = 0;
   53000           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53001           0 :         PyObject *bigendian_obj = NULL;
   53002           0 :         PyObject *ndr64_obj = NULL;
   53003           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53004           0 :         PyObject *allow_remaining_obj = NULL;
   53005           0 :         bool allow_remaining = false;
   53006             : 
   53007           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   53008             :                 discard_const_p(char *, kwnames),
   53009             :                 &blob.data, &blob_length,
   53010             :                 &bigendian_obj,
   53011             :                 &ndr64_obj,
   53012             :                 &allow_remaining_obj)) {
   53013           0 :                 return NULL;
   53014             :         }
   53015           0 :         blob.length = blob_length;
   53016             : 
   53017           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53018           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53019             :         }
   53020           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53021           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53022             :         }
   53023             : 
   53024           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53025           0 :                 allow_remaining = true;
   53026             :         }
   53027             : 
   53028           0 :         return py_srvsvc_NetPathCompare_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   53029             : }
   53030             : 
   53031           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   53032             : {
   53033           0 :         const struct ndr_interface_call *call = NULL;
   53034           0 :         struct srvsvc_NetPathCompare *object = pytalloc_get_ptr(py_obj);
   53035           0 :         PyObject *ret;
   53036           0 :         char *retstr;
   53037             : 
   53038           0 :         if (ndr_table_srvsvc.num_calls < 33) {
   53039           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathCompare_ndr_print");
   53040           0 :                 return NULL;
   53041             :         }
   53042           0 :         call = &ndr_table_srvsvc.calls[32];
   53043             : 
   53044           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   53045           0 :         ret = PyUnicode_FromString(retstr);
   53046           0 :         TALLOC_FREE(retstr);
   53047             : 
   53048           0 :         return ret;
   53049             : }
   53050             : 
   53051           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53052             : {
   53053           0 :         return py_srvsvc_NetPathCompare_ndr_print(py_obj, "srvsvc_NetPathCompare_in", NDR_IN);
   53054             : }
   53055             : 
   53056           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53057             : {
   53058           0 :         return py_srvsvc_NetPathCompare_ndr_print(py_obj, "srvsvc_NetPathCompare_out", NDR_OUT);
   53059             : }
   53060             : 
   53061             : static PyMethodDef py_srvsvc_NetPathCompare_methods[] = {
   53062             :         { "opnum", (PyCFunction)py_srvsvc_NetPathCompare_ndr_opnum, METH_NOARGS|METH_CLASS,
   53063             :                 "srvsvc.NetPathCompare.opnum() -> 32 (0x20) " },
   53064             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCompare_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   53065             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   53066             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCompare_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   53067             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   53068             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCompare_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   53069             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   53070             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCompare_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   53071             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   53072             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetPathCompare_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   53073             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetPathCompare_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   53074             :         { NULL, NULL, 0, NULL }
   53075             : };
   53076             : 
   53077             : 
   53078             : static PyTypeObject srvsvc_NetPathCompare_Type = {
   53079             :         PyVarObject_HEAD_INIT(NULL, 0)
   53080             :         .tp_name = "srvsvc.NetPathCompare",
   53081             :         .tp_getset = py_srvsvc_NetPathCompare_getsetters,
   53082             :         .tp_methods = py_srvsvc_NetPathCompare_methods,
   53083             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   53084             :         .tp_new = py_srvsvc_NetPathCompare_new,
   53085             : };
   53086             : 
   53087           0 : static bool pack_py_srvsvc_NetPathCompare_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetPathCompare *r)
   53088             : {
   53089           0 :         PyObject *py_server_unc;
   53090           0 :         PyObject *py_path1;
   53091           0 :         PyObject *py_path2;
   53092           0 :         PyObject *py_pathtype;
   53093           0 :         PyObject *py_pathflags;
   53094           0 :         const char *kwnames[] = {
   53095             :                 "server_unc", "path1", "path2", "pathtype", "pathflags", NULL
   53096             :         };
   53097             : 
   53098           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)) {
   53099           0 :                 return false;
   53100             :         }
   53101             : 
   53102           0 :         if (py_server_unc == NULL) {
   53103           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   53104           0 :                 return false;
   53105             :         }
   53106           0 :         if (py_server_unc == Py_None) {
   53107           0 :                 r->in.server_unc = NULL;
   53108             :         } else {
   53109           0 :                 r->in.server_unc = NULL;
   53110             :                 {
   53111           0 :                         const char *test_str;
   53112           0 :                         const char *talloc_str;
   53113           0 :                         PyObject *unicode = NULL;
   53114           0 :                         if (PyUnicode_Check(py_server_unc)) {
   53115           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   53116           0 :                                 if (unicode == NULL) {
   53117           0 :                                         return false;
   53118             :                                 }
   53119           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53120           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   53121           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   53122             :                         } else {
   53123           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   53124           0 :                                 return false;
   53125             :                         }
   53126           0 :                         talloc_str = talloc_strdup(r, test_str);
   53127           0 :                         if (unicode != NULL) {
   53128           0 :                                 Py_DECREF(unicode);
   53129             :                         }
   53130           0 :                         if (talloc_str == NULL) {
   53131           0 :                                 PyErr_NoMemory();
   53132           0 :                                 return false;
   53133             :                         }
   53134           0 :                         r->in.server_unc = talloc_str;
   53135             :                 }
   53136             :         }
   53137           0 :         if (py_path1 == NULL) {
   53138           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.path1");
   53139           0 :                 return false;
   53140             :         }
   53141             :         {
   53142           0 :                 const char *test_str;
   53143           0 :                 const char *talloc_str;
   53144           0 :                 PyObject *unicode = NULL;
   53145           0 :                 if (PyUnicode_Check(py_path1)) {
   53146           0 :                         unicode = PyUnicode_AsEncodedString(py_path1, "utf-8", "ignore");
   53147           0 :                         if (unicode == NULL) {
   53148           0 :                                 return false;
   53149             :                         }
   53150           0 :                         test_str = PyBytes_AS_STRING(unicode);
   53151           0 :                 } else if (PyBytes_Check(py_path1)) {
   53152           0 :                         test_str = PyBytes_AS_STRING(py_path1);
   53153             :                 } else {
   53154           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path1)->tp_name);
   53155           0 :                         return false;
   53156             :                 }
   53157           0 :                 talloc_str = talloc_strdup(r, test_str);
   53158           0 :                 if (unicode != NULL) {
   53159           0 :                         Py_DECREF(unicode);
   53160             :                 }
   53161           0 :                 if (talloc_str == NULL) {
   53162           0 :                         PyErr_NoMemory();
   53163           0 :                         return false;
   53164             :                 }
   53165           0 :                 r->in.path1 = talloc_str;
   53166             :         }
   53167           0 :         if (py_path2 == NULL) {
   53168           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.path2");
   53169           0 :                 return false;
   53170             :         }
   53171             :         {
   53172           0 :                 const char *test_str;
   53173           0 :                 const char *talloc_str;
   53174           0 :                 PyObject *unicode = NULL;
   53175           0 :                 if (PyUnicode_Check(py_path2)) {
   53176           0 :                         unicode = PyUnicode_AsEncodedString(py_path2, "utf-8", "ignore");
   53177           0 :                         if (unicode == NULL) {
   53178           0 :                                 return false;
   53179             :                         }
   53180           0 :                         test_str = PyBytes_AS_STRING(unicode);
   53181           0 :                 } else if (PyBytes_Check(py_path2)) {
   53182           0 :                         test_str = PyBytes_AS_STRING(py_path2);
   53183             :                 } else {
   53184           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path2)->tp_name);
   53185           0 :                         return false;
   53186             :                 }
   53187           0 :                 talloc_str = talloc_strdup(r, test_str);
   53188           0 :                 if (unicode != NULL) {
   53189           0 :                         Py_DECREF(unicode);
   53190             :                 }
   53191           0 :                 if (talloc_str == NULL) {
   53192           0 :                         PyErr_NoMemory();
   53193           0 :                         return false;
   53194             :                 }
   53195           0 :                 r->in.path2 = talloc_str;
   53196             :         }
   53197           0 :         if (py_pathtype == NULL) {
   53198           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pathtype");
   53199           0 :                 return false;
   53200             :         }
   53201             :         {
   53202           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathtype));
   53203           0 :                 if (PyLong_Check(py_pathtype)) {
   53204           0 :                         unsigned long long test_var;
   53205           0 :                         test_var = PyLong_AsUnsignedLongLong(py_pathtype);
   53206           0 :                         if (PyErr_Occurred() != NULL) {
   53207           0 :                                 return false;
   53208             :                         }
   53209           0 :                         if (test_var > uint_max) {
   53210           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   53211             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53212           0 :                                 return false;
   53213             :                         }
   53214           0 :                         r->in.pathtype = test_var;
   53215             :                 } else {
   53216           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   53217             :                           PyLong_Type.tp_name);
   53218           0 :                         return false;
   53219             :                 }
   53220             :         }
   53221           0 :         if (py_pathflags == NULL) {
   53222           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pathflags");
   53223           0 :                 return false;
   53224             :         }
   53225             :         {
   53226           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathflags));
   53227           0 :                 if (PyLong_Check(py_pathflags)) {
   53228           0 :                         unsigned long long test_var;
   53229           0 :                         test_var = PyLong_AsUnsignedLongLong(py_pathflags);
   53230           0 :                         if (PyErr_Occurred() != NULL) {
   53231           0 :                                 return false;
   53232             :                         }
   53233           0 :                         if (test_var > uint_max) {
   53234           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   53235             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53236           0 :                                 return false;
   53237             :                         }
   53238           0 :                         r->in.pathflags = test_var;
   53239             :                 } else {
   53240           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   53241             :                           PyLong_Type.tp_name);
   53242           0 :                         return false;
   53243             :                 }
   53244             :         }
   53245           0 :         return true;
   53246             : }
   53247             : 
   53248           0 : static PyObject *unpack_py_srvsvc_NetPathCompare_args_out(struct srvsvc_NetPathCompare *r)
   53249             : {
   53250           0 :         PyObject *result;
   53251           0 :         result = Py_None;
   53252           0 :         Py_INCREF(result);
   53253           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   53254           0 :                 PyErr_SetWERROR(r->out.result);
   53255           0 :                 return NULL;
   53256             :         }
   53257             : 
   53258           0 :         return result;
   53259             : }
   53260             : 
   53261             : 
   53262           0 : static PyObject *py_srvsvc_NetNameValidate_in_get_server_unc(PyObject *obj, void *closure)
   53263             : {
   53264           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(obj);
   53265           0 :         PyObject *py_server_unc;
   53266           0 :         if (object->in.server_unc == NULL) {
   53267           0 :                 Py_RETURN_NONE;
   53268             :         }
   53269           0 :         if (object->in.server_unc == NULL) {
   53270           0 :                 py_server_unc = Py_None;
   53271           0 :                 Py_INCREF(py_server_unc);
   53272             :         } else {
   53273           0 :                 if (object->in.server_unc == NULL) {
   53274           0 :                         py_server_unc = Py_None;
   53275           0 :                         Py_INCREF(py_server_unc);
   53276             :                 } else {
   53277           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   53278             :                 }
   53279             :         }
   53280           0 :         return py_server_unc;
   53281             : }
   53282             : 
   53283           0 : static int py_srvsvc_NetNameValidate_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   53284             : {
   53285           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(py_obj);
   53286           0 :         if (value == NULL) {
   53287           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   53288           0 :                 return -1;
   53289             :         }
   53290           0 :         if (value == Py_None) {
   53291           0 :                 object->in.server_unc = NULL;
   53292             :         } else {
   53293           0 :                 object->in.server_unc = NULL;
   53294             :                 {
   53295           0 :                         const char *test_str;
   53296           0 :                         const char *talloc_str;
   53297           0 :                         PyObject *unicode = NULL;
   53298           0 :                         if (PyUnicode_Check(value)) {
   53299           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   53300           0 :                                 if (unicode == NULL) {
   53301           0 :                                         return -1;
   53302             :                                 }
   53303           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53304           0 :                         } else if (PyBytes_Check(value)) {
   53305           0 :                                 test_str = PyBytes_AS_STRING(value);
   53306             :                         } else {
   53307           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   53308           0 :                                 return -1;
   53309             :                         }
   53310           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   53311           0 :                         if (unicode != NULL) {
   53312           0 :                                 Py_DECREF(unicode);
   53313             :                         }
   53314           0 :                         if (talloc_str == NULL) {
   53315           0 :                                 PyErr_NoMemory();
   53316           0 :                                 return -1;
   53317             :                         }
   53318           0 :                         object->in.server_unc = talloc_str;
   53319             :                 }
   53320             :         }
   53321           0 :         return 0;
   53322             : }
   53323             : 
   53324           0 : static PyObject *py_srvsvc_NetNameValidate_in_get_name(PyObject *obj, void *closure)
   53325             : {
   53326           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(obj);
   53327           0 :         PyObject *py_name;
   53328           0 :         if (object->in.name == NULL) {
   53329           0 :                 py_name = Py_None;
   53330           0 :                 Py_INCREF(py_name);
   53331             :         } else {
   53332           0 :                 py_name = PyUnicode_Decode(object->in.name, strlen(object->in.name), "utf-8", "ignore");
   53333             :         }
   53334           0 :         return py_name;
   53335             : }
   53336             : 
   53337           0 : static int py_srvsvc_NetNameValidate_in_set_name(PyObject *py_obj, PyObject *value, void *closure)
   53338             : {
   53339           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(py_obj);
   53340           0 :         if (value == NULL) {
   53341           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.name");
   53342           0 :                 return -1;
   53343             :         }
   53344             :         {
   53345           0 :                 const char *test_str;
   53346           0 :                 const char *talloc_str;
   53347           0 :                 PyObject *unicode = NULL;
   53348           0 :                 if (PyUnicode_Check(value)) {
   53349           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   53350           0 :                         if (unicode == NULL) {
   53351           0 :                                 return -1;
   53352             :                         }
   53353           0 :                         test_str = PyBytes_AS_STRING(unicode);
   53354           0 :                 } else if (PyBytes_Check(value)) {
   53355           0 :                         test_str = PyBytes_AS_STRING(value);
   53356             :                 } else {
   53357           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   53358           0 :                         return -1;
   53359             :                 }
   53360           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   53361           0 :                 if (unicode != NULL) {
   53362           0 :                         Py_DECREF(unicode);
   53363             :                 }
   53364           0 :                 if (talloc_str == NULL) {
   53365           0 :                         PyErr_NoMemory();
   53366           0 :                         return -1;
   53367             :                 }
   53368           0 :                 object->in.name = talloc_str;
   53369             :         }
   53370           0 :         return 0;
   53371             : }
   53372             : 
   53373           0 : static PyObject *py_srvsvc_NetNameValidate_in_get_name_type(PyObject *obj, void *closure)
   53374             : {
   53375           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(obj);
   53376           0 :         PyObject *py_name_type;
   53377           0 :         py_name_type = PyLong_FromUnsignedLongLong((uint32_t)(object->in.name_type));
   53378           0 :         return py_name_type;
   53379             : }
   53380             : 
   53381           0 : static int py_srvsvc_NetNameValidate_in_set_name_type(PyObject *py_obj, PyObject *value, void *closure)
   53382             : {
   53383           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(py_obj);
   53384           0 :         if (value == NULL) {
   53385           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.name_type");
   53386           0 :                 return -1;
   53387             :         }
   53388             :         {
   53389           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.name_type));
   53390           0 :                 if (PyLong_Check(value)) {
   53391           0 :                         unsigned long long test_var;
   53392           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   53393           0 :                         if (PyErr_Occurred() != NULL) {
   53394           0 :                                 return -1;
   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 -1;
   53400             :                         }
   53401           0 :                         object->in.name_type = test_var;
   53402             :                 } else {
   53403           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   53404             :                           PyLong_Type.tp_name);
   53405           0 :                         return -1;
   53406             :                 }
   53407             :         }
   53408           0 :         return 0;
   53409             : }
   53410             : 
   53411           0 : static PyObject *py_srvsvc_NetNameValidate_in_get_flags(PyObject *obj, void *closure)
   53412             : {
   53413           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(obj);
   53414           0 :         PyObject *py_flags;
   53415           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
   53416           0 :         return py_flags;
   53417             : }
   53418             : 
   53419           0 : static int py_srvsvc_NetNameValidate_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   53420             : {
   53421           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(py_obj);
   53422           0 :         if (value == NULL) {
   53423           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
   53424           0 :                 return -1;
   53425             :         }
   53426             :         {
   53427           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   53428           0 :                 if (PyLong_Check(value)) {
   53429           0 :                         unsigned long long test_var;
   53430           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   53431           0 :                         if (PyErr_Occurred() != NULL) {
   53432           0 :                                 return -1;
   53433             :                         }
   53434           0 :                         if (test_var > uint_max) {
   53435           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   53436             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53437           0 :                                 return -1;
   53438             :                         }
   53439           0 :                         object->in.flags = test_var;
   53440             :                 } else {
   53441           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   53442             :                           PyLong_Type.tp_name);
   53443           0 :                         return -1;
   53444             :                 }
   53445             :         }
   53446           0 :         return 0;
   53447             : }
   53448             : 
   53449           0 : static PyObject *py_srvsvc_NetNameValidate_get_result(PyObject *obj, void *closure)
   53450             : {
   53451           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(obj);
   53452           0 :         PyObject *py_result;
   53453           0 :         py_result = PyErr_FromWERROR(object->out.result);
   53454           0 :         return py_result;
   53455             : }
   53456             : 
   53457           0 : static int py_srvsvc_NetNameValidate_set_result(PyObject *py_obj, PyObject *value, void *closure)
   53458             : {
   53459           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(py_obj);
   53460           0 :         if (value == NULL) {
   53461           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   53462           0 :                 return -1;
   53463             :         }
   53464           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   53465           0 :         return 0;
   53466             : }
   53467             : 
   53468             : static PyGetSetDef py_srvsvc_NetNameValidate_getsetters[] = {
   53469             :         {
   53470             :                 .name = discard_const_p(char, "in_server_unc"),
   53471             :                 .get = py_srvsvc_NetNameValidate_in_get_server_unc,
   53472             :                 .set = py_srvsvc_NetNameValidate_in_set_server_unc,
   53473             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   53474             :         },
   53475             :         {
   53476             :                 .name = discard_const_p(char, "in_name"),
   53477             :                 .get = py_srvsvc_NetNameValidate_in_get_name,
   53478             :                 .set = py_srvsvc_NetNameValidate_in_set_name,
   53479             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   53480             :         },
   53481             :         {
   53482             :                 .name = discard_const_p(char, "in_name_type"),
   53483             :                 .get = py_srvsvc_NetNameValidate_in_get_name_type,
   53484             :                 .set = py_srvsvc_NetNameValidate_in_set_name_type,
   53485             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   53486             :         },
   53487             :         {
   53488             :                 .name = discard_const_p(char, "in_flags"),
   53489             :                 .get = py_srvsvc_NetNameValidate_in_get_flags,
   53490             :                 .set = py_srvsvc_NetNameValidate_in_set_flags,
   53491             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   53492             :         },
   53493             :         {
   53494             :                 .name = discard_const_p(char, "result"),
   53495             :                 .get = py_srvsvc_NetNameValidate_get_result,
   53496             :                 .set = py_srvsvc_NetNameValidate_set_result,
   53497             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   53498             :         },
   53499             :         { .name = NULL }
   53500             : };
   53501             : 
   53502           0 : static PyObject *py_srvsvc_NetNameValidate_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   53503             : {
   53504           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetNameValidate, type);
   53505           0 :         return self;
   53506             : }
   53507             : 
   53508           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   53509             : {
   53510             : 
   53511             : 
   53512           0 :         return PyLong_FromLong(33);
   53513             : }
   53514             : 
   53515           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   53516             : {
   53517           0 :         const struct ndr_interface_call *call = NULL;
   53518           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(py_obj);
   53519           0 :         PyObject *ret = NULL;
   53520           0 :         struct ndr_push *push = NULL;
   53521           0 :         DATA_BLOB blob;
   53522           0 :         enum ndr_err_code err;
   53523             : 
   53524           0 :         if (ndr_table_srvsvc.num_calls < 34) {
   53525           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetNameValidate_ndr_pack");
   53526           0 :                 return NULL;
   53527             :         }
   53528           0 :         call = &ndr_table_srvsvc.calls[33];
   53529             : 
   53530           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   53531           0 :         if (push == NULL) {
   53532           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53533           0 :                 return NULL;
   53534             :         }
   53535             : 
   53536           0 :         push->flags |= ndr_push_flags;
   53537             : 
   53538           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   53539           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53540           0 :                 TALLOC_FREE(push);
   53541           0 :                 PyErr_SetNdrError(err);
   53542           0 :                 return NULL;
   53543             :         }
   53544           0 :         blob = ndr_push_blob(push);
   53545           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   53546           0 :         TALLOC_FREE(push);
   53547           0 :         return ret;
   53548             : }
   53549             : 
   53550           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53551             : {
   53552           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53553           0 :         PyObject *bigendian_obj = NULL;
   53554           0 :         PyObject *ndr64_obj = NULL;
   53555           0 :         libndr_flags ndr_push_flags = 0;
   53556             : 
   53557           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   53558             :                 discard_const_p(char *, kwnames),
   53559             :                 &bigendian_obj,
   53560             :                 &ndr64_obj)) {
   53561           0 :                 return NULL;
   53562             :         }
   53563             : 
   53564           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53565           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53566             :         }
   53567           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53568           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53569             :         }
   53570             : 
   53571           0 :         return py_srvsvc_NetNameValidate_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   53572             : }
   53573             : 
   53574           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53575             : {
   53576           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53577           0 :         PyObject *bigendian_obj = NULL;
   53578           0 :         PyObject *ndr64_obj = NULL;
   53579           0 :         libndr_flags ndr_push_flags = 0;
   53580             : 
   53581           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   53582             :                 discard_const_p(char *, kwnames),
   53583             :                 &bigendian_obj,
   53584             :                 &ndr64_obj)) {
   53585           0 :                 return NULL;
   53586             :         }
   53587             : 
   53588           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53589           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53590             :         }
   53591           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53592           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53593             :         }
   53594             : 
   53595           0 :         return py_srvsvc_NetNameValidate_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   53596             : }
   53597             : 
   53598           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   53599             : {
   53600           0 :         const struct ndr_interface_call *call = NULL;
   53601           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(py_obj);
   53602           0 :         struct ndr_pull *pull = NULL;
   53603           0 :         enum ndr_err_code err;
   53604             : 
   53605           0 :         if (ndr_table_srvsvc.num_calls < 34) {
   53606           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetNameValidate_ndr_unpack");
   53607           0 :                 return NULL;
   53608             :         }
   53609           0 :         call = &ndr_table_srvsvc.calls[33];
   53610             : 
   53611           0 :         pull = ndr_pull_init_blob(blob, object);
   53612           0 :         if (pull == NULL) {
   53613           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53614           0 :                 return NULL;
   53615             :         }
   53616             : 
   53617           0 :         pull->flags |= ndr_pull_flags;
   53618             : 
   53619           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   53620           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53621           0 :                 TALLOC_FREE(pull);
   53622           0 :                 PyErr_SetNdrError(err);
   53623           0 :                 return NULL;
   53624             :         }
   53625           0 :         if (!allow_remaining) {
   53626           0 :                 uint32_t highest_ofs;
   53627             : 
   53628           0 :                 if (pull->offset > pull->relative_highest_offset) {
   53629           0 :                         highest_ofs = pull->offset;
   53630             :                 } else {
   53631           0 :                         highest_ofs = pull->relative_highest_offset;
   53632             :                 }
   53633           0 :                 if (highest_ofs < pull->data_size) {
   53634           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   53635             :                                 "not all bytes consumed ofs[%u] size[%u]",
   53636             :                                 highest_ofs, pull->data_size);
   53637           0 :                         TALLOC_FREE(pull);
   53638           0 :                         PyErr_SetNdrError(err);
   53639           0 :                         return NULL;
   53640             :                 }
   53641             :         }
   53642             : 
   53643           0 :         TALLOC_FREE(pull);
   53644           0 :         Py_RETURN_NONE;
   53645             : }
   53646             : 
   53647           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53648             : {
   53649           0 :         DATA_BLOB blob;
   53650           0 :         Py_ssize_t blob_length = 0;
   53651           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53652           0 :         PyObject *bigendian_obj = NULL;
   53653           0 :         PyObject *ndr64_obj = NULL;
   53654           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53655           0 :         PyObject *allow_remaining_obj = NULL;
   53656           0 :         bool allow_remaining = false;
   53657             : 
   53658           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   53659             :                 discard_const_p(char *, kwnames),
   53660             :                 &blob.data, &blob_length,
   53661             :                 &bigendian_obj,
   53662             :                 &ndr64_obj,
   53663             :                 &allow_remaining_obj)) {
   53664           0 :                 return NULL;
   53665             :         }
   53666           0 :         blob.length = blob_length;
   53667             : 
   53668           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53669           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53670             :         }
   53671           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53672           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53673             :         }
   53674             : 
   53675           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53676           0 :                 allow_remaining = true;
   53677             :         }
   53678             : 
   53679           0 :         return py_srvsvc_NetNameValidate_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   53680             : }
   53681             : 
   53682           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53683             : {
   53684           0 :         DATA_BLOB blob;
   53685           0 :         Py_ssize_t blob_length = 0;
   53686           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53687           0 :         PyObject *bigendian_obj = NULL;
   53688           0 :         PyObject *ndr64_obj = NULL;
   53689           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53690           0 :         PyObject *allow_remaining_obj = NULL;
   53691           0 :         bool allow_remaining = false;
   53692             : 
   53693           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   53694             :                 discard_const_p(char *, kwnames),
   53695             :                 &blob.data, &blob_length,
   53696             :                 &bigendian_obj,
   53697             :                 &ndr64_obj,
   53698             :                 &allow_remaining_obj)) {
   53699           0 :                 return NULL;
   53700             :         }
   53701           0 :         blob.length = blob_length;
   53702             : 
   53703           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53704           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53705             :         }
   53706           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53707           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53708             :         }
   53709             : 
   53710           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53711           0 :                 allow_remaining = true;
   53712             :         }
   53713             : 
   53714           0 :         return py_srvsvc_NetNameValidate_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   53715             : }
   53716             : 
   53717           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   53718             : {
   53719           0 :         const struct ndr_interface_call *call = NULL;
   53720           0 :         struct srvsvc_NetNameValidate *object = pytalloc_get_ptr(py_obj);
   53721           0 :         PyObject *ret;
   53722           0 :         char *retstr;
   53723             : 
   53724           0 :         if (ndr_table_srvsvc.num_calls < 34) {
   53725           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetNameValidate_ndr_print");
   53726           0 :                 return NULL;
   53727             :         }
   53728           0 :         call = &ndr_table_srvsvc.calls[33];
   53729             : 
   53730           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   53731           0 :         ret = PyUnicode_FromString(retstr);
   53732           0 :         TALLOC_FREE(retstr);
   53733             : 
   53734           0 :         return ret;
   53735             : }
   53736             : 
   53737           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53738             : {
   53739           0 :         return py_srvsvc_NetNameValidate_ndr_print(py_obj, "srvsvc_NetNameValidate_in", NDR_IN);
   53740             : }
   53741             : 
   53742           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53743             : {
   53744           0 :         return py_srvsvc_NetNameValidate_ndr_print(py_obj, "srvsvc_NetNameValidate_out", NDR_OUT);
   53745             : }
   53746             : 
   53747             : static PyMethodDef py_srvsvc_NetNameValidate_methods[] = {
   53748             :         { "opnum", (PyCFunction)py_srvsvc_NetNameValidate_ndr_opnum, METH_NOARGS|METH_CLASS,
   53749             :                 "srvsvc.NetNameValidate.opnum() -> 33 (0x21) " },
   53750             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetNameValidate_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   53751             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   53752             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetNameValidate_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   53753             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   53754             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetNameValidate_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   53755             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   53756             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetNameValidate_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   53757             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   53758             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetNameValidate_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   53759             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetNameValidate_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   53760             :         { NULL, NULL, 0, NULL }
   53761             : };
   53762             : 
   53763             : 
   53764             : static PyTypeObject srvsvc_NetNameValidate_Type = {
   53765             :         PyVarObject_HEAD_INIT(NULL, 0)
   53766             :         .tp_name = "srvsvc.NetNameValidate",
   53767             :         .tp_getset = py_srvsvc_NetNameValidate_getsetters,
   53768             :         .tp_methods = py_srvsvc_NetNameValidate_methods,
   53769             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   53770             :         .tp_new = py_srvsvc_NetNameValidate_new,
   53771             : };
   53772             : 
   53773           0 : static bool pack_py_srvsvc_NetNameValidate_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetNameValidate *r)
   53774             : {
   53775           0 :         PyObject *py_server_unc;
   53776           0 :         PyObject *py_name;
   53777           0 :         PyObject *py_name_type;
   53778           0 :         PyObject *py_flags;
   53779           0 :         const char *kwnames[] = {
   53780             :                 "server_unc", "name", "name_type", "flags", NULL
   53781             :         };
   53782             : 
   53783           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetNameValidate", discard_const_p(char *, kwnames), &py_server_unc, &py_name, &py_name_type, &py_flags)) {
   53784           0 :                 return false;
   53785             :         }
   53786             : 
   53787           0 :         if (py_server_unc == NULL) {
   53788           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   53789           0 :                 return false;
   53790             :         }
   53791           0 :         if (py_server_unc == Py_None) {
   53792           0 :                 r->in.server_unc = NULL;
   53793             :         } else {
   53794           0 :                 r->in.server_unc = NULL;
   53795             :                 {
   53796           0 :                         const char *test_str;
   53797           0 :                         const char *talloc_str;
   53798           0 :                         PyObject *unicode = NULL;
   53799           0 :                         if (PyUnicode_Check(py_server_unc)) {
   53800           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   53801           0 :                                 if (unicode == NULL) {
   53802           0 :                                         return false;
   53803             :                                 }
   53804           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53805           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   53806           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   53807             :                         } else {
   53808           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   53809           0 :                                 return false;
   53810             :                         }
   53811           0 :                         talloc_str = talloc_strdup(r, test_str);
   53812           0 :                         if (unicode != NULL) {
   53813           0 :                                 Py_DECREF(unicode);
   53814             :                         }
   53815           0 :                         if (talloc_str == NULL) {
   53816           0 :                                 PyErr_NoMemory();
   53817           0 :                                 return false;
   53818             :                         }
   53819           0 :                         r->in.server_unc = talloc_str;
   53820             :                 }
   53821             :         }
   53822           0 :         if (py_name == NULL) {
   53823           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.name");
   53824           0 :                 return false;
   53825             :         }
   53826             :         {
   53827           0 :                 const char *test_str;
   53828           0 :                 const char *talloc_str;
   53829           0 :                 PyObject *unicode = NULL;
   53830           0 :                 if (PyUnicode_Check(py_name)) {
   53831           0 :                         unicode = PyUnicode_AsEncodedString(py_name, "utf-8", "ignore");
   53832           0 :                         if (unicode == NULL) {
   53833           0 :                                 return false;
   53834             :                         }
   53835           0 :                         test_str = PyBytes_AS_STRING(unicode);
   53836           0 :                 } else if (PyBytes_Check(py_name)) {
   53837           0 :                         test_str = PyBytes_AS_STRING(py_name);
   53838             :                 } else {
   53839           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name)->tp_name);
   53840           0 :                         return false;
   53841             :                 }
   53842           0 :                 talloc_str = talloc_strdup(r, test_str);
   53843           0 :                 if (unicode != NULL) {
   53844           0 :                         Py_DECREF(unicode);
   53845             :                 }
   53846           0 :                 if (talloc_str == NULL) {
   53847           0 :                         PyErr_NoMemory();
   53848           0 :                         return false;
   53849             :                 }
   53850           0 :                 r->in.name = talloc_str;
   53851             :         }
   53852           0 :         if (py_name_type == NULL) {
   53853           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.name_type");
   53854           0 :                 return false;
   53855             :         }
   53856             :         {
   53857           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.name_type));
   53858           0 :                 if (PyLong_Check(py_name_type)) {
   53859           0 :                         unsigned long long test_var;
   53860           0 :                         test_var = PyLong_AsUnsignedLongLong(py_name_type);
   53861           0 :                         if (PyErr_Occurred() != NULL) {
   53862           0 :                                 return false;
   53863             :                         }
   53864           0 :                         if (test_var > uint_max) {
   53865           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   53866             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53867           0 :                                 return false;
   53868             :                         }
   53869           0 :                         r->in.name_type = test_var;
   53870             :                 } else {
   53871           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   53872             :                           PyLong_Type.tp_name);
   53873           0 :                         return false;
   53874             :                 }
   53875             :         }
   53876           0 :         if (py_flags == NULL) {
   53877           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
   53878           0 :                 return false;
   53879             :         }
   53880             :         {
   53881           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   53882           0 :                 if (PyLong_Check(py_flags)) {
   53883           0 :                         unsigned long long test_var;
   53884           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   53885           0 :                         if (PyErr_Occurred() != NULL) {
   53886           0 :                                 return false;
   53887             :                         }
   53888           0 :                         if (test_var > uint_max) {
   53889           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   53890             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53891           0 :                                 return false;
   53892             :                         }
   53893           0 :                         r->in.flags = test_var;
   53894             :                 } else {
   53895           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   53896             :                           PyLong_Type.tp_name);
   53897           0 :                         return false;
   53898             :                 }
   53899             :         }
   53900           0 :         return true;
   53901             : }
   53902             : 
   53903           0 : static PyObject *unpack_py_srvsvc_NetNameValidate_args_out(struct srvsvc_NetNameValidate *r)
   53904             : {
   53905           0 :         PyObject *result;
   53906           0 :         result = Py_None;
   53907           0 :         Py_INCREF(result);
   53908           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   53909           0 :                 PyErr_SetWERROR(r->out.result);
   53910           0 :                 return NULL;
   53911             :         }
   53912             : 
   53913           0 :         return result;
   53914             : }
   53915             : 
   53916             : 
   53917           0 : static PyObject *py_srvsvc_NetPRNameCompare_in_get_server_unc(PyObject *obj, void *closure)
   53918             : {
   53919           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(obj);
   53920           0 :         PyObject *py_server_unc;
   53921           0 :         if (object->in.server_unc == NULL) {
   53922           0 :                 Py_RETURN_NONE;
   53923             :         }
   53924           0 :         if (object->in.server_unc == NULL) {
   53925           0 :                 py_server_unc = Py_None;
   53926           0 :                 Py_INCREF(py_server_unc);
   53927             :         } else {
   53928           0 :                 if (object->in.server_unc == NULL) {
   53929           0 :                         py_server_unc = Py_None;
   53930           0 :                         Py_INCREF(py_server_unc);
   53931             :                 } else {
   53932           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   53933             :                 }
   53934             :         }
   53935           0 :         return py_server_unc;
   53936             : }
   53937             : 
   53938           0 : static int py_srvsvc_NetPRNameCompare_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   53939             : {
   53940           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(py_obj);
   53941           0 :         if (value == NULL) {
   53942           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   53943           0 :                 return -1;
   53944             :         }
   53945           0 :         if (value == Py_None) {
   53946           0 :                 object->in.server_unc = NULL;
   53947             :         } else {
   53948           0 :                 object->in.server_unc = NULL;
   53949             :                 {
   53950           0 :                         const char *test_str;
   53951           0 :                         const char *talloc_str;
   53952           0 :                         PyObject *unicode = NULL;
   53953           0 :                         if (PyUnicode_Check(value)) {
   53954           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   53955           0 :                                 if (unicode == NULL) {
   53956           0 :                                         return -1;
   53957             :                                 }
   53958           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53959           0 :                         } else if (PyBytes_Check(value)) {
   53960           0 :                                 test_str = PyBytes_AS_STRING(value);
   53961             :                         } else {
   53962           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   53963           0 :                                 return -1;
   53964             :                         }
   53965           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   53966           0 :                         if (unicode != NULL) {
   53967           0 :                                 Py_DECREF(unicode);
   53968             :                         }
   53969           0 :                         if (talloc_str == NULL) {
   53970           0 :                                 PyErr_NoMemory();
   53971           0 :                                 return -1;
   53972             :                         }
   53973           0 :                         object->in.server_unc = talloc_str;
   53974             :                 }
   53975             :         }
   53976           0 :         return 0;
   53977             : }
   53978             : 
   53979           0 : static PyObject *py_srvsvc_NetPRNameCompare_in_get_name1(PyObject *obj, void *closure)
   53980             : {
   53981           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(obj);
   53982           0 :         PyObject *py_name1;
   53983           0 :         if (object->in.name1 == NULL) {
   53984           0 :                 py_name1 = Py_None;
   53985           0 :                 Py_INCREF(py_name1);
   53986             :         } else {
   53987           0 :                 py_name1 = PyUnicode_Decode(object->in.name1, strlen(object->in.name1), "utf-8", "ignore");
   53988             :         }
   53989           0 :         return py_name1;
   53990             : }
   53991             : 
   53992           0 : static int py_srvsvc_NetPRNameCompare_in_set_name1(PyObject *py_obj, PyObject *value, void *closure)
   53993             : {
   53994           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(py_obj);
   53995           0 :         if (value == NULL) {
   53996           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.name1");
   53997           0 :                 return -1;
   53998             :         }
   53999             :         {
   54000           0 :                 const char *test_str;
   54001           0 :                 const char *talloc_str;
   54002           0 :                 PyObject *unicode = NULL;
   54003           0 :                 if (PyUnicode_Check(value)) {
   54004           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   54005           0 :                         if (unicode == NULL) {
   54006           0 :                                 return -1;
   54007             :                         }
   54008           0 :                         test_str = PyBytes_AS_STRING(unicode);
   54009           0 :                 } else if (PyBytes_Check(value)) {
   54010           0 :                         test_str = PyBytes_AS_STRING(value);
   54011             :                 } else {
   54012           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   54013           0 :                         return -1;
   54014             :                 }
   54015           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   54016           0 :                 if (unicode != NULL) {
   54017           0 :                         Py_DECREF(unicode);
   54018             :                 }
   54019           0 :                 if (talloc_str == NULL) {
   54020           0 :                         PyErr_NoMemory();
   54021           0 :                         return -1;
   54022             :                 }
   54023           0 :                 object->in.name1 = talloc_str;
   54024             :         }
   54025           0 :         return 0;
   54026             : }
   54027             : 
   54028           0 : static PyObject *py_srvsvc_NetPRNameCompare_in_get_name2(PyObject *obj, void *closure)
   54029             : {
   54030           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(obj);
   54031           0 :         PyObject *py_name2;
   54032           0 :         if (object->in.name2 == NULL) {
   54033           0 :                 py_name2 = Py_None;
   54034           0 :                 Py_INCREF(py_name2);
   54035             :         } else {
   54036           0 :                 py_name2 = PyUnicode_Decode(object->in.name2, strlen(object->in.name2), "utf-8", "ignore");
   54037             :         }
   54038           0 :         return py_name2;
   54039             : }
   54040             : 
   54041           0 : static int py_srvsvc_NetPRNameCompare_in_set_name2(PyObject *py_obj, PyObject *value, void *closure)
   54042             : {
   54043           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(py_obj);
   54044           0 :         if (value == NULL) {
   54045           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.name2");
   54046           0 :                 return -1;
   54047             :         }
   54048             :         {
   54049           0 :                 const char *test_str;
   54050           0 :                 const char *talloc_str;
   54051           0 :                 PyObject *unicode = NULL;
   54052           0 :                 if (PyUnicode_Check(value)) {
   54053           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   54054           0 :                         if (unicode == NULL) {
   54055           0 :                                 return -1;
   54056             :                         }
   54057           0 :                         test_str = PyBytes_AS_STRING(unicode);
   54058           0 :                 } else if (PyBytes_Check(value)) {
   54059           0 :                         test_str = PyBytes_AS_STRING(value);
   54060             :                 } else {
   54061           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   54062           0 :                         return -1;
   54063             :                 }
   54064           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   54065           0 :                 if (unicode != NULL) {
   54066           0 :                         Py_DECREF(unicode);
   54067             :                 }
   54068           0 :                 if (talloc_str == NULL) {
   54069           0 :                         PyErr_NoMemory();
   54070           0 :                         return -1;
   54071             :                 }
   54072           0 :                 object->in.name2 = talloc_str;
   54073             :         }
   54074           0 :         return 0;
   54075             : }
   54076             : 
   54077           0 : static PyObject *py_srvsvc_NetPRNameCompare_in_get_name_type(PyObject *obj, void *closure)
   54078             : {
   54079           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(obj);
   54080           0 :         PyObject *py_name_type;
   54081           0 :         py_name_type = PyLong_FromUnsignedLongLong((uint32_t)(object->in.name_type));
   54082           0 :         return py_name_type;
   54083             : }
   54084             : 
   54085           0 : static int py_srvsvc_NetPRNameCompare_in_set_name_type(PyObject *py_obj, PyObject *value, void *closure)
   54086             : {
   54087           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(py_obj);
   54088           0 :         if (value == NULL) {
   54089           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.name_type");
   54090           0 :                 return -1;
   54091             :         }
   54092             :         {
   54093           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.name_type));
   54094           0 :                 if (PyLong_Check(value)) {
   54095           0 :                         unsigned long long test_var;
   54096           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54097           0 :                         if (PyErr_Occurred() != NULL) {
   54098           0 :                                 return -1;
   54099             :                         }
   54100           0 :                         if (test_var > uint_max) {
   54101           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54102             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54103           0 :                                 return -1;
   54104             :                         }
   54105           0 :                         object->in.name_type = test_var;
   54106             :                 } else {
   54107           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54108             :                           PyLong_Type.tp_name);
   54109           0 :                         return -1;
   54110             :                 }
   54111             :         }
   54112           0 :         return 0;
   54113             : }
   54114             : 
   54115           0 : static PyObject *py_srvsvc_NetPRNameCompare_in_get_flags(PyObject *obj, void *closure)
   54116             : {
   54117           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(obj);
   54118           0 :         PyObject *py_flags;
   54119           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
   54120           0 :         return py_flags;
   54121             : }
   54122             : 
   54123           0 : static int py_srvsvc_NetPRNameCompare_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   54124             : {
   54125           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(py_obj);
   54126           0 :         if (value == NULL) {
   54127           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
   54128           0 :                 return -1;
   54129             :         }
   54130             :         {
   54131           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   54132           0 :                 if (PyLong_Check(value)) {
   54133           0 :                         unsigned long long test_var;
   54134           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54135           0 :                         if (PyErr_Occurred() != NULL) {
   54136           0 :                                 return -1;
   54137             :                         }
   54138           0 :                         if (test_var > uint_max) {
   54139           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54140             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54141           0 :                                 return -1;
   54142             :                         }
   54143           0 :                         object->in.flags = test_var;
   54144             :                 } else {
   54145           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54146             :                           PyLong_Type.tp_name);
   54147           0 :                         return -1;
   54148             :                 }
   54149             :         }
   54150           0 :         return 0;
   54151             : }
   54152             : 
   54153           0 : static PyObject *py_srvsvc_NetPRNameCompare_get_result(PyObject *obj, void *closure)
   54154             : {
   54155           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(obj);
   54156           0 :         PyObject *py_result;
   54157           0 :         py_result = PyErr_FromWERROR(object->out.result);
   54158           0 :         return py_result;
   54159             : }
   54160             : 
   54161           0 : static int py_srvsvc_NetPRNameCompare_set_result(PyObject *py_obj, PyObject *value, void *closure)
   54162             : {
   54163           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(py_obj);
   54164           0 :         if (value == NULL) {
   54165           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   54166           0 :                 return -1;
   54167             :         }
   54168           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   54169           0 :         return 0;
   54170             : }
   54171             : 
   54172             : static PyGetSetDef py_srvsvc_NetPRNameCompare_getsetters[] = {
   54173             :         {
   54174             :                 .name = discard_const_p(char, "in_server_unc"),
   54175             :                 .get = py_srvsvc_NetPRNameCompare_in_get_server_unc,
   54176             :                 .set = py_srvsvc_NetPRNameCompare_in_set_server_unc,
   54177             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54178             :         },
   54179             :         {
   54180             :                 .name = discard_const_p(char, "in_name1"),
   54181             :                 .get = py_srvsvc_NetPRNameCompare_in_get_name1,
   54182             :                 .set = py_srvsvc_NetPRNameCompare_in_set_name1,
   54183             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54184             :         },
   54185             :         {
   54186             :                 .name = discard_const_p(char, "in_name2"),
   54187             :                 .get = py_srvsvc_NetPRNameCompare_in_get_name2,
   54188             :                 .set = py_srvsvc_NetPRNameCompare_in_set_name2,
   54189             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54190             :         },
   54191             :         {
   54192             :                 .name = discard_const_p(char, "in_name_type"),
   54193             :                 .get = py_srvsvc_NetPRNameCompare_in_get_name_type,
   54194             :                 .set = py_srvsvc_NetPRNameCompare_in_set_name_type,
   54195             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   54196             :         },
   54197             :         {
   54198             :                 .name = discard_const_p(char, "in_flags"),
   54199             :                 .get = py_srvsvc_NetPRNameCompare_in_get_flags,
   54200             :                 .set = py_srvsvc_NetPRNameCompare_in_set_flags,
   54201             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   54202             :         },
   54203             :         {
   54204             :                 .name = discard_const_p(char, "result"),
   54205             :                 .get = py_srvsvc_NetPRNameCompare_get_result,
   54206             :                 .set = py_srvsvc_NetPRNameCompare_set_result,
   54207             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   54208             :         },
   54209             :         { .name = NULL }
   54210             : };
   54211             : 
   54212           0 : static PyObject *py_srvsvc_NetPRNameCompare_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   54213             : {
   54214           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetPRNameCompare, type);
   54215           0 :         return self;
   54216             : }
   54217             : 
   54218           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   54219             : {
   54220             : 
   54221             : 
   54222           0 :         return PyLong_FromLong(35);
   54223             : }
   54224             : 
   54225           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   54226             : {
   54227           0 :         const struct ndr_interface_call *call = NULL;
   54228           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(py_obj);
   54229           0 :         PyObject *ret = NULL;
   54230           0 :         struct ndr_push *push = NULL;
   54231           0 :         DATA_BLOB blob;
   54232           0 :         enum ndr_err_code err;
   54233             : 
   54234           0 :         if (ndr_table_srvsvc.num_calls < 36) {
   54235           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPRNameCompare_ndr_pack");
   54236           0 :                 return NULL;
   54237             :         }
   54238           0 :         call = &ndr_table_srvsvc.calls[35];
   54239             : 
   54240           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   54241           0 :         if (push == NULL) {
   54242           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   54243           0 :                 return NULL;
   54244             :         }
   54245             : 
   54246           0 :         push->flags |= ndr_push_flags;
   54247             : 
   54248           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   54249           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   54250           0 :                 TALLOC_FREE(push);
   54251           0 :                 PyErr_SetNdrError(err);
   54252           0 :                 return NULL;
   54253             :         }
   54254           0 :         blob = ndr_push_blob(push);
   54255           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   54256           0 :         TALLOC_FREE(push);
   54257           0 :         return ret;
   54258             : }
   54259             : 
   54260           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54261             : {
   54262           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   54263           0 :         PyObject *bigendian_obj = NULL;
   54264           0 :         PyObject *ndr64_obj = NULL;
   54265           0 :         libndr_flags ndr_push_flags = 0;
   54266             : 
   54267           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   54268             :                 discard_const_p(char *, kwnames),
   54269             :                 &bigendian_obj,
   54270             :                 &ndr64_obj)) {
   54271           0 :                 return NULL;
   54272             :         }
   54273             : 
   54274           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54275           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   54276             :         }
   54277           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54278           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   54279             :         }
   54280             : 
   54281           0 :         return py_srvsvc_NetPRNameCompare_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   54282             : }
   54283             : 
   54284           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54285             : {
   54286           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   54287           0 :         PyObject *bigendian_obj = NULL;
   54288           0 :         PyObject *ndr64_obj = NULL;
   54289           0 :         libndr_flags ndr_push_flags = 0;
   54290             : 
   54291           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   54292             :                 discard_const_p(char *, kwnames),
   54293             :                 &bigendian_obj,
   54294             :                 &ndr64_obj)) {
   54295           0 :                 return NULL;
   54296             :         }
   54297             : 
   54298           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54299           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   54300             :         }
   54301           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54302           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   54303             :         }
   54304             : 
   54305           0 :         return py_srvsvc_NetPRNameCompare_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   54306             : }
   54307             : 
   54308           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   54309             : {
   54310           0 :         const struct ndr_interface_call *call = NULL;
   54311           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(py_obj);
   54312           0 :         struct ndr_pull *pull = NULL;
   54313           0 :         enum ndr_err_code err;
   54314             : 
   54315           0 :         if (ndr_table_srvsvc.num_calls < 36) {
   54316           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPRNameCompare_ndr_unpack");
   54317           0 :                 return NULL;
   54318             :         }
   54319           0 :         call = &ndr_table_srvsvc.calls[35];
   54320             : 
   54321           0 :         pull = ndr_pull_init_blob(blob, object);
   54322           0 :         if (pull == NULL) {
   54323           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   54324           0 :                 return NULL;
   54325             :         }
   54326             : 
   54327           0 :         pull->flags |= ndr_pull_flags;
   54328             : 
   54329           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   54330           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   54331           0 :                 TALLOC_FREE(pull);
   54332           0 :                 PyErr_SetNdrError(err);
   54333           0 :                 return NULL;
   54334             :         }
   54335           0 :         if (!allow_remaining) {
   54336           0 :                 uint32_t highest_ofs;
   54337             : 
   54338           0 :                 if (pull->offset > pull->relative_highest_offset) {
   54339           0 :                         highest_ofs = pull->offset;
   54340             :                 } else {
   54341           0 :                         highest_ofs = pull->relative_highest_offset;
   54342             :                 }
   54343           0 :                 if (highest_ofs < pull->data_size) {
   54344           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   54345             :                                 "not all bytes consumed ofs[%u] size[%u]",
   54346             :                                 highest_ofs, pull->data_size);
   54347           0 :                         TALLOC_FREE(pull);
   54348           0 :                         PyErr_SetNdrError(err);
   54349           0 :                         return NULL;
   54350             :                 }
   54351             :         }
   54352             : 
   54353           0 :         TALLOC_FREE(pull);
   54354           0 :         Py_RETURN_NONE;
   54355             : }
   54356             : 
   54357           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54358             : {
   54359           0 :         DATA_BLOB blob;
   54360           0 :         Py_ssize_t blob_length = 0;
   54361           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   54362           0 :         PyObject *bigendian_obj = NULL;
   54363           0 :         PyObject *ndr64_obj = NULL;
   54364           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   54365           0 :         PyObject *allow_remaining_obj = NULL;
   54366           0 :         bool allow_remaining = false;
   54367             : 
   54368           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   54369             :                 discard_const_p(char *, kwnames),
   54370             :                 &blob.data, &blob_length,
   54371             :                 &bigendian_obj,
   54372             :                 &ndr64_obj,
   54373             :                 &allow_remaining_obj)) {
   54374           0 :                 return NULL;
   54375             :         }
   54376           0 :         blob.length = blob_length;
   54377             : 
   54378           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54379           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   54380             :         }
   54381           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54382           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   54383             :         }
   54384             : 
   54385           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   54386           0 :                 allow_remaining = true;
   54387             :         }
   54388             : 
   54389           0 :         return py_srvsvc_NetPRNameCompare_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   54390             : }
   54391             : 
   54392           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54393             : {
   54394           0 :         DATA_BLOB blob;
   54395           0 :         Py_ssize_t blob_length = 0;
   54396           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   54397           0 :         PyObject *bigendian_obj = NULL;
   54398           0 :         PyObject *ndr64_obj = NULL;
   54399           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   54400           0 :         PyObject *allow_remaining_obj = NULL;
   54401           0 :         bool allow_remaining = false;
   54402             : 
   54403           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   54404             :                 discard_const_p(char *, kwnames),
   54405             :                 &blob.data, &blob_length,
   54406             :                 &bigendian_obj,
   54407             :                 &ndr64_obj,
   54408             :                 &allow_remaining_obj)) {
   54409           0 :                 return NULL;
   54410             :         }
   54411           0 :         blob.length = blob_length;
   54412             : 
   54413           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54414           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   54415             :         }
   54416           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54417           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   54418             :         }
   54419             : 
   54420           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   54421           0 :                 allow_remaining = true;
   54422             :         }
   54423             : 
   54424           0 :         return py_srvsvc_NetPRNameCompare_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   54425             : }
   54426             : 
   54427           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   54428             : {
   54429           0 :         const struct ndr_interface_call *call = NULL;
   54430           0 :         struct srvsvc_NetPRNameCompare *object = pytalloc_get_ptr(py_obj);
   54431           0 :         PyObject *ret;
   54432           0 :         char *retstr;
   54433             : 
   54434           0 :         if (ndr_table_srvsvc.num_calls < 36) {
   54435           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPRNameCompare_ndr_print");
   54436           0 :                 return NULL;
   54437             :         }
   54438           0 :         call = &ndr_table_srvsvc.calls[35];
   54439             : 
   54440           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   54441           0 :         ret = PyUnicode_FromString(retstr);
   54442           0 :         TALLOC_FREE(retstr);
   54443             : 
   54444           0 :         return ret;
   54445             : }
   54446             : 
   54447           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   54448             : {
   54449           0 :         return py_srvsvc_NetPRNameCompare_ndr_print(py_obj, "srvsvc_NetPRNameCompare_in", NDR_IN);
   54450             : }
   54451             : 
   54452           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   54453             : {
   54454           0 :         return py_srvsvc_NetPRNameCompare_ndr_print(py_obj, "srvsvc_NetPRNameCompare_out", NDR_OUT);
   54455             : }
   54456             : 
   54457             : static PyMethodDef py_srvsvc_NetPRNameCompare_methods[] = {
   54458             :         { "opnum", (PyCFunction)py_srvsvc_NetPRNameCompare_ndr_opnum, METH_NOARGS|METH_CLASS,
   54459             :                 "srvsvc.NetPRNameCompare.opnum() -> 35 (0x23) " },
   54460             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPRNameCompare_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   54461             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   54462             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPRNameCompare_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   54463             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   54464             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPRNameCompare_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   54465             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   54466             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPRNameCompare_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   54467             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   54468             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetPRNameCompare_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   54469             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetPRNameCompare_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   54470             :         { NULL, NULL, 0, NULL }
   54471             : };
   54472             : 
   54473             : 
   54474             : static PyTypeObject srvsvc_NetPRNameCompare_Type = {
   54475             :         PyVarObject_HEAD_INIT(NULL, 0)
   54476             :         .tp_name = "srvsvc.NetPRNameCompare",
   54477             :         .tp_getset = py_srvsvc_NetPRNameCompare_getsetters,
   54478             :         .tp_methods = py_srvsvc_NetPRNameCompare_methods,
   54479             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   54480             :         .tp_new = py_srvsvc_NetPRNameCompare_new,
   54481             : };
   54482             : 
   54483           0 : static bool pack_py_srvsvc_NetPRNameCompare_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetPRNameCompare *r)
   54484             : {
   54485           0 :         PyObject *py_server_unc;
   54486           0 :         PyObject *py_name1;
   54487           0 :         PyObject *py_name2;
   54488           0 :         PyObject *py_name_type;
   54489           0 :         PyObject *py_flags;
   54490           0 :         const char *kwnames[] = {
   54491             :                 "server_unc", "name1", "name2", "name_type", "flags", NULL
   54492             :         };
   54493             : 
   54494           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)) {
   54495           0 :                 return false;
   54496             :         }
   54497             : 
   54498           0 :         if (py_server_unc == NULL) {
   54499           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   54500           0 :                 return false;
   54501             :         }
   54502           0 :         if (py_server_unc == Py_None) {
   54503           0 :                 r->in.server_unc = NULL;
   54504             :         } else {
   54505           0 :                 r->in.server_unc = NULL;
   54506             :                 {
   54507           0 :                         const char *test_str;
   54508           0 :                         const char *talloc_str;
   54509           0 :                         PyObject *unicode = NULL;
   54510           0 :                         if (PyUnicode_Check(py_server_unc)) {
   54511           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   54512           0 :                                 if (unicode == NULL) {
   54513           0 :                                         return false;
   54514             :                                 }
   54515           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   54516           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   54517           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   54518             :                         } else {
   54519           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   54520           0 :                                 return false;
   54521             :                         }
   54522           0 :                         talloc_str = talloc_strdup(r, test_str);
   54523           0 :                         if (unicode != NULL) {
   54524           0 :                                 Py_DECREF(unicode);
   54525             :                         }
   54526           0 :                         if (talloc_str == NULL) {
   54527           0 :                                 PyErr_NoMemory();
   54528           0 :                                 return false;
   54529             :                         }
   54530           0 :                         r->in.server_unc = talloc_str;
   54531             :                 }
   54532             :         }
   54533           0 :         if (py_name1 == NULL) {
   54534           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.name1");
   54535           0 :                 return false;
   54536             :         }
   54537             :         {
   54538           0 :                 const char *test_str;
   54539           0 :                 const char *talloc_str;
   54540           0 :                 PyObject *unicode = NULL;
   54541           0 :                 if (PyUnicode_Check(py_name1)) {
   54542           0 :                         unicode = PyUnicode_AsEncodedString(py_name1, "utf-8", "ignore");
   54543           0 :                         if (unicode == NULL) {
   54544           0 :                                 return false;
   54545             :                         }
   54546           0 :                         test_str = PyBytes_AS_STRING(unicode);
   54547           0 :                 } else if (PyBytes_Check(py_name1)) {
   54548           0 :                         test_str = PyBytes_AS_STRING(py_name1);
   54549             :                 } else {
   54550           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name1)->tp_name);
   54551           0 :                         return false;
   54552             :                 }
   54553           0 :                 talloc_str = talloc_strdup(r, test_str);
   54554           0 :                 if (unicode != NULL) {
   54555           0 :                         Py_DECREF(unicode);
   54556             :                 }
   54557           0 :                 if (talloc_str == NULL) {
   54558           0 :                         PyErr_NoMemory();
   54559           0 :                         return false;
   54560             :                 }
   54561           0 :                 r->in.name1 = talloc_str;
   54562             :         }
   54563           0 :         if (py_name2 == NULL) {
   54564           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.name2");
   54565           0 :                 return false;
   54566             :         }
   54567             :         {
   54568           0 :                 const char *test_str;
   54569           0 :                 const char *talloc_str;
   54570           0 :                 PyObject *unicode = NULL;
   54571           0 :                 if (PyUnicode_Check(py_name2)) {
   54572           0 :                         unicode = PyUnicode_AsEncodedString(py_name2, "utf-8", "ignore");
   54573           0 :                         if (unicode == NULL) {
   54574           0 :                                 return false;
   54575             :                         }
   54576           0 :                         test_str = PyBytes_AS_STRING(unicode);
   54577           0 :                 } else if (PyBytes_Check(py_name2)) {
   54578           0 :                         test_str = PyBytes_AS_STRING(py_name2);
   54579             :                 } else {
   54580           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name2)->tp_name);
   54581           0 :                         return false;
   54582             :                 }
   54583           0 :                 talloc_str = talloc_strdup(r, test_str);
   54584           0 :                 if (unicode != NULL) {
   54585           0 :                         Py_DECREF(unicode);
   54586             :                 }
   54587           0 :                 if (talloc_str == NULL) {
   54588           0 :                         PyErr_NoMemory();
   54589           0 :                         return false;
   54590             :                 }
   54591           0 :                 r->in.name2 = talloc_str;
   54592             :         }
   54593           0 :         if (py_name_type == NULL) {
   54594           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.name_type");
   54595           0 :                 return false;
   54596             :         }
   54597             :         {
   54598           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.name_type));
   54599           0 :                 if (PyLong_Check(py_name_type)) {
   54600           0 :                         unsigned long long test_var;
   54601           0 :                         test_var = PyLong_AsUnsignedLongLong(py_name_type);
   54602           0 :                         if (PyErr_Occurred() != NULL) {
   54603           0 :                                 return false;
   54604             :                         }
   54605           0 :                         if (test_var > uint_max) {
   54606           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54607             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54608           0 :                                 return false;
   54609             :                         }
   54610           0 :                         r->in.name_type = test_var;
   54611             :                 } else {
   54612           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54613             :                           PyLong_Type.tp_name);
   54614           0 :                         return false;
   54615             :                 }
   54616             :         }
   54617           0 :         if (py_flags == NULL) {
   54618           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
   54619           0 :                 return false;
   54620             :         }
   54621             :         {
   54622           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   54623           0 :                 if (PyLong_Check(py_flags)) {
   54624           0 :                         unsigned long long test_var;
   54625           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   54626           0 :                         if (PyErr_Occurred() != NULL) {
   54627           0 :                                 return false;
   54628             :                         }
   54629           0 :                         if (test_var > uint_max) {
   54630           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54631             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54632           0 :                                 return false;
   54633             :                         }
   54634           0 :                         r->in.flags = test_var;
   54635             :                 } else {
   54636           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54637             :                           PyLong_Type.tp_name);
   54638           0 :                         return false;
   54639             :                 }
   54640             :         }
   54641           0 :         return true;
   54642             : }
   54643             : 
   54644           0 : static PyObject *unpack_py_srvsvc_NetPRNameCompare_args_out(struct srvsvc_NetPRNameCompare *r)
   54645             : {
   54646           0 :         PyObject *result;
   54647           0 :         result = Py_None;
   54648           0 :         Py_INCREF(result);
   54649           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   54650           0 :                 PyErr_SetWERROR(r->out.result);
   54651           0 :                 return NULL;
   54652             :         }
   54653             : 
   54654           0 :         return result;
   54655             : }
   54656             : 
   54657             : 
   54658           0 : static PyObject *py_srvsvc_NetShareEnum_in_get_server_unc(PyObject *obj, void *closure)
   54659             : {
   54660           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(obj);
   54661           0 :         PyObject *py_server_unc;
   54662           0 :         if (object->in.server_unc == NULL) {
   54663           0 :                 Py_RETURN_NONE;
   54664             :         }
   54665           0 :         if (object->in.server_unc == NULL) {
   54666           0 :                 py_server_unc = Py_None;
   54667           0 :                 Py_INCREF(py_server_unc);
   54668             :         } else {
   54669           0 :                 if (object->in.server_unc == NULL) {
   54670           0 :                         py_server_unc = Py_None;
   54671           0 :                         Py_INCREF(py_server_unc);
   54672             :                 } else {
   54673           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   54674             :                 }
   54675             :         }
   54676           0 :         return py_server_unc;
   54677             : }
   54678             : 
   54679           0 : static int py_srvsvc_NetShareEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   54680             : {
   54681           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(py_obj);
   54682           0 :         if (value == NULL) {
   54683           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   54684           0 :                 return -1;
   54685             :         }
   54686           0 :         if (value == Py_None) {
   54687           0 :                 object->in.server_unc = NULL;
   54688             :         } else {
   54689           0 :                 object->in.server_unc = NULL;
   54690             :                 {
   54691           0 :                         const char *test_str;
   54692           0 :                         const char *talloc_str;
   54693           0 :                         PyObject *unicode = NULL;
   54694           0 :                         if (PyUnicode_Check(value)) {
   54695           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   54696           0 :                                 if (unicode == NULL) {
   54697           0 :                                         return -1;
   54698             :                                 }
   54699           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   54700           0 :                         } else if (PyBytes_Check(value)) {
   54701           0 :                                 test_str = PyBytes_AS_STRING(value);
   54702             :                         } else {
   54703           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   54704           0 :                                 return -1;
   54705             :                         }
   54706           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   54707           0 :                         if (unicode != NULL) {
   54708           0 :                                 Py_DECREF(unicode);
   54709             :                         }
   54710           0 :                         if (talloc_str == NULL) {
   54711           0 :                                 PyErr_NoMemory();
   54712           0 :                                 return -1;
   54713             :                         }
   54714           0 :                         object->in.server_unc = talloc_str;
   54715             :                 }
   54716             :         }
   54717           0 :         return 0;
   54718             : }
   54719             : 
   54720           0 : static PyObject *py_srvsvc_NetShareEnum_in_get_info_ctr(PyObject *obj, void *closure)
   54721             : {
   54722           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(obj);
   54723           0 :         PyObject *py_info_ctr;
   54724           0 :         if (object->in.info_ctr == NULL) {
   54725           0 :                 Py_RETURN_NONE;
   54726             :         }
   54727           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   54728           0 :         return py_info_ctr;
   54729             : }
   54730             : 
   54731           0 : static int py_srvsvc_NetShareEnum_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   54732             : {
   54733           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(py_obj);
   54734           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   54735           0 :         if (value == NULL) {
   54736           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info_ctr");
   54737           0 :                 return -1;
   54738             :         }
   54739           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   54740           0 :         if (object->in.info_ctr == NULL) {
   54741           0 :                 PyErr_NoMemory();
   54742           0 :                 return -1;
   54743             :         }
   54744           0 :         PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, value, return -1;);
   54745           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   54746           0 :                 PyErr_NoMemory();
   54747           0 :                 return -1;
   54748             :         }
   54749           0 :         object->in.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(value);
   54750           0 :         return 0;
   54751             : }
   54752             : 
   54753           0 : static PyObject *py_srvsvc_NetShareEnum_out_get_info_ctr(PyObject *obj, void *closure)
   54754             : {
   54755           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(obj);
   54756           0 :         PyObject *py_info_ctr;
   54757           0 :         if (object->out.info_ctr == NULL) {
   54758           0 :                 Py_RETURN_NONE;
   54759             :         }
   54760           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   54761           0 :         return py_info_ctr;
   54762             : }
   54763             : 
   54764           0 : static int py_srvsvc_NetShareEnum_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   54765             : {
   54766           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(py_obj);
   54767           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   54768           0 :         if (value == NULL) {
   54769           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info_ctr");
   54770           0 :                 return -1;
   54771             :         }
   54772           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   54773           0 :         if (object->out.info_ctr == NULL) {
   54774           0 :                 PyErr_NoMemory();
   54775           0 :                 return -1;
   54776             :         }
   54777           0 :         PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, value, return -1;);
   54778           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   54779           0 :                 PyErr_NoMemory();
   54780           0 :                 return -1;
   54781             :         }
   54782           0 :         object->out.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(value);
   54783           0 :         return 0;
   54784             : }
   54785             : 
   54786           0 : static PyObject *py_srvsvc_NetShareEnum_in_get_max_buffer(PyObject *obj, void *closure)
   54787             : {
   54788           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(obj);
   54789           0 :         PyObject *py_max_buffer;
   54790           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)(object->in.max_buffer));
   54791           0 :         return py_max_buffer;
   54792             : }
   54793             : 
   54794           0 : static int py_srvsvc_NetShareEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   54795             : {
   54796           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(py_obj);
   54797           0 :         if (value == NULL) {
   54798           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.max_buffer");
   54799           0 :                 return -1;
   54800             :         }
   54801             :         {
   54802           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   54803           0 :                 if (PyLong_Check(value)) {
   54804           0 :                         unsigned long long test_var;
   54805           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54806           0 :                         if (PyErr_Occurred() != NULL) {
   54807           0 :                                 return -1;
   54808             :                         }
   54809           0 :                         if (test_var > uint_max) {
   54810           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54811             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54812           0 :                                 return -1;
   54813             :                         }
   54814           0 :                         object->in.max_buffer = test_var;
   54815             :                 } else {
   54816           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54817             :                           PyLong_Type.tp_name);
   54818           0 :                         return -1;
   54819             :                 }
   54820             :         }
   54821           0 :         return 0;
   54822             : }
   54823             : 
   54824           0 : static PyObject *py_srvsvc_NetShareEnum_out_get_totalentries(PyObject *obj, void *closure)
   54825             : {
   54826           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(obj);
   54827           0 :         PyObject *py_totalentries;
   54828           0 :         if (object->out.totalentries == NULL) {
   54829           0 :                 Py_RETURN_NONE;
   54830             :         }
   54831           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.totalentries));
   54832           0 :         return py_totalentries;
   54833             : }
   54834             : 
   54835           0 : static int py_srvsvc_NetShareEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   54836             : {
   54837           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(py_obj);
   54838           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   54839           0 :         if (value == NULL) {
   54840           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.totalentries");
   54841           0 :                 return -1;
   54842             :         }
   54843           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   54844           0 :         if (object->out.totalentries == NULL) {
   54845           0 :                 PyErr_NoMemory();
   54846           0 :                 return -1;
   54847             :         }
   54848             :         {
   54849           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   54850           0 :                 if (PyLong_Check(value)) {
   54851           0 :                         unsigned long long test_var;
   54852           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54853           0 :                         if (PyErr_Occurred() != NULL) {
   54854           0 :                                 return -1;
   54855             :                         }
   54856           0 :                         if (test_var > uint_max) {
   54857           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54858             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54859           0 :                                 return -1;
   54860             :                         }
   54861           0 :                         *object->out.totalentries = test_var;
   54862             :                 } else {
   54863           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54864             :                           PyLong_Type.tp_name);
   54865           0 :                         return -1;
   54866             :                 }
   54867             :         }
   54868           0 :         return 0;
   54869             : }
   54870             : 
   54871           0 : static PyObject *py_srvsvc_NetShareEnum_in_get_resume_handle(PyObject *obj, void *closure)
   54872             : {
   54873           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(obj);
   54874           0 :         PyObject *py_resume_handle;
   54875           0 :         if (object->in.resume_handle == NULL) {
   54876           0 :                 Py_RETURN_NONE;
   54877             :         }
   54878           0 :         if (object->in.resume_handle == NULL) {
   54879           0 :                 py_resume_handle = Py_None;
   54880           0 :                 Py_INCREF(py_resume_handle);
   54881             :         } else {
   54882           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.resume_handle));
   54883             :         }
   54884           0 :         return py_resume_handle;
   54885             : }
   54886             : 
   54887           0 : static int py_srvsvc_NetShareEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   54888             : {
   54889           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(py_obj);
   54890           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   54891           0 :         if (value == NULL) {
   54892           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.resume_handle");
   54893           0 :                 return -1;
   54894             :         }
   54895           0 :         if (value == Py_None) {
   54896           0 :                 object->in.resume_handle = NULL;
   54897             :         } else {
   54898           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   54899           0 :                 if (object->in.resume_handle == NULL) {
   54900           0 :                         PyErr_NoMemory();
   54901           0 :                         return -1;
   54902             :                 }
   54903             :                 {
   54904           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   54905           0 :                         if (PyLong_Check(value)) {
   54906           0 :                                 unsigned long long test_var;
   54907           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   54908           0 :                                 if (PyErr_Occurred() != NULL) {
   54909           0 :                                         return -1;
   54910             :                                 }
   54911           0 :                                 if (test_var > uint_max) {
   54912           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54913             :                                           PyLong_Type.tp_name, uint_max, test_var);
   54914           0 :                                         return -1;
   54915             :                                 }
   54916           0 :                                 *object->in.resume_handle = test_var;
   54917             :                         } else {
   54918           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   54919             :                                   PyLong_Type.tp_name);
   54920           0 :                                 return -1;
   54921             :                         }
   54922             :                 }
   54923             :         }
   54924           0 :         return 0;
   54925             : }
   54926             : 
   54927           0 : static PyObject *py_srvsvc_NetShareEnum_out_get_resume_handle(PyObject *obj, void *closure)
   54928             : {
   54929           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(obj);
   54930           0 :         PyObject *py_resume_handle;
   54931           0 :         if (object->out.resume_handle == NULL) {
   54932           0 :                 Py_RETURN_NONE;
   54933             :         }
   54934           0 :         if (object->out.resume_handle == NULL) {
   54935           0 :                 py_resume_handle = Py_None;
   54936           0 :                 Py_INCREF(py_resume_handle);
   54937             :         } else {
   54938           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.resume_handle));
   54939             :         }
   54940           0 :         return py_resume_handle;
   54941             : }
   54942             : 
   54943           0 : static int py_srvsvc_NetShareEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   54944             : {
   54945           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(py_obj);
   54946           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   54947           0 :         if (value == NULL) {
   54948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.resume_handle");
   54949           0 :                 return -1;
   54950             :         }
   54951           0 :         if (value == Py_None) {
   54952           0 :                 object->out.resume_handle = NULL;
   54953             :         } else {
   54954           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   54955           0 :                 if (object->out.resume_handle == NULL) {
   54956           0 :                         PyErr_NoMemory();
   54957           0 :                         return -1;
   54958             :                 }
   54959             :                 {
   54960           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   54961           0 :                         if (PyLong_Check(value)) {
   54962           0 :                                 unsigned long long test_var;
   54963           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   54964           0 :                                 if (PyErr_Occurred() != NULL) {
   54965           0 :                                         return -1;
   54966             :                                 }
   54967           0 :                                 if (test_var > uint_max) {
   54968           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54969             :                                           PyLong_Type.tp_name, uint_max, test_var);
   54970           0 :                                         return -1;
   54971             :                                 }
   54972           0 :                                 *object->out.resume_handle = test_var;
   54973             :                         } else {
   54974           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   54975             :                                   PyLong_Type.tp_name);
   54976           0 :                                 return -1;
   54977             :                         }
   54978             :                 }
   54979             :         }
   54980           0 :         return 0;
   54981             : }
   54982             : 
   54983           0 : static PyObject *py_srvsvc_NetShareEnum_get_result(PyObject *obj, void *closure)
   54984             : {
   54985           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(obj);
   54986           0 :         PyObject *py_result;
   54987           0 :         py_result = PyErr_FromWERROR(object->out.result);
   54988           0 :         return py_result;
   54989             : }
   54990             : 
   54991           0 : static int py_srvsvc_NetShareEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   54992             : {
   54993           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(py_obj);
   54994           0 :         if (value == NULL) {
   54995           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   54996           0 :                 return -1;
   54997             :         }
   54998           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   54999           0 :         return 0;
   55000             : }
   55001             : 
   55002             : static PyGetSetDef py_srvsvc_NetShareEnum_getsetters[] = {
   55003             :         {
   55004             :                 .name = discard_const_p(char, "in_server_unc"),
   55005             :                 .get = py_srvsvc_NetShareEnum_in_get_server_unc,
   55006             :                 .set = py_srvsvc_NetShareEnum_in_set_server_unc,
   55007             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55008             :         },
   55009             :         {
   55010             :                 .name = discard_const_p(char, "in_info_ctr"),
   55011             :                 .get = py_srvsvc_NetShareEnum_in_get_info_ctr,
   55012             :                 .set = py_srvsvc_NetShareEnum_in_set_info_ctr,
   55013             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfoCtr")
   55014             :         },
   55015             :         {
   55016             :                 .name = discard_const_p(char, "out_info_ctr"),
   55017             :                 .get = py_srvsvc_NetShareEnum_out_get_info_ctr,
   55018             :                 .set = py_srvsvc_NetShareEnum_out_set_info_ctr,
   55019             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfoCtr")
   55020             :         },
   55021             :         {
   55022             :                 .name = discard_const_p(char, "in_max_buffer"),
   55023             :                 .get = py_srvsvc_NetShareEnum_in_get_max_buffer,
   55024             :                 .set = py_srvsvc_NetShareEnum_in_set_max_buffer,
   55025             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   55026             :         },
   55027             :         {
   55028             :                 .name = discard_const_p(char, "out_totalentries"),
   55029             :                 .get = py_srvsvc_NetShareEnum_out_get_totalentries,
   55030             :                 .set = py_srvsvc_NetShareEnum_out_set_totalentries,
   55031             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   55032             :         },
   55033             :         {
   55034             :                 .name = discard_const_p(char, "in_resume_handle"),
   55035             :                 .get = py_srvsvc_NetShareEnum_in_get_resume_handle,
   55036             :                 .set = py_srvsvc_NetShareEnum_in_set_resume_handle,
   55037             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   55038             :         },
   55039             :         {
   55040             :                 .name = discard_const_p(char, "out_resume_handle"),
   55041             :                 .get = py_srvsvc_NetShareEnum_out_get_resume_handle,
   55042             :                 .set = py_srvsvc_NetShareEnum_out_set_resume_handle,
   55043             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   55044             :         },
   55045             :         {
   55046             :                 .name = discard_const_p(char, "result"),
   55047             :                 .get = py_srvsvc_NetShareEnum_get_result,
   55048             :                 .set = py_srvsvc_NetShareEnum_set_result,
   55049             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   55050             :         },
   55051             :         { .name = NULL }
   55052             : };
   55053             : 
   55054           0 : static PyObject *py_srvsvc_NetShareEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   55055             : {
   55056           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareEnum, type);
   55057           0 :         struct srvsvc_NetShareEnum *_self = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(self);
   55058           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   55059           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetShareInfoCtr);
   55060           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetShareInfoCtr);
   55061           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   55062           0 :         return self;
   55063             : }
   55064             : 
   55065           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   55066             : {
   55067             : 
   55068             : 
   55069           0 :         return PyLong_FromLong(36);
   55070             : }
   55071             : 
   55072           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   55073             : {
   55074           0 :         const struct ndr_interface_call *call = NULL;
   55075           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(py_obj);
   55076           0 :         PyObject *ret = NULL;
   55077           0 :         struct ndr_push *push = NULL;
   55078           0 :         DATA_BLOB blob;
   55079           0 :         enum ndr_err_code err;
   55080             : 
   55081           0 :         if (ndr_table_srvsvc.num_calls < 37) {
   55082           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareEnum_ndr_pack");
   55083           0 :                 return NULL;
   55084             :         }
   55085           0 :         call = &ndr_table_srvsvc.calls[36];
   55086             : 
   55087           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   55088           0 :         if (push == NULL) {
   55089           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55090           0 :                 return NULL;
   55091             :         }
   55092             : 
   55093           0 :         push->flags |= ndr_push_flags;
   55094             : 
   55095           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   55096           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55097           0 :                 TALLOC_FREE(push);
   55098           0 :                 PyErr_SetNdrError(err);
   55099           0 :                 return NULL;
   55100             :         }
   55101           0 :         blob = ndr_push_blob(push);
   55102           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   55103           0 :         TALLOC_FREE(push);
   55104           0 :         return ret;
   55105             : }
   55106             : 
   55107           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55108             : {
   55109           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55110           0 :         PyObject *bigendian_obj = NULL;
   55111           0 :         PyObject *ndr64_obj = NULL;
   55112           0 :         libndr_flags ndr_push_flags = 0;
   55113             : 
   55114           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   55115             :                 discard_const_p(char *, kwnames),
   55116             :                 &bigendian_obj,
   55117             :                 &ndr64_obj)) {
   55118           0 :                 return NULL;
   55119             :         }
   55120             : 
   55121           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55122           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55123             :         }
   55124           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55125           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55126             :         }
   55127             : 
   55128           0 :         return py_srvsvc_NetShareEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   55129             : }
   55130             : 
   55131           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55132             : {
   55133           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55134           0 :         PyObject *bigendian_obj = NULL;
   55135           0 :         PyObject *ndr64_obj = NULL;
   55136           0 :         libndr_flags ndr_push_flags = 0;
   55137             : 
   55138           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   55139             :                 discard_const_p(char *, kwnames),
   55140             :                 &bigendian_obj,
   55141             :                 &ndr64_obj)) {
   55142           0 :                 return NULL;
   55143             :         }
   55144             : 
   55145           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55146           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55147             :         }
   55148           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55149           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55150             :         }
   55151             : 
   55152           0 :         return py_srvsvc_NetShareEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   55153             : }
   55154             : 
   55155           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   55156             : {
   55157           0 :         const struct ndr_interface_call *call = NULL;
   55158           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(py_obj);
   55159           0 :         struct ndr_pull *pull = NULL;
   55160           0 :         enum ndr_err_code err;
   55161             : 
   55162           0 :         if (ndr_table_srvsvc.num_calls < 37) {
   55163           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareEnum_ndr_unpack");
   55164           0 :                 return NULL;
   55165             :         }
   55166           0 :         call = &ndr_table_srvsvc.calls[36];
   55167             : 
   55168           0 :         pull = ndr_pull_init_blob(blob, object);
   55169           0 :         if (pull == NULL) {
   55170           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55171           0 :                 return NULL;
   55172             :         }
   55173             : 
   55174           0 :         pull->flags |= ndr_pull_flags;
   55175             : 
   55176           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   55177           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55178           0 :                 TALLOC_FREE(pull);
   55179           0 :                 PyErr_SetNdrError(err);
   55180           0 :                 return NULL;
   55181             :         }
   55182           0 :         if (!allow_remaining) {
   55183           0 :                 uint32_t highest_ofs;
   55184             : 
   55185           0 :                 if (pull->offset > pull->relative_highest_offset) {
   55186           0 :                         highest_ofs = pull->offset;
   55187             :                 } else {
   55188           0 :                         highest_ofs = pull->relative_highest_offset;
   55189             :                 }
   55190           0 :                 if (highest_ofs < pull->data_size) {
   55191           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   55192             :                                 "not all bytes consumed ofs[%u] size[%u]",
   55193             :                                 highest_ofs, pull->data_size);
   55194           0 :                         TALLOC_FREE(pull);
   55195           0 :                         PyErr_SetNdrError(err);
   55196           0 :                         return NULL;
   55197             :                 }
   55198             :         }
   55199             : 
   55200           0 :         TALLOC_FREE(pull);
   55201           0 :         Py_RETURN_NONE;
   55202             : }
   55203             : 
   55204           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55205             : {
   55206           0 :         DATA_BLOB blob;
   55207           0 :         Py_ssize_t blob_length = 0;
   55208           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55209           0 :         PyObject *bigendian_obj = NULL;
   55210           0 :         PyObject *ndr64_obj = NULL;
   55211           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55212           0 :         PyObject *allow_remaining_obj = NULL;
   55213           0 :         bool allow_remaining = false;
   55214             : 
   55215           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   55216             :                 discard_const_p(char *, kwnames),
   55217             :                 &blob.data, &blob_length,
   55218             :                 &bigendian_obj,
   55219             :                 &ndr64_obj,
   55220             :                 &allow_remaining_obj)) {
   55221           0 :                 return NULL;
   55222             :         }
   55223           0 :         blob.length = blob_length;
   55224             : 
   55225           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55226           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55227             :         }
   55228           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55229           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55230             :         }
   55231             : 
   55232           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55233           0 :                 allow_remaining = true;
   55234             :         }
   55235             : 
   55236           0 :         return py_srvsvc_NetShareEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   55237             : }
   55238             : 
   55239           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55240             : {
   55241           0 :         DATA_BLOB blob;
   55242           0 :         Py_ssize_t blob_length = 0;
   55243           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55244           0 :         PyObject *bigendian_obj = NULL;
   55245           0 :         PyObject *ndr64_obj = NULL;
   55246           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55247           0 :         PyObject *allow_remaining_obj = NULL;
   55248           0 :         bool allow_remaining = false;
   55249             : 
   55250           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   55251             :                 discard_const_p(char *, kwnames),
   55252             :                 &blob.data, &blob_length,
   55253             :                 &bigendian_obj,
   55254             :                 &ndr64_obj,
   55255             :                 &allow_remaining_obj)) {
   55256           0 :                 return NULL;
   55257             :         }
   55258           0 :         blob.length = blob_length;
   55259             : 
   55260           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55261           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55262             :         }
   55263           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55264           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55265             :         }
   55266             : 
   55267           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55268           0 :                 allow_remaining = true;
   55269             :         }
   55270             : 
   55271           0 :         return py_srvsvc_NetShareEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   55272             : }
   55273             : 
   55274           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   55275             : {
   55276           0 :         const struct ndr_interface_call *call = NULL;
   55277           0 :         struct srvsvc_NetShareEnum *object = pytalloc_get_ptr(py_obj);
   55278           0 :         PyObject *ret;
   55279           0 :         char *retstr;
   55280             : 
   55281           0 :         if (ndr_table_srvsvc.num_calls < 37) {
   55282           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareEnum_ndr_print");
   55283           0 :                 return NULL;
   55284             :         }
   55285           0 :         call = &ndr_table_srvsvc.calls[36];
   55286             : 
   55287           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   55288           0 :         ret = PyUnicode_FromString(retstr);
   55289           0 :         TALLOC_FREE(retstr);
   55290             : 
   55291           0 :         return ret;
   55292             : }
   55293             : 
   55294           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55295             : {
   55296           0 :         return py_srvsvc_NetShareEnum_ndr_print(py_obj, "srvsvc_NetShareEnum_in", NDR_IN);
   55297             : }
   55298             : 
   55299           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55300             : {
   55301           0 :         return py_srvsvc_NetShareEnum_ndr_print(py_obj, "srvsvc_NetShareEnum_out", NDR_OUT);
   55302             : }
   55303             : 
   55304             : static PyMethodDef py_srvsvc_NetShareEnum_methods[] = {
   55305             :         { "opnum", (PyCFunction)py_srvsvc_NetShareEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   55306             :                 "srvsvc.NetShareEnum.opnum() -> 36 (0x24) " },
   55307             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   55308             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   55309             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   55310             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   55311             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   55312             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   55313             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   55314             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   55315             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   55316             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   55317             :         { NULL, NULL, 0, NULL }
   55318             : };
   55319             : 
   55320             : 
   55321             : static PyTypeObject srvsvc_NetShareEnum_Type = {
   55322             :         PyVarObject_HEAD_INIT(NULL, 0)
   55323             :         .tp_name = "srvsvc.NetShareEnum",
   55324             :         .tp_getset = py_srvsvc_NetShareEnum_getsetters,
   55325             :         .tp_methods = py_srvsvc_NetShareEnum_methods,
   55326             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   55327             :         .tp_new = py_srvsvc_NetShareEnum_new,
   55328             : };
   55329             : 
   55330           0 : static bool pack_py_srvsvc_NetShareEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareEnum *r)
   55331             : {
   55332           0 :         PyObject *py_server_unc;
   55333           0 :         PyObject *py_info_ctr;
   55334           0 :         PyObject *py_max_buffer;
   55335           0 :         PyObject *py_resume_handle;
   55336           0 :         const char *kwnames[] = {
   55337             :                 "server_unc", "info_ctr", "max_buffer", "resume_handle", NULL
   55338             :         };
   55339             : 
   55340           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)) {
   55341           0 :                 return false;
   55342             :         }
   55343             : 
   55344           0 :         if (py_server_unc == NULL) {
   55345           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   55346           0 :                 return false;
   55347             :         }
   55348           0 :         if (py_server_unc == Py_None) {
   55349           0 :                 r->in.server_unc = NULL;
   55350             :         } else {
   55351           0 :                 r->in.server_unc = NULL;
   55352             :                 {
   55353           0 :                         const char *test_str;
   55354           0 :                         const char *talloc_str;
   55355           0 :                         PyObject *unicode = NULL;
   55356           0 :                         if (PyUnicode_Check(py_server_unc)) {
   55357           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   55358           0 :                                 if (unicode == NULL) {
   55359           0 :                                         return false;
   55360             :                                 }
   55361           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55362           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   55363           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   55364             :                         } else {
   55365           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   55366           0 :                                 return false;
   55367             :                         }
   55368           0 :                         talloc_str = talloc_strdup(r, test_str);
   55369           0 :                         if (unicode != NULL) {
   55370           0 :                                 Py_DECREF(unicode);
   55371             :                         }
   55372           0 :                         if (talloc_str == NULL) {
   55373           0 :                                 PyErr_NoMemory();
   55374           0 :                                 return false;
   55375             :                         }
   55376           0 :                         r->in.server_unc = talloc_str;
   55377             :                 }
   55378             :         }
   55379           0 :         if (py_info_ctr == NULL) {
   55380           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info_ctr");
   55381           0 :                 return false;
   55382             :         }
   55383           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   55384           0 :         if (r->in.info_ctr == NULL) {
   55385           0 :                 PyErr_NoMemory();
   55386           0 :                 return false;
   55387             :         }
   55388           0 :         PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, py_info_ctr, return false;);
   55389           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   55390           0 :                 PyErr_NoMemory();
   55391           0 :                 return false;
   55392             :         }
   55393           0 :         r->in.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   55394           0 :         if (py_max_buffer == NULL) {
   55395           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.max_buffer");
   55396           0 :                 return false;
   55397             :         }
   55398             :         {
   55399           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   55400           0 :                 if (PyLong_Check(py_max_buffer)) {
   55401           0 :                         unsigned long long test_var;
   55402           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   55403           0 :                         if (PyErr_Occurred() != NULL) {
   55404           0 :                                 return false;
   55405             :                         }
   55406           0 :                         if (test_var > uint_max) {
   55407           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55408             :                                   PyLong_Type.tp_name, uint_max, test_var);
   55409           0 :                                 return false;
   55410             :                         }
   55411           0 :                         r->in.max_buffer = test_var;
   55412             :                 } else {
   55413           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   55414             :                           PyLong_Type.tp_name);
   55415           0 :                         return false;
   55416             :                 }
   55417             :         }
   55418           0 :         if (py_resume_handle == NULL) {
   55419           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.resume_handle");
   55420           0 :                 return false;
   55421             :         }
   55422           0 :         if (py_resume_handle == Py_None) {
   55423           0 :                 r->in.resume_handle = NULL;
   55424             :         } else {
   55425           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   55426           0 :                 if (r->in.resume_handle == NULL) {
   55427           0 :                         PyErr_NoMemory();
   55428           0 :                         return false;
   55429             :                 }
   55430             :                 {
   55431           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   55432           0 :                         if (PyLong_Check(py_resume_handle)) {
   55433           0 :                                 unsigned long long test_var;
   55434           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   55435           0 :                                 if (PyErr_Occurred() != NULL) {
   55436           0 :                                         return false;
   55437             :                                 }
   55438           0 :                                 if (test_var > uint_max) {
   55439           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55440             :                                           PyLong_Type.tp_name, uint_max, test_var);
   55441           0 :                                         return false;
   55442             :                                 }
   55443           0 :                                 *r->in.resume_handle = test_var;
   55444             :                         } else {
   55445           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   55446             :                                   PyLong_Type.tp_name);
   55447           0 :                                 return false;
   55448             :                         }
   55449             :                 }
   55450             :         }
   55451           0 :         return true;
   55452             : }
   55453             : 
   55454           0 : static PyObject *unpack_py_srvsvc_NetShareEnum_args_out(struct srvsvc_NetShareEnum *r)
   55455             : {
   55456           0 :         PyObject *result;
   55457           0 :         PyObject *py_info_ctr;
   55458           0 :         PyObject *py_totalentries;
   55459           0 :         PyObject *py_resume_handle;
   55460           0 :         result = PyTuple_New(3);
   55461           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   55462           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   55463           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.totalentries));
   55464           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   55465           0 :         if (r->out.resume_handle == NULL) {
   55466           0 :                 py_resume_handle = Py_None;
   55467           0 :                 Py_INCREF(py_resume_handle);
   55468             :         } else {
   55469           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.resume_handle));
   55470             :         }
   55471           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   55472           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   55473           0 :                 PyErr_SetWERROR(r->out.result);
   55474           0 :                 return NULL;
   55475             :         }
   55476             : 
   55477           0 :         return result;
   55478             : }
   55479             : 
   55480             : 
   55481           0 : static PyObject *py_srvsvc_NetShareDelStart_in_get_server_unc(PyObject *obj, void *closure)
   55482             : {
   55483           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(obj);
   55484           0 :         PyObject *py_server_unc;
   55485           0 :         if (object->in.server_unc == NULL) {
   55486           0 :                 Py_RETURN_NONE;
   55487             :         }
   55488           0 :         if (object->in.server_unc == NULL) {
   55489           0 :                 py_server_unc = Py_None;
   55490           0 :                 Py_INCREF(py_server_unc);
   55491             :         } else {
   55492           0 :                 if (object->in.server_unc == NULL) {
   55493           0 :                         py_server_unc = Py_None;
   55494           0 :                         Py_INCREF(py_server_unc);
   55495             :                 } else {
   55496           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   55497             :                 }
   55498             :         }
   55499           0 :         return py_server_unc;
   55500             : }
   55501             : 
   55502           0 : static int py_srvsvc_NetShareDelStart_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   55503             : {
   55504           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(py_obj);
   55505           0 :         if (value == NULL) {
   55506           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   55507           0 :                 return -1;
   55508             :         }
   55509           0 :         if (value == Py_None) {
   55510           0 :                 object->in.server_unc = NULL;
   55511             :         } else {
   55512           0 :                 object->in.server_unc = NULL;
   55513             :                 {
   55514           0 :                         const char *test_str;
   55515           0 :                         const char *talloc_str;
   55516           0 :                         PyObject *unicode = NULL;
   55517           0 :                         if (PyUnicode_Check(value)) {
   55518           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55519           0 :                                 if (unicode == NULL) {
   55520           0 :                                         return -1;
   55521             :                                 }
   55522           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55523           0 :                         } else if (PyBytes_Check(value)) {
   55524           0 :                                 test_str = PyBytes_AS_STRING(value);
   55525             :                         } else {
   55526           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55527           0 :                                 return -1;
   55528             :                         }
   55529           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55530           0 :                         if (unicode != NULL) {
   55531           0 :                                 Py_DECREF(unicode);
   55532             :                         }
   55533           0 :                         if (talloc_str == NULL) {
   55534           0 :                                 PyErr_NoMemory();
   55535           0 :                                 return -1;
   55536             :                         }
   55537           0 :                         object->in.server_unc = talloc_str;
   55538             :                 }
   55539             :         }
   55540           0 :         return 0;
   55541             : }
   55542             : 
   55543           0 : static PyObject *py_srvsvc_NetShareDelStart_in_get_share(PyObject *obj, void *closure)
   55544             : {
   55545           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(obj);
   55546           0 :         PyObject *py_share;
   55547           0 :         if (object->in.share == NULL) {
   55548           0 :                 py_share = Py_None;
   55549           0 :                 Py_INCREF(py_share);
   55550             :         } else {
   55551           0 :                 py_share = PyUnicode_Decode(object->in.share, strlen(object->in.share), "utf-8", "ignore");
   55552             :         }
   55553           0 :         return py_share;
   55554             : }
   55555             : 
   55556           0 : static int py_srvsvc_NetShareDelStart_in_set_share(PyObject *py_obj, PyObject *value, void *closure)
   55557             : {
   55558           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(py_obj);
   55559           0 :         if (value == NULL) {
   55560           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.share");
   55561           0 :                 return -1;
   55562             :         }
   55563             :         {
   55564           0 :                 const char *test_str;
   55565           0 :                 const char *talloc_str;
   55566           0 :                 PyObject *unicode = NULL;
   55567           0 :                 if (PyUnicode_Check(value)) {
   55568           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55569           0 :                         if (unicode == NULL) {
   55570           0 :                                 return -1;
   55571             :                         }
   55572           0 :                         test_str = PyBytes_AS_STRING(unicode);
   55573           0 :                 } else if (PyBytes_Check(value)) {
   55574           0 :                         test_str = PyBytes_AS_STRING(value);
   55575             :                 } else {
   55576           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55577           0 :                         return -1;
   55578             :                 }
   55579           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55580           0 :                 if (unicode != NULL) {
   55581           0 :                         Py_DECREF(unicode);
   55582             :                 }
   55583           0 :                 if (talloc_str == NULL) {
   55584           0 :                         PyErr_NoMemory();
   55585           0 :                         return -1;
   55586             :                 }
   55587           0 :                 object->in.share = talloc_str;
   55588             :         }
   55589           0 :         return 0;
   55590             : }
   55591             : 
   55592           0 : static PyObject *py_srvsvc_NetShareDelStart_in_get_reserved(PyObject *obj, void *closure)
   55593             : {
   55594           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(obj);
   55595           0 :         PyObject *py_reserved;
   55596           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->in.reserved));
   55597           0 :         return py_reserved;
   55598             : }
   55599             : 
   55600           0 : static int py_srvsvc_NetShareDelStart_in_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   55601             : {
   55602           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(py_obj);
   55603           0 :         if (value == NULL) {
   55604           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.reserved");
   55605           0 :                 return -1;
   55606             :         }
   55607             :         {
   55608           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.reserved));
   55609           0 :                 if (PyLong_Check(value)) {
   55610           0 :                         unsigned long long test_var;
   55611           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   55612           0 :                         if (PyErr_Occurred() != NULL) {
   55613           0 :                                 return -1;
   55614             :                         }
   55615           0 :                         if (test_var > uint_max) {
   55616           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55617             :                                   PyLong_Type.tp_name, uint_max, test_var);
   55618           0 :                                 return -1;
   55619             :                         }
   55620           0 :                         object->in.reserved = test_var;
   55621             :                 } else {
   55622           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   55623             :                           PyLong_Type.tp_name);
   55624           0 :                         return -1;
   55625             :                 }
   55626             :         }
   55627           0 :         return 0;
   55628             : }
   55629             : 
   55630           0 : static PyObject *py_srvsvc_NetShareDelStart_out_get_hnd(PyObject *obj, void *closure)
   55631             : {
   55632           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(obj);
   55633           0 :         PyObject *py_hnd;
   55634           0 :         if (object->out.hnd == NULL) {
   55635           0 :                 Py_RETURN_NONE;
   55636             :         }
   55637           0 :         if (object->out.hnd == NULL) {
   55638           0 :                 py_hnd = Py_None;
   55639           0 :                 Py_INCREF(py_hnd);
   55640             :         } else {
   55641           0 :                 py_hnd = pytalloc_reference_ex(policy_handle_Type, object->out.hnd, object->out.hnd);
   55642             :         }
   55643           0 :         return py_hnd;
   55644             : }
   55645             : 
   55646           0 : static int py_srvsvc_NetShareDelStart_out_set_hnd(PyObject *py_obj, PyObject *value, void *closure)
   55647             : {
   55648           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(py_obj);
   55649           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.hnd));
   55650           0 :         if (value == NULL) {
   55651           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.hnd");
   55652           0 :                 return -1;
   55653             :         }
   55654           0 :         if (value == Py_None) {
   55655           0 :                 object->out.hnd = NULL;
   55656             :         } else {
   55657           0 :                 object->out.hnd = NULL;
   55658           0 :                 PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   55659           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   55660           0 :                         PyErr_NoMemory();
   55661           0 :                         return -1;
   55662             :                 }
   55663           0 :                 object->out.hnd = (struct policy_handle *)pytalloc_get_ptr(value);
   55664             :         }
   55665           0 :         return 0;
   55666             : }
   55667             : 
   55668           0 : static PyObject *py_srvsvc_NetShareDelStart_get_result(PyObject *obj, void *closure)
   55669             : {
   55670           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(obj);
   55671           0 :         PyObject *py_result;
   55672           0 :         py_result = PyErr_FromWERROR(object->out.result);
   55673           0 :         return py_result;
   55674             : }
   55675             : 
   55676           0 : static int py_srvsvc_NetShareDelStart_set_result(PyObject *py_obj, PyObject *value, void *closure)
   55677             : {
   55678           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(py_obj);
   55679           0 :         if (value == NULL) {
   55680           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   55681           0 :                 return -1;
   55682             :         }
   55683           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   55684           0 :         return 0;
   55685             : }
   55686             : 
   55687             : static PyGetSetDef py_srvsvc_NetShareDelStart_getsetters[] = {
   55688             :         {
   55689             :                 .name = discard_const_p(char, "in_server_unc"),
   55690             :                 .get = py_srvsvc_NetShareDelStart_in_get_server_unc,
   55691             :                 .set = py_srvsvc_NetShareDelStart_in_set_server_unc,
   55692             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55693             :         },
   55694             :         {
   55695             :                 .name = discard_const_p(char, "in_share"),
   55696             :                 .get = py_srvsvc_NetShareDelStart_in_get_share,
   55697             :                 .set = py_srvsvc_NetShareDelStart_in_set_share,
   55698             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55699             :         },
   55700             :         {
   55701             :                 .name = discard_const_p(char, "in_reserved"),
   55702             :                 .get = py_srvsvc_NetShareDelStart_in_get_reserved,
   55703             :                 .set = py_srvsvc_NetShareDelStart_in_set_reserved,
   55704             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   55705             :         },
   55706             :         {
   55707             :                 .name = discard_const_p(char, "out_hnd"),
   55708             :                 .get = py_srvsvc_NetShareDelStart_out_get_hnd,
   55709             :                 .set = py_srvsvc_NetShareDelStart_out_set_hnd,
   55710             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   55711             :         },
   55712             :         {
   55713             :                 .name = discard_const_p(char, "result"),
   55714             :                 .get = py_srvsvc_NetShareDelStart_get_result,
   55715             :                 .set = py_srvsvc_NetShareDelStart_set_result,
   55716             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   55717             :         },
   55718             :         { .name = NULL }
   55719             : };
   55720             : 
   55721           0 : static PyObject *py_srvsvc_NetShareDelStart_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   55722             : {
   55723           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareDelStart, type);
   55724           0 :         return self;
   55725             : }
   55726             : 
   55727           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   55728             : {
   55729             : 
   55730             : 
   55731           0 :         return PyLong_FromLong(37);
   55732             : }
   55733             : 
   55734           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   55735             : {
   55736           0 :         const struct ndr_interface_call *call = NULL;
   55737           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(py_obj);
   55738           0 :         PyObject *ret = NULL;
   55739           0 :         struct ndr_push *push = NULL;
   55740           0 :         DATA_BLOB blob;
   55741           0 :         enum ndr_err_code err;
   55742             : 
   55743           0 :         if (ndr_table_srvsvc.num_calls < 38) {
   55744           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelStart_ndr_pack");
   55745           0 :                 return NULL;
   55746             :         }
   55747           0 :         call = &ndr_table_srvsvc.calls[37];
   55748             : 
   55749           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   55750           0 :         if (push == NULL) {
   55751           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55752           0 :                 return NULL;
   55753             :         }
   55754             : 
   55755           0 :         push->flags |= ndr_push_flags;
   55756             : 
   55757           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   55758           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55759           0 :                 TALLOC_FREE(push);
   55760           0 :                 PyErr_SetNdrError(err);
   55761           0 :                 return NULL;
   55762             :         }
   55763           0 :         blob = ndr_push_blob(push);
   55764           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   55765           0 :         TALLOC_FREE(push);
   55766           0 :         return ret;
   55767             : }
   55768             : 
   55769           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55770             : {
   55771           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55772           0 :         PyObject *bigendian_obj = NULL;
   55773           0 :         PyObject *ndr64_obj = NULL;
   55774           0 :         libndr_flags ndr_push_flags = 0;
   55775             : 
   55776           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   55777             :                 discard_const_p(char *, kwnames),
   55778             :                 &bigendian_obj,
   55779             :                 &ndr64_obj)) {
   55780           0 :                 return NULL;
   55781             :         }
   55782             : 
   55783           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55784           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55785             :         }
   55786           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55787           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55788             :         }
   55789             : 
   55790           0 :         return py_srvsvc_NetShareDelStart_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   55791             : }
   55792             : 
   55793           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55794             : {
   55795           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55796           0 :         PyObject *bigendian_obj = NULL;
   55797           0 :         PyObject *ndr64_obj = NULL;
   55798           0 :         libndr_flags ndr_push_flags = 0;
   55799             : 
   55800           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   55801             :                 discard_const_p(char *, kwnames),
   55802             :                 &bigendian_obj,
   55803             :                 &ndr64_obj)) {
   55804           0 :                 return NULL;
   55805             :         }
   55806             : 
   55807           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55808           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55809             :         }
   55810           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55811           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55812             :         }
   55813             : 
   55814           0 :         return py_srvsvc_NetShareDelStart_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   55815             : }
   55816             : 
   55817           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   55818             : {
   55819           0 :         const struct ndr_interface_call *call = NULL;
   55820           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(py_obj);
   55821           0 :         struct ndr_pull *pull = NULL;
   55822           0 :         enum ndr_err_code err;
   55823             : 
   55824           0 :         if (ndr_table_srvsvc.num_calls < 38) {
   55825           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelStart_ndr_unpack");
   55826           0 :                 return NULL;
   55827             :         }
   55828           0 :         call = &ndr_table_srvsvc.calls[37];
   55829             : 
   55830           0 :         pull = ndr_pull_init_blob(blob, object);
   55831           0 :         if (pull == NULL) {
   55832           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55833           0 :                 return NULL;
   55834             :         }
   55835             : 
   55836           0 :         pull->flags |= ndr_pull_flags;
   55837             : 
   55838           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   55839           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55840           0 :                 TALLOC_FREE(pull);
   55841           0 :                 PyErr_SetNdrError(err);
   55842           0 :                 return NULL;
   55843             :         }
   55844           0 :         if (!allow_remaining) {
   55845           0 :                 uint32_t highest_ofs;
   55846             : 
   55847           0 :                 if (pull->offset > pull->relative_highest_offset) {
   55848           0 :                         highest_ofs = pull->offset;
   55849             :                 } else {
   55850           0 :                         highest_ofs = pull->relative_highest_offset;
   55851             :                 }
   55852           0 :                 if (highest_ofs < pull->data_size) {
   55853           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   55854             :                                 "not all bytes consumed ofs[%u] size[%u]",
   55855             :                                 highest_ofs, pull->data_size);
   55856           0 :                         TALLOC_FREE(pull);
   55857           0 :                         PyErr_SetNdrError(err);
   55858           0 :                         return NULL;
   55859             :                 }
   55860             :         }
   55861             : 
   55862           0 :         TALLOC_FREE(pull);
   55863           0 :         Py_RETURN_NONE;
   55864             : }
   55865             : 
   55866           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55867             : {
   55868           0 :         DATA_BLOB blob;
   55869           0 :         Py_ssize_t blob_length = 0;
   55870           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55871           0 :         PyObject *bigendian_obj = NULL;
   55872           0 :         PyObject *ndr64_obj = NULL;
   55873           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55874           0 :         PyObject *allow_remaining_obj = NULL;
   55875           0 :         bool allow_remaining = false;
   55876             : 
   55877           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   55878             :                 discard_const_p(char *, kwnames),
   55879             :                 &blob.data, &blob_length,
   55880             :                 &bigendian_obj,
   55881             :                 &ndr64_obj,
   55882             :                 &allow_remaining_obj)) {
   55883           0 :                 return NULL;
   55884             :         }
   55885           0 :         blob.length = blob_length;
   55886             : 
   55887           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55888           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55889             :         }
   55890           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55891           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55892             :         }
   55893             : 
   55894           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55895           0 :                 allow_remaining = true;
   55896             :         }
   55897             : 
   55898           0 :         return py_srvsvc_NetShareDelStart_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   55899             : }
   55900             : 
   55901           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55902             : {
   55903           0 :         DATA_BLOB blob;
   55904           0 :         Py_ssize_t blob_length = 0;
   55905           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55906           0 :         PyObject *bigendian_obj = NULL;
   55907           0 :         PyObject *ndr64_obj = NULL;
   55908           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55909           0 :         PyObject *allow_remaining_obj = NULL;
   55910           0 :         bool allow_remaining = false;
   55911             : 
   55912           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   55913             :                 discard_const_p(char *, kwnames),
   55914             :                 &blob.data, &blob_length,
   55915             :                 &bigendian_obj,
   55916             :                 &ndr64_obj,
   55917             :                 &allow_remaining_obj)) {
   55918           0 :                 return NULL;
   55919             :         }
   55920           0 :         blob.length = blob_length;
   55921             : 
   55922           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55923           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55924             :         }
   55925           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55926           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55927             :         }
   55928             : 
   55929           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55930           0 :                 allow_remaining = true;
   55931             :         }
   55932             : 
   55933           0 :         return py_srvsvc_NetShareDelStart_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   55934             : }
   55935             : 
   55936           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   55937             : {
   55938           0 :         const struct ndr_interface_call *call = NULL;
   55939           0 :         struct srvsvc_NetShareDelStart *object = pytalloc_get_ptr(py_obj);
   55940           0 :         PyObject *ret;
   55941           0 :         char *retstr;
   55942             : 
   55943           0 :         if (ndr_table_srvsvc.num_calls < 38) {
   55944           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelStart_ndr_print");
   55945           0 :                 return NULL;
   55946             :         }
   55947           0 :         call = &ndr_table_srvsvc.calls[37];
   55948             : 
   55949           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   55950           0 :         ret = PyUnicode_FromString(retstr);
   55951           0 :         TALLOC_FREE(retstr);
   55952             : 
   55953           0 :         return ret;
   55954             : }
   55955             : 
   55956           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55957             : {
   55958           0 :         return py_srvsvc_NetShareDelStart_ndr_print(py_obj, "srvsvc_NetShareDelStart_in", NDR_IN);
   55959             : }
   55960             : 
   55961           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55962             : {
   55963           0 :         return py_srvsvc_NetShareDelStart_ndr_print(py_obj, "srvsvc_NetShareDelStart_out", NDR_OUT);
   55964             : }
   55965             : 
   55966             : static PyMethodDef py_srvsvc_NetShareDelStart_methods[] = {
   55967             :         { "opnum", (PyCFunction)py_srvsvc_NetShareDelStart_ndr_opnum, METH_NOARGS|METH_CLASS,
   55968             :                 "srvsvc.NetShareDelStart.opnum() -> 37 (0x25) " },
   55969             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelStart_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   55970             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   55971             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelStart_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   55972             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   55973             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelStart_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   55974             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   55975             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelStart_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   55976             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   55977             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareDelStart_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   55978             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareDelStart_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   55979             :         { NULL, NULL, 0, NULL }
   55980             : };
   55981             : 
   55982             : 
   55983             : static PyTypeObject srvsvc_NetShareDelStart_Type = {
   55984             :         PyVarObject_HEAD_INIT(NULL, 0)
   55985             :         .tp_name = "srvsvc.NetShareDelStart",
   55986             :         .tp_getset = py_srvsvc_NetShareDelStart_getsetters,
   55987             :         .tp_methods = py_srvsvc_NetShareDelStart_methods,
   55988             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   55989             :         .tp_new = py_srvsvc_NetShareDelStart_new,
   55990             : };
   55991             : 
   55992           0 : static bool pack_py_srvsvc_NetShareDelStart_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareDelStart *r)
   55993             : {
   55994           0 :         PyObject *py_server_unc;
   55995           0 :         PyObject *py_share;
   55996           0 :         PyObject *py_reserved;
   55997           0 :         const char *kwnames[] = {
   55998             :                 "server_unc", "share", "reserved", NULL
   55999             :         };
   56000             : 
   56001           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetShareDelStart", discard_const_p(char *, kwnames), &py_server_unc, &py_share, &py_reserved)) {
   56002           0 :                 return false;
   56003             :         }
   56004             : 
   56005           0 :         if (py_server_unc == NULL) {
   56006           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   56007           0 :                 return false;
   56008             :         }
   56009           0 :         if (py_server_unc == Py_None) {
   56010           0 :                 r->in.server_unc = NULL;
   56011             :         } else {
   56012           0 :                 r->in.server_unc = NULL;
   56013             :                 {
   56014           0 :                         const char *test_str;
   56015           0 :                         const char *talloc_str;
   56016           0 :                         PyObject *unicode = NULL;
   56017           0 :                         if (PyUnicode_Check(py_server_unc)) {
   56018           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   56019           0 :                                 if (unicode == NULL) {
   56020           0 :                                         return false;
   56021             :                                 }
   56022           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56023           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   56024           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   56025             :                         } else {
   56026           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   56027           0 :                                 return false;
   56028             :                         }
   56029           0 :                         talloc_str = talloc_strdup(r, test_str);
   56030           0 :                         if (unicode != NULL) {
   56031           0 :                                 Py_DECREF(unicode);
   56032             :                         }
   56033           0 :                         if (talloc_str == NULL) {
   56034           0 :                                 PyErr_NoMemory();
   56035           0 :                                 return false;
   56036             :                         }
   56037           0 :                         r->in.server_unc = talloc_str;
   56038             :                 }
   56039             :         }
   56040           0 :         if (py_share == NULL) {
   56041           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.share");
   56042           0 :                 return false;
   56043             :         }
   56044             :         {
   56045           0 :                 const char *test_str;
   56046           0 :                 const char *talloc_str;
   56047           0 :                 PyObject *unicode = NULL;
   56048           0 :                 if (PyUnicode_Check(py_share)) {
   56049           0 :                         unicode = PyUnicode_AsEncodedString(py_share, "utf-8", "ignore");
   56050           0 :                         if (unicode == NULL) {
   56051           0 :                                 return false;
   56052             :                         }
   56053           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56054           0 :                 } else if (PyBytes_Check(py_share)) {
   56055           0 :                         test_str = PyBytes_AS_STRING(py_share);
   56056             :                 } else {
   56057           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
   56058           0 :                         return false;
   56059             :                 }
   56060           0 :                 talloc_str = talloc_strdup(r, test_str);
   56061           0 :                 if (unicode != NULL) {
   56062           0 :                         Py_DECREF(unicode);
   56063             :                 }
   56064           0 :                 if (talloc_str == NULL) {
   56065           0 :                         PyErr_NoMemory();
   56066           0 :                         return false;
   56067             :                 }
   56068           0 :                 r->in.share = talloc_str;
   56069             :         }
   56070           0 :         if (py_reserved == NULL) {
   56071           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.reserved");
   56072           0 :                 return false;
   56073             :         }
   56074             :         {
   56075           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reserved));
   56076           0 :                 if (PyLong_Check(py_reserved)) {
   56077           0 :                         unsigned long long test_var;
   56078           0 :                         test_var = PyLong_AsUnsignedLongLong(py_reserved);
   56079           0 :                         if (PyErr_Occurred() != NULL) {
   56080           0 :                                 return false;
   56081             :                         }
   56082           0 :                         if (test_var > uint_max) {
   56083           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   56084             :                                   PyLong_Type.tp_name, uint_max, test_var);
   56085           0 :                                 return false;
   56086             :                         }
   56087           0 :                         r->in.reserved = test_var;
   56088             :                 } else {
   56089           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   56090             :                           PyLong_Type.tp_name);
   56091           0 :                         return false;
   56092             :                 }
   56093             :         }
   56094           0 :         return true;
   56095             : }
   56096             : 
   56097           0 : static PyObject *unpack_py_srvsvc_NetShareDelStart_args_out(struct srvsvc_NetShareDelStart *r)
   56098             : {
   56099           0 :         PyObject *result;
   56100           0 :         PyObject *py_hnd;
   56101           0 :         if (r->out.hnd == NULL) {
   56102           0 :                 py_hnd = Py_None;
   56103           0 :                 Py_INCREF(py_hnd);
   56104             :         } else {
   56105           0 :                 py_hnd = pytalloc_reference_ex(policy_handle_Type, r->out.hnd, r->out.hnd);
   56106             :         }
   56107           0 :         result = py_hnd;
   56108           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   56109           0 :                 PyErr_SetWERROR(r->out.result);
   56110           0 :                 return NULL;
   56111             :         }
   56112             : 
   56113           0 :         return result;
   56114             : }
   56115             : 
   56116             : 
   56117           0 : static PyObject *py_srvsvc_NetShareDelCommit_in_get_hnd(PyObject *obj, void *closure)
   56118             : {
   56119           0 :         struct srvsvc_NetShareDelCommit *object = pytalloc_get_ptr(obj);
   56120           0 :         PyObject *py_hnd;
   56121           0 :         if (object->in.hnd == NULL) {
   56122           0 :                 Py_RETURN_NONE;
   56123             :         }
   56124           0 :         if (object->in.hnd == NULL) {
   56125           0 :                 py_hnd = Py_None;
   56126           0 :                 Py_INCREF(py_hnd);
   56127             :         } else {
   56128           0 :                 py_hnd = pytalloc_reference_ex(policy_handle_Type, object->in.hnd, object->in.hnd);
   56129             :         }
   56130           0 :         return py_hnd;
   56131             : }
   56132             : 
   56133           0 : static int py_srvsvc_NetShareDelCommit_in_set_hnd(PyObject *py_obj, PyObject *value, void *closure)
   56134             : {
   56135           0 :         struct srvsvc_NetShareDelCommit *object = pytalloc_get_ptr(py_obj);
   56136           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.hnd));
   56137           0 :         if (value == NULL) {
   56138           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.hnd");
   56139           0 :                 return -1;
   56140             :         }
   56141           0 :         if (value == Py_None) {
   56142           0 :                 object->in.hnd = NULL;
   56143             :         } else {
   56144           0 :                 object->in.hnd = NULL;
   56145           0 :                 PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   56146           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56147           0 :                         PyErr_NoMemory();
   56148           0 :                         return -1;
   56149             :                 }
   56150           0 :                 object->in.hnd = (struct policy_handle *)pytalloc_get_ptr(value);
   56151             :         }
   56152           0 :         return 0;
   56153             : }
   56154             : 
   56155           0 : static PyObject *py_srvsvc_NetShareDelCommit_out_get_hnd(PyObject *obj, void *closure)
   56156             : {
   56157           0 :         struct srvsvc_NetShareDelCommit *object = pytalloc_get_ptr(obj);
   56158           0 :         PyObject *py_hnd;
   56159           0 :         if (object->out.hnd == NULL) {
   56160           0 :                 Py_RETURN_NONE;
   56161             :         }
   56162           0 :         if (object->out.hnd == NULL) {
   56163           0 :                 py_hnd = Py_None;
   56164           0 :                 Py_INCREF(py_hnd);
   56165             :         } else {
   56166           0 :                 py_hnd = pytalloc_reference_ex(policy_handle_Type, object->out.hnd, object->out.hnd);
   56167             :         }
   56168           0 :         return py_hnd;
   56169             : }
   56170             : 
   56171           0 : static int py_srvsvc_NetShareDelCommit_out_set_hnd(PyObject *py_obj, PyObject *value, void *closure)
   56172             : {
   56173           0 :         struct srvsvc_NetShareDelCommit *object = pytalloc_get_ptr(py_obj);
   56174           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.hnd));
   56175           0 :         if (value == NULL) {
   56176           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.hnd");
   56177           0 :                 return -1;
   56178             :         }
   56179           0 :         if (value == Py_None) {
   56180           0 :                 object->out.hnd = NULL;
   56181             :         } else {
   56182           0 :                 object->out.hnd = NULL;
   56183           0 :                 PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   56184           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56185           0 :                         PyErr_NoMemory();
   56186           0 :                         return -1;
   56187             :                 }
   56188           0 :                 object->out.hnd = (struct policy_handle *)pytalloc_get_ptr(value);
   56189             :         }
   56190           0 :         return 0;
   56191             : }
   56192             : 
   56193           0 : static PyObject *py_srvsvc_NetShareDelCommit_get_result(PyObject *obj, void *closure)
   56194             : {
   56195           0 :         struct srvsvc_NetShareDelCommit *object = pytalloc_get_ptr(obj);
   56196           0 :         PyObject *py_result;
   56197           0 :         py_result = PyErr_FromWERROR(object->out.result);
   56198           0 :         return py_result;
   56199             : }
   56200             : 
   56201           0 : static int py_srvsvc_NetShareDelCommit_set_result(PyObject *py_obj, PyObject *value, void *closure)
   56202             : {
   56203           0 :         struct srvsvc_NetShareDelCommit *object = pytalloc_get_ptr(py_obj);
   56204           0 :         if (value == NULL) {
   56205           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   56206           0 :                 return -1;
   56207             :         }
   56208           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   56209           0 :         return 0;
   56210             : }
   56211             : 
   56212             : static PyGetSetDef py_srvsvc_NetShareDelCommit_getsetters[] = {
   56213             :         {
   56214             :                 .name = discard_const_p(char, "in_hnd"),
   56215             :                 .get = py_srvsvc_NetShareDelCommit_in_get_hnd,
   56216             :                 .set = py_srvsvc_NetShareDelCommit_in_set_hnd,
   56217             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   56218             :         },
   56219             :         {
   56220             :                 .name = discard_const_p(char, "out_hnd"),
   56221             :                 .get = py_srvsvc_NetShareDelCommit_out_get_hnd,
   56222             :                 .set = py_srvsvc_NetShareDelCommit_out_set_hnd,
   56223             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   56224             :         },
   56225             :         {
   56226             :                 .name = discard_const_p(char, "result"),
   56227             :                 .get = py_srvsvc_NetShareDelCommit_get_result,
   56228             :                 .set = py_srvsvc_NetShareDelCommit_set_result,
   56229             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   56230             :         },
   56231             :         { .name = NULL }
   56232             : };
   56233             : 
   56234           0 : static PyObject *py_srvsvc_NetShareDelCommit_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   56235             : {
   56236           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareDelCommit, type);
   56237           0 :         return self;
   56238             : }
   56239             : 
   56240           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   56241             : {
   56242             : 
   56243             : 
   56244           0 :         return PyLong_FromLong(38);
   56245             : }
   56246             : 
   56247           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   56248             : {
   56249           0 :         const struct ndr_interface_call *call = NULL;
   56250           0 :         struct srvsvc_NetShareDelCommit *object = pytalloc_get_ptr(py_obj);
   56251           0 :         PyObject *ret = NULL;
   56252           0 :         struct ndr_push *push = NULL;
   56253           0 :         DATA_BLOB blob;
   56254           0 :         enum ndr_err_code err;
   56255             : 
   56256           0 :         if (ndr_table_srvsvc.num_calls < 39) {
   56257           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelCommit_ndr_pack");
   56258           0 :                 return NULL;
   56259             :         }
   56260           0 :         call = &ndr_table_srvsvc.calls[38];
   56261             : 
   56262           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   56263           0 :         if (push == NULL) {
   56264           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56265           0 :                 return NULL;
   56266             :         }
   56267             : 
   56268           0 :         push->flags |= ndr_push_flags;
   56269             : 
   56270           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   56271           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56272           0 :                 TALLOC_FREE(push);
   56273           0 :                 PyErr_SetNdrError(err);
   56274           0 :                 return NULL;
   56275             :         }
   56276           0 :         blob = ndr_push_blob(push);
   56277           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   56278           0 :         TALLOC_FREE(push);
   56279           0 :         return ret;
   56280             : }
   56281             : 
   56282           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56283             : {
   56284           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   56285           0 :         PyObject *bigendian_obj = NULL;
   56286           0 :         PyObject *ndr64_obj = NULL;
   56287           0 :         libndr_flags ndr_push_flags = 0;
   56288             : 
   56289           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   56290             :                 discard_const_p(char *, kwnames),
   56291             :                 &bigendian_obj,
   56292             :                 &ndr64_obj)) {
   56293           0 :                 return NULL;
   56294             :         }
   56295             : 
   56296           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56297           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56298             :         }
   56299           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56300           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56301             :         }
   56302             : 
   56303           0 :         return py_srvsvc_NetShareDelCommit_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   56304             : }
   56305             : 
   56306           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56307             : {
   56308           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   56309           0 :         PyObject *bigendian_obj = NULL;
   56310           0 :         PyObject *ndr64_obj = NULL;
   56311           0 :         libndr_flags ndr_push_flags = 0;
   56312             : 
   56313           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   56314             :                 discard_const_p(char *, kwnames),
   56315             :                 &bigendian_obj,
   56316             :                 &ndr64_obj)) {
   56317           0 :                 return NULL;
   56318             :         }
   56319             : 
   56320           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56321           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56322             :         }
   56323           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56324           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56325             :         }
   56326             : 
   56327           0 :         return py_srvsvc_NetShareDelCommit_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   56328             : }
   56329             : 
   56330           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   56331             : {
   56332           0 :         const struct ndr_interface_call *call = NULL;
   56333           0 :         struct srvsvc_NetShareDelCommit *object = pytalloc_get_ptr(py_obj);
   56334           0 :         struct ndr_pull *pull = NULL;
   56335           0 :         enum ndr_err_code err;
   56336             : 
   56337           0 :         if (ndr_table_srvsvc.num_calls < 39) {
   56338           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelCommit_ndr_unpack");
   56339           0 :                 return NULL;
   56340             :         }
   56341           0 :         call = &ndr_table_srvsvc.calls[38];
   56342             : 
   56343           0 :         pull = ndr_pull_init_blob(blob, object);
   56344           0 :         if (pull == NULL) {
   56345           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56346           0 :                 return NULL;
   56347             :         }
   56348             : 
   56349           0 :         pull->flags |= ndr_pull_flags;
   56350             : 
   56351           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   56352           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56353           0 :                 TALLOC_FREE(pull);
   56354           0 :                 PyErr_SetNdrError(err);
   56355           0 :                 return NULL;
   56356             :         }
   56357           0 :         if (!allow_remaining) {
   56358           0 :                 uint32_t highest_ofs;
   56359             : 
   56360           0 :                 if (pull->offset > pull->relative_highest_offset) {
   56361           0 :                         highest_ofs = pull->offset;
   56362             :                 } else {
   56363           0 :                         highest_ofs = pull->relative_highest_offset;
   56364             :                 }
   56365           0 :                 if (highest_ofs < pull->data_size) {
   56366           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   56367             :                                 "not all bytes consumed ofs[%u] size[%u]",
   56368             :                                 highest_ofs, pull->data_size);
   56369           0 :                         TALLOC_FREE(pull);
   56370           0 :                         PyErr_SetNdrError(err);
   56371           0 :                         return NULL;
   56372             :                 }
   56373             :         }
   56374             : 
   56375           0 :         TALLOC_FREE(pull);
   56376           0 :         Py_RETURN_NONE;
   56377             : }
   56378             : 
   56379           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56380             : {
   56381           0 :         DATA_BLOB blob;
   56382           0 :         Py_ssize_t blob_length = 0;
   56383           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56384           0 :         PyObject *bigendian_obj = NULL;
   56385           0 :         PyObject *ndr64_obj = NULL;
   56386           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56387           0 :         PyObject *allow_remaining_obj = NULL;
   56388           0 :         bool allow_remaining = false;
   56389             : 
   56390           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   56391             :                 discard_const_p(char *, kwnames),
   56392             :                 &blob.data, &blob_length,
   56393             :                 &bigendian_obj,
   56394             :                 &ndr64_obj,
   56395             :                 &allow_remaining_obj)) {
   56396           0 :                 return NULL;
   56397             :         }
   56398           0 :         blob.length = blob_length;
   56399             : 
   56400           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56401           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56402             :         }
   56403           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56404           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56405             :         }
   56406             : 
   56407           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56408           0 :                 allow_remaining = true;
   56409             :         }
   56410             : 
   56411           0 :         return py_srvsvc_NetShareDelCommit_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   56412             : }
   56413             : 
   56414           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56415             : {
   56416           0 :         DATA_BLOB blob;
   56417           0 :         Py_ssize_t blob_length = 0;
   56418           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56419           0 :         PyObject *bigendian_obj = NULL;
   56420           0 :         PyObject *ndr64_obj = NULL;
   56421           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56422           0 :         PyObject *allow_remaining_obj = NULL;
   56423           0 :         bool allow_remaining = false;
   56424             : 
   56425           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   56426             :                 discard_const_p(char *, kwnames),
   56427             :                 &blob.data, &blob_length,
   56428             :                 &bigendian_obj,
   56429             :                 &ndr64_obj,
   56430             :                 &allow_remaining_obj)) {
   56431           0 :                 return NULL;
   56432             :         }
   56433           0 :         blob.length = blob_length;
   56434             : 
   56435           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56436           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56437             :         }
   56438           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56439           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56440             :         }
   56441             : 
   56442           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56443           0 :                 allow_remaining = true;
   56444             :         }
   56445             : 
   56446           0 :         return py_srvsvc_NetShareDelCommit_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   56447             : }
   56448             : 
   56449           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   56450             : {
   56451           0 :         const struct ndr_interface_call *call = NULL;
   56452           0 :         struct srvsvc_NetShareDelCommit *object = pytalloc_get_ptr(py_obj);
   56453           0 :         PyObject *ret;
   56454           0 :         char *retstr;
   56455             : 
   56456           0 :         if (ndr_table_srvsvc.num_calls < 39) {
   56457           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelCommit_ndr_print");
   56458           0 :                 return NULL;
   56459             :         }
   56460           0 :         call = &ndr_table_srvsvc.calls[38];
   56461             : 
   56462           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   56463           0 :         ret = PyUnicode_FromString(retstr);
   56464           0 :         TALLOC_FREE(retstr);
   56465             : 
   56466           0 :         return ret;
   56467             : }
   56468             : 
   56469           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56470             : {
   56471           0 :         return py_srvsvc_NetShareDelCommit_ndr_print(py_obj, "srvsvc_NetShareDelCommit_in", NDR_IN);
   56472             : }
   56473             : 
   56474           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56475             : {
   56476           0 :         return py_srvsvc_NetShareDelCommit_ndr_print(py_obj, "srvsvc_NetShareDelCommit_out", NDR_OUT);
   56477             : }
   56478             : 
   56479             : static PyMethodDef py_srvsvc_NetShareDelCommit_methods[] = {
   56480             :         { "opnum", (PyCFunction)py_srvsvc_NetShareDelCommit_ndr_opnum, METH_NOARGS|METH_CLASS,
   56481             :                 "srvsvc.NetShareDelCommit.opnum() -> 38 (0x26) " },
   56482             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelCommit_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   56483             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   56484             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelCommit_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   56485             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   56486             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelCommit_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   56487             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   56488             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelCommit_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   56489             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   56490             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareDelCommit_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   56491             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareDelCommit_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   56492             :         { NULL, NULL, 0, NULL }
   56493             : };
   56494             : 
   56495             : 
   56496             : static PyTypeObject srvsvc_NetShareDelCommit_Type = {
   56497             :         PyVarObject_HEAD_INIT(NULL, 0)
   56498             :         .tp_name = "srvsvc.NetShareDelCommit",
   56499             :         .tp_getset = py_srvsvc_NetShareDelCommit_getsetters,
   56500             :         .tp_methods = py_srvsvc_NetShareDelCommit_methods,
   56501             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   56502             :         .tp_new = py_srvsvc_NetShareDelCommit_new,
   56503             : };
   56504             : 
   56505           0 : static bool pack_py_srvsvc_NetShareDelCommit_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareDelCommit *r)
   56506             : {
   56507           0 :         PyObject *py_hnd;
   56508           0 :         const char *kwnames[] = {
   56509             :                 "hnd", NULL
   56510             :         };
   56511             : 
   56512           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:srvsvc_NetShareDelCommit", discard_const_p(char *, kwnames), &py_hnd)) {
   56513           0 :                 return false;
   56514             :         }
   56515             : 
   56516           0 :         if (py_hnd == NULL) {
   56517           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.hnd");
   56518           0 :                 return false;
   56519             :         }
   56520           0 :         if (py_hnd == Py_None) {
   56521           0 :                 r->in.hnd = NULL;
   56522             :         } else {
   56523           0 :                 r->in.hnd = NULL;
   56524           0 :                 PY_CHECK_TYPE(policy_handle_Type, py_hnd, return false;);
   56525           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_hnd)) == NULL) {
   56526           0 :                         PyErr_NoMemory();
   56527           0 :                         return false;
   56528             :                 }
   56529           0 :                 r->in.hnd = (struct policy_handle *)pytalloc_get_ptr(py_hnd);
   56530             :         }
   56531           0 :         return true;
   56532             : }
   56533             : 
   56534           0 : static PyObject *unpack_py_srvsvc_NetShareDelCommit_args_out(struct srvsvc_NetShareDelCommit *r)
   56535             : {
   56536           0 :         PyObject *result;
   56537           0 :         PyObject *py_hnd;
   56538           0 :         if (r->out.hnd == NULL) {
   56539           0 :                 py_hnd = Py_None;
   56540           0 :                 Py_INCREF(py_hnd);
   56541             :         } else {
   56542           0 :                 py_hnd = pytalloc_reference_ex(policy_handle_Type, r->out.hnd, r->out.hnd);
   56543             :         }
   56544           0 :         result = py_hnd;
   56545           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   56546           0 :                 PyErr_SetWERROR(r->out.result);
   56547           0 :                 return NULL;
   56548             :         }
   56549             : 
   56550           0 :         return result;
   56551             : }
   56552             : 
   56553             : 
   56554           0 : static PyObject *py_srvsvc_NetGetFileSecurity_in_get_server_unc(PyObject *obj, void *closure)
   56555             : {
   56556           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(obj);
   56557           0 :         PyObject *py_server_unc;
   56558           0 :         if (object->in.server_unc == NULL) {
   56559           0 :                 Py_RETURN_NONE;
   56560             :         }
   56561           0 :         if (object->in.server_unc == NULL) {
   56562           0 :                 py_server_unc = Py_None;
   56563           0 :                 Py_INCREF(py_server_unc);
   56564             :         } else {
   56565           0 :                 if (object->in.server_unc == NULL) {
   56566           0 :                         py_server_unc = Py_None;
   56567           0 :                         Py_INCREF(py_server_unc);
   56568             :                 } else {
   56569           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   56570             :                 }
   56571             :         }
   56572           0 :         return py_server_unc;
   56573             : }
   56574             : 
   56575           0 : static int py_srvsvc_NetGetFileSecurity_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   56576             : {
   56577           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(py_obj);
   56578           0 :         if (value == NULL) {
   56579           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   56580           0 :                 return -1;
   56581             :         }
   56582           0 :         if (value == Py_None) {
   56583           0 :                 object->in.server_unc = NULL;
   56584             :         } else {
   56585           0 :                 object->in.server_unc = NULL;
   56586             :                 {
   56587           0 :                         const char *test_str;
   56588           0 :                         const char *talloc_str;
   56589           0 :                         PyObject *unicode = NULL;
   56590           0 :                         if (PyUnicode_Check(value)) {
   56591           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56592           0 :                                 if (unicode == NULL) {
   56593           0 :                                         return -1;
   56594             :                                 }
   56595           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56596           0 :                         } else if (PyBytes_Check(value)) {
   56597           0 :                                 test_str = PyBytes_AS_STRING(value);
   56598             :                         } else {
   56599           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56600           0 :                                 return -1;
   56601             :                         }
   56602           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56603           0 :                         if (unicode != NULL) {
   56604           0 :                                 Py_DECREF(unicode);
   56605             :                         }
   56606           0 :                         if (talloc_str == NULL) {
   56607           0 :                                 PyErr_NoMemory();
   56608           0 :                                 return -1;
   56609             :                         }
   56610           0 :                         object->in.server_unc = talloc_str;
   56611             :                 }
   56612             :         }
   56613           0 :         return 0;
   56614             : }
   56615             : 
   56616           0 : static PyObject *py_srvsvc_NetGetFileSecurity_in_get_share(PyObject *obj, void *closure)
   56617             : {
   56618           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(obj);
   56619           0 :         PyObject *py_share;
   56620           0 :         if (object->in.share == NULL) {
   56621           0 :                 Py_RETURN_NONE;
   56622             :         }
   56623           0 :         if (object->in.share == NULL) {
   56624           0 :                 py_share = Py_None;
   56625           0 :                 Py_INCREF(py_share);
   56626             :         } else {
   56627           0 :                 if (object->in.share == NULL) {
   56628           0 :                         py_share = Py_None;
   56629           0 :                         Py_INCREF(py_share);
   56630             :                 } else {
   56631           0 :                         py_share = PyUnicode_Decode(object->in.share, strlen(object->in.share), "utf-8", "ignore");
   56632             :                 }
   56633             :         }
   56634           0 :         return py_share;
   56635             : }
   56636             : 
   56637           0 : static int py_srvsvc_NetGetFileSecurity_in_set_share(PyObject *py_obj, PyObject *value, void *closure)
   56638             : {
   56639           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(py_obj);
   56640           0 :         if (value == NULL) {
   56641           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.share");
   56642           0 :                 return -1;
   56643             :         }
   56644           0 :         if (value == Py_None) {
   56645           0 :                 object->in.share = NULL;
   56646             :         } else {
   56647           0 :                 object->in.share = NULL;
   56648             :                 {
   56649           0 :                         const char *test_str;
   56650           0 :                         const char *talloc_str;
   56651           0 :                         PyObject *unicode = NULL;
   56652           0 :                         if (PyUnicode_Check(value)) {
   56653           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56654           0 :                                 if (unicode == NULL) {
   56655           0 :                                         return -1;
   56656             :                                 }
   56657           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56658           0 :                         } else if (PyBytes_Check(value)) {
   56659           0 :                                 test_str = PyBytes_AS_STRING(value);
   56660             :                         } else {
   56661           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56662           0 :                                 return -1;
   56663             :                         }
   56664           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56665           0 :                         if (unicode != NULL) {
   56666           0 :                                 Py_DECREF(unicode);
   56667             :                         }
   56668           0 :                         if (talloc_str == NULL) {
   56669           0 :                                 PyErr_NoMemory();
   56670           0 :                                 return -1;
   56671             :                         }
   56672           0 :                         object->in.share = talloc_str;
   56673             :                 }
   56674             :         }
   56675           0 :         return 0;
   56676             : }
   56677             : 
   56678           0 : static PyObject *py_srvsvc_NetGetFileSecurity_in_get_file(PyObject *obj, void *closure)
   56679             : {
   56680           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(obj);
   56681           0 :         PyObject *py_file;
   56682           0 :         if (object->in.file == NULL) {
   56683           0 :                 py_file = Py_None;
   56684           0 :                 Py_INCREF(py_file);
   56685             :         } else {
   56686           0 :                 py_file = PyUnicode_Decode(object->in.file, strlen(object->in.file), "utf-8", "ignore");
   56687             :         }
   56688           0 :         return py_file;
   56689             : }
   56690             : 
   56691           0 : static int py_srvsvc_NetGetFileSecurity_in_set_file(PyObject *py_obj, PyObject *value, void *closure)
   56692             : {
   56693           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(py_obj);
   56694           0 :         if (value == NULL) {
   56695           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.file");
   56696           0 :                 return -1;
   56697             :         }
   56698             :         {
   56699           0 :                 const char *test_str;
   56700           0 :                 const char *talloc_str;
   56701           0 :                 PyObject *unicode = NULL;
   56702           0 :                 if (PyUnicode_Check(value)) {
   56703           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56704           0 :                         if (unicode == NULL) {
   56705           0 :                                 return -1;
   56706             :                         }
   56707           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56708           0 :                 } else if (PyBytes_Check(value)) {
   56709           0 :                         test_str = PyBytes_AS_STRING(value);
   56710             :                 } else {
   56711           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56712           0 :                         return -1;
   56713             :                 }
   56714           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56715           0 :                 if (unicode != NULL) {
   56716           0 :                         Py_DECREF(unicode);
   56717             :                 }
   56718           0 :                 if (talloc_str == NULL) {
   56719           0 :                         PyErr_NoMemory();
   56720           0 :                         return -1;
   56721             :                 }
   56722           0 :                 object->in.file = talloc_str;
   56723             :         }
   56724           0 :         return 0;
   56725             : }
   56726             : 
   56727           0 : static PyObject *py_srvsvc_NetGetFileSecurity_in_get_securityinformation(PyObject *obj, void *closure)
   56728             : {
   56729           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(obj);
   56730           0 :         PyObject *py_securityinformation;
   56731           0 :         py_securityinformation = PyLong_FromUnsignedLongLong((uint32_t)(object->in.securityinformation));
   56732           0 :         return py_securityinformation;
   56733             : }
   56734             : 
   56735           0 : static int py_srvsvc_NetGetFileSecurity_in_set_securityinformation(PyObject *py_obj, PyObject *value, void *closure)
   56736             : {
   56737           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(py_obj);
   56738           0 :         if (value == NULL) {
   56739           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.securityinformation");
   56740           0 :                 return -1;
   56741             :         }
   56742             :         {
   56743           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.securityinformation));
   56744           0 :                 if (PyLong_Check(value)) {
   56745           0 :                         unsigned long long test_var;
   56746           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   56747           0 :                         if (PyErr_Occurred() != NULL) {
   56748           0 :                                 return -1;
   56749             :                         }
   56750           0 :                         if (test_var > uint_max) {
   56751           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   56752             :                                   PyLong_Type.tp_name, uint_max, test_var);
   56753           0 :                                 return -1;
   56754             :                         }
   56755           0 :                         object->in.securityinformation = test_var;
   56756             :                 } else {
   56757           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   56758             :                           PyLong_Type.tp_name);
   56759           0 :                         return -1;
   56760             :                 }
   56761             :         }
   56762           0 :         return 0;
   56763             : }
   56764             : 
   56765           0 : static PyObject *py_srvsvc_NetGetFileSecurity_out_get_sd_buf(PyObject *obj, void *closure)
   56766             : {
   56767           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(obj);
   56768           0 :         PyObject *py_sd_buf;
   56769           0 :         if (object->out.sd_buf == NULL) {
   56770           0 :                 Py_RETURN_NONE;
   56771             :         }
   56772           0 :         if (*object->out.sd_buf == NULL) {
   56773           0 :                 py_sd_buf = Py_None;
   56774           0 :                 Py_INCREF(py_sd_buf);
   56775             :         } else {
   56776           0 :                 py_sd_buf = pytalloc_reference_ex(sec_desc_buf_Type, *object->out.sd_buf, *object->out.sd_buf);
   56777             :         }
   56778           0 :         return py_sd_buf;
   56779             : }
   56780             : 
   56781           0 : static int py_srvsvc_NetGetFileSecurity_out_set_sd_buf(PyObject *py_obj, PyObject *value, void *closure)
   56782             : {
   56783           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(py_obj);
   56784           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sd_buf));
   56785           0 :         if (value == NULL) {
   56786           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.sd_buf");
   56787           0 :                 return -1;
   56788             :         }
   56789           0 :         object->out.sd_buf = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sd_buf);
   56790           0 :         if (object->out.sd_buf == NULL) {
   56791           0 :                 PyErr_NoMemory();
   56792           0 :                 return -1;
   56793             :         }
   56794           0 :         if (value == Py_None) {
   56795           0 :                 *object->out.sd_buf = NULL;
   56796             :         } else {
   56797           0 :                 *object->out.sd_buf = NULL;
   56798           0 :                 PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   56799           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56800           0 :                         PyErr_NoMemory();
   56801           0 :                         return -1;
   56802             :                 }
   56803           0 :                 *object->out.sd_buf = (struct sec_desc_buf *)pytalloc_get_ptr(value);
   56804             :         }
   56805           0 :         return 0;
   56806             : }
   56807             : 
   56808           0 : static PyObject *py_srvsvc_NetGetFileSecurity_get_result(PyObject *obj, void *closure)
   56809             : {
   56810           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(obj);
   56811           0 :         PyObject *py_result;
   56812           0 :         py_result = PyErr_FromWERROR(object->out.result);
   56813           0 :         return py_result;
   56814             : }
   56815             : 
   56816           0 : static int py_srvsvc_NetGetFileSecurity_set_result(PyObject *py_obj, PyObject *value, void *closure)
   56817             : {
   56818           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(py_obj);
   56819           0 :         if (value == NULL) {
   56820           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   56821           0 :                 return -1;
   56822             :         }
   56823           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   56824           0 :         return 0;
   56825             : }
   56826             : 
   56827             : static PyGetSetDef py_srvsvc_NetGetFileSecurity_getsetters[] = {
   56828             :         {
   56829             :                 .name = discard_const_p(char, "in_server_unc"),
   56830             :                 .get = py_srvsvc_NetGetFileSecurity_in_get_server_unc,
   56831             :                 .set = py_srvsvc_NetGetFileSecurity_in_set_server_unc,
   56832             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   56833             :         },
   56834             :         {
   56835             :                 .name = discard_const_p(char, "in_share"),
   56836             :                 .get = py_srvsvc_NetGetFileSecurity_in_get_share,
   56837             :                 .set = py_srvsvc_NetGetFileSecurity_in_set_share,
   56838             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   56839             :         },
   56840             :         {
   56841             :                 .name = discard_const_p(char, "in_file"),
   56842             :                 .get = py_srvsvc_NetGetFileSecurity_in_get_file,
   56843             :                 .set = py_srvsvc_NetGetFileSecurity_in_set_file,
   56844             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   56845             :         },
   56846             :         {
   56847             :                 .name = discard_const_p(char, "in_securityinformation"),
   56848             :                 .get = py_srvsvc_NetGetFileSecurity_in_get_securityinformation,
   56849             :                 .set = py_srvsvc_NetGetFileSecurity_in_set_securityinformation,
   56850             :                 .doc = discard_const_p(char, "PIDL-generated element of base type security_secinfo")
   56851             :         },
   56852             :         {
   56853             :                 .name = discard_const_p(char, "out_sd_buf"),
   56854             :                 .get = py_srvsvc_NetGetFileSecurity_out_get_sd_buf,
   56855             :                 .set = py_srvsvc_NetGetFileSecurity_out_set_sd_buf,
   56856             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   56857             :         },
   56858             :         {
   56859             :                 .name = discard_const_p(char, "result"),
   56860             :                 .get = py_srvsvc_NetGetFileSecurity_get_result,
   56861             :                 .set = py_srvsvc_NetGetFileSecurity_set_result,
   56862             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   56863             :         },
   56864             :         { .name = NULL }
   56865             : };
   56866             : 
   56867           0 : static PyObject *py_srvsvc_NetGetFileSecurity_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   56868             : {
   56869           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetGetFileSecurity, type);
   56870           0 :         struct srvsvc_NetGetFileSecurity *_self = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(self);
   56871           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   56872             :         /* a pointer to a NULL pointer */
   56873           0 :         _self->out.sd_buf = talloc_zero(mem_ctx, struct sec_desc_buf *);
   56874           0 :         return self;
   56875             : }
   56876             : 
   56877           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   56878             : {
   56879             : 
   56880             : 
   56881           0 :         return PyLong_FromLong(39);
   56882             : }
   56883             : 
   56884           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   56885             : {
   56886           0 :         const struct ndr_interface_call *call = NULL;
   56887           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(py_obj);
   56888           0 :         PyObject *ret = NULL;
   56889           0 :         struct ndr_push *push = NULL;
   56890           0 :         DATA_BLOB blob;
   56891           0 :         enum ndr_err_code err;
   56892             : 
   56893           0 :         if (ndr_table_srvsvc.num_calls < 40) {
   56894           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetGetFileSecurity_ndr_pack");
   56895           0 :                 return NULL;
   56896             :         }
   56897           0 :         call = &ndr_table_srvsvc.calls[39];
   56898             : 
   56899           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   56900           0 :         if (push == NULL) {
   56901           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56902           0 :                 return NULL;
   56903             :         }
   56904             : 
   56905           0 :         push->flags |= ndr_push_flags;
   56906             : 
   56907           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   56908           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56909           0 :                 TALLOC_FREE(push);
   56910           0 :                 PyErr_SetNdrError(err);
   56911           0 :                 return NULL;
   56912             :         }
   56913           0 :         blob = ndr_push_blob(push);
   56914           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   56915           0 :         TALLOC_FREE(push);
   56916           0 :         return ret;
   56917             : }
   56918             : 
   56919           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56920             : {
   56921           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   56922           0 :         PyObject *bigendian_obj = NULL;
   56923           0 :         PyObject *ndr64_obj = NULL;
   56924           0 :         libndr_flags ndr_push_flags = 0;
   56925             : 
   56926           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   56927             :                 discard_const_p(char *, kwnames),
   56928             :                 &bigendian_obj,
   56929             :                 &ndr64_obj)) {
   56930           0 :                 return NULL;
   56931             :         }
   56932             : 
   56933           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56934           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56935             :         }
   56936           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56937           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56938             :         }
   56939             : 
   56940           0 :         return py_srvsvc_NetGetFileSecurity_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   56941             : }
   56942             : 
   56943           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56944             : {
   56945           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   56946           0 :         PyObject *bigendian_obj = NULL;
   56947           0 :         PyObject *ndr64_obj = NULL;
   56948           0 :         libndr_flags ndr_push_flags = 0;
   56949             : 
   56950           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   56951             :                 discard_const_p(char *, kwnames),
   56952             :                 &bigendian_obj,
   56953             :                 &ndr64_obj)) {
   56954           0 :                 return NULL;
   56955             :         }
   56956             : 
   56957           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56958           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56959             :         }
   56960           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56961           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56962             :         }
   56963             : 
   56964           0 :         return py_srvsvc_NetGetFileSecurity_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   56965             : }
   56966             : 
   56967           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   56968             : {
   56969           0 :         const struct ndr_interface_call *call = NULL;
   56970           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(py_obj);
   56971           0 :         struct ndr_pull *pull = NULL;
   56972           0 :         enum ndr_err_code err;
   56973             : 
   56974           0 :         if (ndr_table_srvsvc.num_calls < 40) {
   56975           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetGetFileSecurity_ndr_unpack");
   56976           0 :                 return NULL;
   56977             :         }
   56978           0 :         call = &ndr_table_srvsvc.calls[39];
   56979             : 
   56980           0 :         pull = ndr_pull_init_blob(blob, object);
   56981           0 :         if (pull == NULL) {
   56982           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56983           0 :                 return NULL;
   56984             :         }
   56985             : 
   56986           0 :         pull->flags |= ndr_pull_flags;
   56987             : 
   56988           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   56989           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56990           0 :                 TALLOC_FREE(pull);
   56991           0 :                 PyErr_SetNdrError(err);
   56992           0 :                 return NULL;
   56993             :         }
   56994           0 :         if (!allow_remaining) {
   56995           0 :                 uint32_t highest_ofs;
   56996             : 
   56997           0 :                 if (pull->offset > pull->relative_highest_offset) {
   56998           0 :                         highest_ofs = pull->offset;
   56999             :                 } else {
   57000           0 :                         highest_ofs = pull->relative_highest_offset;
   57001             :                 }
   57002           0 :                 if (highest_ofs < pull->data_size) {
   57003           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   57004             :                                 "not all bytes consumed ofs[%u] size[%u]",
   57005             :                                 highest_ofs, pull->data_size);
   57006           0 :                         TALLOC_FREE(pull);
   57007           0 :                         PyErr_SetNdrError(err);
   57008           0 :                         return NULL;
   57009             :                 }
   57010             :         }
   57011             : 
   57012           0 :         TALLOC_FREE(pull);
   57013           0 :         Py_RETURN_NONE;
   57014             : }
   57015             : 
   57016           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57017             : {
   57018           0 :         DATA_BLOB blob;
   57019           0 :         Py_ssize_t blob_length = 0;
   57020           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57021           0 :         PyObject *bigendian_obj = NULL;
   57022           0 :         PyObject *ndr64_obj = NULL;
   57023           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57024           0 :         PyObject *allow_remaining_obj = NULL;
   57025           0 :         bool allow_remaining = false;
   57026             : 
   57027           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   57028             :                 discard_const_p(char *, kwnames),
   57029             :                 &blob.data, &blob_length,
   57030             :                 &bigendian_obj,
   57031             :                 &ndr64_obj,
   57032             :                 &allow_remaining_obj)) {
   57033           0 :                 return NULL;
   57034             :         }
   57035           0 :         blob.length = blob_length;
   57036             : 
   57037           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57038           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57039             :         }
   57040           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57041           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57042             :         }
   57043             : 
   57044           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57045           0 :                 allow_remaining = true;
   57046             :         }
   57047             : 
   57048           0 :         return py_srvsvc_NetGetFileSecurity_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   57049             : }
   57050             : 
   57051           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57052             : {
   57053           0 :         DATA_BLOB blob;
   57054           0 :         Py_ssize_t blob_length = 0;
   57055           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57056           0 :         PyObject *bigendian_obj = NULL;
   57057           0 :         PyObject *ndr64_obj = NULL;
   57058           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57059           0 :         PyObject *allow_remaining_obj = NULL;
   57060           0 :         bool allow_remaining = false;
   57061             : 
   57062           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   57063             :                 discard_const_p(char *, kwnames),
   57064             :                 &blob.data, &blob_length,
   57065             :                 &bigendian_obj,
   57066             :                 &ndr64_obj,
   57067             :                 &allow_remaining_obj)) {
   57068           0 :                 return NULL;
   57069             :         }
   57070           0 :         blob.length = blob_length;
   57071             : 
   57072           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57073           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57074             :         }
   57075           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57076           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57077             :         }
   57078             : 
   57079           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57080           0 :                 allow_remaining = true;
   57081             :         }
   57082             : 
   57083           0 :         return py_srvsvc_NetGetFileSecurity_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   57084             : }
   57085             : 
   57086           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   57087             : {
   57088           0 :         const struct ndr_interface_call *call = NULL;
   57089           0 :         struct srvsvc_NetGetFileSecurity *object = pytalloc_get_ptr(py_obj);
   57090           0 :         PyObject *ret;
   57091           0 :         char *retstr;
   57092             : 
   57093           0 :         if (ndr_table_srvsvc.num_calls < 40) {
   57094           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetGetFileSecurity_ndr_print");
   57095           0 :                 return NULL;
   57096             :         }
   57097           0 :         call = &ndr_table_srvsvc.calls[39];
   57098             : 
   57099           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   57100           0 :         ret = PyUnicode_FromString(retstr);
   57101           0 :         TALLOC_FREE(retstr);
   57102             : 
   57103           0 :         return ret;
   57104             : }
   57105             : 
   57106           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   57107             : {
   57108           0 :         return py_srvsvc_NetGetFileSecurity_ndr_print(py_obj, "srvsvc_NetGetFileSecurity_in", NDR_IN);
   57109             : }
   57110             : 
   57111           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   57112             : {
   57113           0 :         return py_srvsvc_NetGetFileSecurity_ndr_print(py_obj, "srvsvc_NetGetFileSecurity_out", NDR_OUT);
   57114             : }
   57115             : 
   57116             : static PyMethodDef py_srvsvc_NetGetFileSecurity_methods[] = {
   57117             :         { "opnum", (PyCFunction)py_srvsvc_NetGetFileSecurity_ndr_opnum, METH_NOARGS|METH_CLASS,
   57118             :                 "srvsvc.NetGetFileSecurity.opnum() -> 39 (0x27) " },
   57119             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetGetFileSecurity_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   57120             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   57121             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetGetFileSecurity_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   57122             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   57123             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetGetFileSecurity_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   57124             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   57125             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetGetFileSecurity_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   57126             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   57127             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetGetFileSecurity_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   57128             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetGetFileSecurity_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   57129             :         { NULL, NULL, 0, NULL }
   57130             : };
   57131             : 
   57132             : 
   57133             : static PyTypeObject srvsvc_NetGetFileSecurity_Type = {
   57134             :         PyVarObject_HEAD_INIT(NULL, 0)
   57135             :         .tp_name = "srvsvc.NetGetFileSecurity",
   57136             :         .tp_getset = py_srvsvc_NetGetFileSecurity_getsetters,
   57137             :         .tp_methods = py_srvsvc_NetGetFileSecurity_methods,
   57138             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   57139             :         .tp_new = py_srvsvc_NetGetFileSecurity_new,
   57140             : };
   57141             : 
   57142           0 : static bool pack_py_srvsvc_NetGetFileSecurity_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetGetFileSecurity *r)
   57143             : {
   57144           0 :         PyObject *py_server_unc;
   57145           0 :         PyObject *py_share;
   57146           0 :         PyObject *py_file;
   57147           0 :         PyObject *py_securityinformation;
   57148           0 :         const char *kwnames[] = {
   57149             :                 "server_unc", "share", "file", "securityinformation", NULL
   57150             :         };
   57151             : 
   57152           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetGetFileSecurity", discard_const_p(char *, kwnames), &py_server_unc, &py_share, &py_file, &py_securityinformation)) {
   57153           0 :                 return false;
   57154             :         }
   57155             : 
   57156           0 :         if (py_server_unc == NULL) {
   57157           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   57158           0 :                 return false;
   57159             :         }
   57160           0 :         if (py_server_unc == Py_None) {
   57161           0 :                 r->in.server_unc = NULL;
   57162             :         } else {
   57163           0 :                 r->in.server_unc = NULL;
   57164             :                 {
   57165           0 :                         const char *test_str;
   57166           0 :                         const char *talloc_str;
   57167           0 :                         PyObject *unicode = NULL;
   57168           0 :                         if (PyUnicode_Check(py_server_unc)) {
   57169           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   57170           0 :                                 if (unicode == NULL) {
   57171           0 :                                         return false;
   57172             :                                 }
   57173           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57174           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   57175           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   57176             :                         } else {
   57177           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   57178           0 :                                 return false;
   57179             :                         }
   57180           0 :                         talloc_str = talloc_strdup(r, test_str);
   57181           0 :                         if (unicode != NULL) {
   57182           0 :                                 Py_DECREF(unicode);
   57183             :                         }
   57184           0 :                         if (talloc_str == NULL) {
   57185           0 :                                 PyErr_NoMemory();
   57186           0 :                                 return false;
   57187             :                         }
   57188           0 :                         r->in.server_unc = talloc_str;
   57189             :                 }
   57190             :         }
   57191           0 :         if (py_share == NULL) {
   57192           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.share");
   57193           0 :                 return false;
   57194             :         }
   57195           0 :         if (py_share == Py_None) {
   57196           0 :                 r->in.share = NULL;
   57197             :         } else {
   57198           0 :                 r->in.share = NULL;
   57199             :                 {
   57200           0 :                         const char *test_str;
   57201           0 :                         const char *talloc_str;
   57202           0 :                         PyObject *unicode = NULL;
   57203           0 :                         if (PyUnicode_Check(py_share)) {
   57204           0 :                                 unicode = PyUnicode_AsEncodedString(py_share, "utf-8", "ignore");
   57205           0 :                                 if (unicode == NULL) {
   57206           0 :                                         return false;
   57207             :                                 }
   57208           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57209           0 :                         } else if (PyBytes_Check(py_share)) {
   57210           0 :                                 test_str = PyBytes_AS_STRING(py_share);
   57211             :                         } else {
   57212           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
   57213           0 :                                 return false;
   57214             :                         }
   57215           0 :                         talloc_str = talloc_strdup(r, test_str);
   57216           0 :                         if (unicode != NULL) {
   57217           0 :                                 Py_DECREF(unicode);
   57218             :                         }
   57219           0 :                         if (talloc_str == NULL) {
   57220           0 :                                 PyErr_NoMemory();
   57221           0 :                                 return false;
   57222             :                         }
   57223           0 :                         r->in.share = talloc_str;
   57224             :                 }
   57225             :         }
   57226           0 :         if (py_file == NULL) {
   57227           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.file");
   57228           0 :                 return false;
   57229             :         }
   57230             :         {
   57231           0 :                 const char *test_str;
   57232           0 :                 const char *talloc_str;
   57233           0 :                 PyObject *unicode = NULL;
   57234           0 :                 if (PyUnicode_Check(py_file)) {
   57235           0 :                         unicode = PyUnicode_AsEncodedString(py_file, "utf-8", "ignore");
   57236           0 :                         if (unicode == NULL) {
   57237           0 :                                 return false;
   57238             :                         }
   57239           0 :                         test_str = PyBytes_AS_STRING(unicode);
   57240           0 :                 } else if (PyBytes_Check(py_file)) {
   57241           0 :                         test_str = PyBytes_AS_STRING(py_file);
   57242             :                 } else {
   57243           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_file)->tp_name);
   57244           0 :                         return false;
   57245             :                 }
   57246           0 :                 talloc_str = talloc_strdup(r, test_str);
   57247           0 :                 if (unicode != NULL) {
   57248           0 :                         Py_DECREF(unicode);
   57249             :                 }
   57250           0 :                 if (talloc_str == NULL) {
   57251           0 :                         PyErr_NoMemory();
   57252           0 :                         return false;
   57253             :                 }
   57254           0 :                 r->in.file = talloc_str;
   57255             :         }
   57256           0 :         if (py_securityinformation == NULL) {
   57257           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.securityinformation");
   57258           0 :                 return false;
   57259             :         }
   57260             :         {
   57261           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.securityinformation));
   57262           0 :                 if (PyLong_Check(py_securityinformation)) {
   57263           0 :                         unsigned long long test_var;
   57264           0 :                         test_var = PyLong_AsUnsignedLongLong(py_securityinformation);
   57265           0 :                         if (PyErr_Occurred() != NULL) {
   57266           0 :                                 return false;
   57267             :                         }
   57268           0 :                         if (test_var > uint_max) {
   57269           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   57270             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57271           0 :                                 return false;
   57272             :                         }
   57273           0 :                         r->in.securityinformation = test_var;
   57274             :                 } else {
   57275           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   57276             :                           PyLong_Type.tp_name);
   57277           0 :                         return false;
   57278             :                 }
   57279             :         }
   57280           0 :         return true;
   57281             : }
   57282             : 
   57283           0 : static PyObject *unpack_py_srvsvc_NetGetFileSecurity_args_out(struct srvsvc_NetGetFileSecurity *r)
   57284             : {
   57285           0 :         PyObject *result;
   57286           0 :         PyObject *py_sd_buf;
   57287           0 :         if (*r->out.sd_buf == NULL) {
   57288           0 :                 py_sd_buf = Py_None;
   57289           0 :                 Py_INCREF(py_sd_buf);
   57290             :         } else {
   57291           0 :                 py_sd_buf = pytalloc_reference_ex(sec_desc_buf_Type, *r->out.sd_buf, *r->out.sd_buf);
   57292             :         }
   57293           0 :         result = py_sd_buf;
   57294           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   57295           0 :                 PyErr_SetWERROR(r->out.result);
   57296           0 :                 return NULL;
   57297             :         }
   57298             : 
   57299           0 :         return result;
   57300             : }
   57301             : 
   57302             : 
   57303           0 : static PyObject *py_srvsvc_NetSetFileSecurity_in_get_server_unc(PyObject *obj, void *closure)
   57304             : {
   57305           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(obj);
   57306           0 :         PyObject *py_server_unc;
   57307           0 :         if (object->in.server_unc == NULL) {
   57308           0 :                 Py_RETURN_NONE;
   57309             :         }
   57310           0 :         if (object->in.server_unc == NULL) {
   57311           0 :                 py_server_unc = Py_None;
   57312           0 :                 Py_INCREF(py_server_unc);
   57313             :         } else {
   57314           0 :                 if (object->in.server_unc == NULL) {
   57315           0 :                         py_server_unc = Py_None;
   57316           0 :                         Py_INCREF(py_server_unc);
   57317             :                 } else {
   57318           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   57319             :                 }
   57320             :         }
   57321           0 :         return py_server_unc;
   57322             : }
   57323             : 
   57324           0 : static int py_srvsvc_NetSetFileSecurity_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   57325             : {
   57326           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(py_obj);
   57327           0 :         if (value == NULL) {
   57328           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   57329           0 :                 return -1;
   57330             :         }
   57331           0 :         if (value == Py_None) {
   57332           0 :                 object->in.server_unc = NULL;
   57333             :         } else {
   57334           0 :                 object->in.server_unc = NULL;
   57335             :                 {
   57336           0 :                         const char *test_str;
   57337           0 :                         const char *talloc_str;
   57338           0 :                         PyObject *unicode = NULL;
   57339           0 :                         if (PyUnicode_Check(value)) {
   57340           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57341           0 :                                 if (unicode == NULL) {
   57342           0 :                                         return -1;
   57343             :                                 }
   57344           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57345           0 :                         } else if (PyBytes_Check(value)) {
   57346           0 :                                 test_str = PyBytes_AS_STRING(value);
   57347             :                         } else {
   57348           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57349           0 :                                 return -1;
   57350             :                         }
   57351           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57352           0 :                         if (unicode != NULL) {
   57353           0 :                                 Py_DECREF(unicode);
   57354             :                         }
   57355           0 :                         if (talloc_str == NULL) {
   57356           0 :                                 PyErr_NoMemory();
   57357           0 :                                 return -1;
   57358             :                         }
   57359           0 :                         object->in.server_unc = talloc_str;
   57360             :                 }
   57361             :         }
   57362           0 :         return 0;
   57363             : }
   57364             : 
   57365           0 : static PyObject *py_srvsvc_NetSetFileSecurity_in_get_share(PyObject *obj, void *closure)
   57366             : {
   57367           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(obj);
   57368           0 :         PyObject *py_share;
   57369           0 :         if (object->in.share == NULL) {
   57370           0 :                 Py_RETURN_NONE;
   57371             :         }
   57372           0 :         if (object->in.share == NULL) {
   57373           0 :                 py_share = Py_None;
   57374           0 :                 Py_INCREF(py_share);
   57375             :         } else {
   57376           0 :                 if (object->in.share == NULL) {
   57377           0 :                         py_share = Py_None;
   57378           0 :                         Py_INCREF(py_share);
   57379             :                 } else {
   57380           0 :                         py_share = PyUnicode_Decode(object->in.share, strlen(object->in.share), "utf-8", "ignore");
   57381             :                 }
   57382             :         }
   57383           0 :         return py_share;
   57384             : }
   57385             : 
   57386           0 : static int py_srvsvc_NetSetFileSecurity_in_set_share(PyObject *py_obj, PyObject *value, void *closure)
   57387             : {
   57388           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(py_obj);
   57389           0 :         if (value == NULL) {
   57390           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.share");
   57391           0 :                 return -1;
   57392             :         }
   57393           0 :         if (value == Py_None) {
   57394           0 :                 object->in.share = NULL;
   57395             :         } else {
   57396           0 :                 object->in.share = NULL;
   57397             :                 {
   57398           0 :                         const char *test_str;
   57399           0 :                         const char *talloc_str;
   57400           0 :                         PyObject *unicode = NULL;
   57401           0 :                         if (PyUnicode_Check(value)) {
   57402           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57403           0 :                                 if (unicode == NULL) {
   57404           0 :                                         return -1;
   57405             :                                 }
   57406           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57407           0 :                         } else if (PyBytes_Check(value)) {
   57408           0 :                                 test_str = PyBytes_AS_STRING(value);
   57409             :                         } else {
   57410           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57411           0 :                                 return -1;
   57412             :                         }
   57413           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57414           0 :                         if (unicode != NULL) {
   57415           0 :                                 Py_DECREF(unicode);
   57416             :                         }
   57417           0 :                         if (talloc_str == NULL) {
   57418           0 :                                 PyErr_NoMemory();
   57419           0 :                                 return -1;
   57420             :                         }
   57421           0 :                         object->in.share = talloc_str;
   57422             :                 }
   57423             :         }
   57424           0 :         return 0;
   57425             : }
   57426             : 
   57427           0 : static PyObject *py_srvsvc_NetSetFileSecurity_in_get_file(PyObject *obj, void *closure)
   57428             : {
   57429           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(obj);
   57430           0 :         PyObject *py_file;
   57431           0 :         if (object->in.file == NULL) {
   57432           0 :                 py_file = Py_None;
   57433           0 :                 Py_INCREF(py_file);
   57434             :         } else {
   57435           0 :                 py_file = PyUnicode_Decode(object->in.file, strlen(object->in.file), "utf-8", "ignore");
   57436             :         }
   57437           0 :         return py_file;
   57438             : }
   57439             : 
   57440           0 : static int py_srvsvc_NetSetFileSecurity_in_set_file(PyObject *py_obj, PyObject *value, void *closure)
   57441             : {
   57442           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(py_obj);
   57443           0 :         if (value == NULL) {
   57444           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.file");
   57445           0 :                 return -1;
   57446             :         }
   57447             :         {
   57448           0 :                 const char *test_str;
   57449           0 :                 const char *talloc_str;
   57450           0 :                 PyObject *unicode = NULL;
   57451           0 :                 if (PyUnicode_Check(value)) {
   57452           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57453           0 :                         if (unicode == NULL) {
   57454           0 :                                 return -1;
   57455             :                         }
   57456           0 :                         test_str = PyBytes_AS_STRING(unicode);
   57457           0 :                 } else if (PyBytes_Check(value)) {
   57458           0 :                         test_str = PyBytes_AS_STRING(value);
   57459             :                 } else {
   57460           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57461           0 :                         return -1;
   57462             :                 }
   57463           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57464           0 :                 if (unicode != NULL) {
   57465           0 :                         Py_DECREF(unicode);
   57466             :                 }
   57467           0 :                 if (talloc_str == NULL) {
   57468           0 :                         PyErr_NoMemory();
   57469           0 :                         return -1;
   57470             :                 }
   57471           0 :                 object->in.file = talloc_str;
   57472             :         }
   57473           0 :         return 0;
   57474             : }
   57475             : 
   57476           0 : static PyObject *py_srvsvc_NetSetFileSecurity_in_get_securityinformation(PyObject *obj, void *closure)
   57477             : {
   57478           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(obj);
   57479           0 :         PyObject *py_securityinformation;
   57480           0 :         py_securityinformation = PyLong_FromUnsignedLongLong((uint32_t)(object->in.securityinformation));
   57481           0 :         return py_securityinformation;
   57482             : }
   57483             : 
   57484           0 : static int py_srvsvc_NetSetFileSecurity_in_set_securityinformation(PyObject *py_obj, PyObject *value, void *closure)
   57485             : {
   57486           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(py_obj);
   57487           0 :         if (value == NULL) {
   57488           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.securityinformation");
   57489           0 :                 return -1;
   57490             :         }
   57491             :         {
   57492           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.securityinformation));
   57493           0 :                 if (PyLong_Check(value)) {
   57494           0 :                         unsigned long long test_var;
   57495           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   57496           0 :                         if (PyErr_Occurred() != NULL) {
   57497           0 :                                 return -1;
   57498             :                         }
   57499           0 :                         if (test_var > uint_max) {
   57500           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   57501             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57502           0 :                                 return -1;
   57503             :                         }
   57504           0 :                         object->in.securityinformation = test_var;
   57505             :                 } else {
   57506           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   57507             :                           PyLong_Type.tp_name);
   57508           0 :                         return -1;
   57509             :                 }
   57510             :         }
   57511           0 :         return 0;
   57512             : }
   57513             : 
   57514           0 : static PyObject *py_srvsvc_NetSetFileSecurity_in_get_sd_buf(PyObject *obj, void *closure)
   57515             : {
   57516           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(obj);
   57517           0 :         PyObject *py_sd_buf;
   57518           0 :         if (object->in.sd_buf == NULL) {
   57519           0 :                 Py_RETURN_NONE;
   57520             :         }
   57521           0 :         py_sd_buf = pytalloc_reference_ex(sec_desc_buf_Type, object->in.sd_buf, object->in.sd_buf);
   57522           0 :         return py_sd_buf;
   57523             : }
   57524             : 
   57525           0 : static int py_srvsvc_NetSetFileSecurity_in_set_sd_buf(PyObject *py_obj, PyObject *value, void *closure)
   57526             : {
   57527           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(py_obj);
   57528           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sd_buf));
   57529           0 :         if (value == NULL) {
   57530           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.sd_buf");
   57531           0 :                 return -1;
   57532             :         }
   57533           0 :         object->in.sd_buf = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sd_buf);
   57534           0 :         if (object->in.sd_buf == NULL) {
   57535           0 :                 PyErr_NoMemory();
   57536           0 :                 return -1;
   57537             :         }
   57538           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   57539           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   57540           0 :                 PyErr_NoMemory();
   57541           0 :                 return -1;
   57542             :         }
   57543           0 :         object->in.sd_buf = (struct sec_desc_buf *)pytalloc_get_ptr(value);
   57544           0 :         return 0;
   57545             : }
   57546             : 
   57547           0 : static PyObject *py_srvsvc_NetSetFileSecurity_get_result(PyObject *obj, void *closure)
   57548             : {
   57549           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(obj);
   57550           0 :         PyObject *py_result;
   57551           0 :         py_result = PyErr_FromWERROR(object->out.result);
   57552           0 :         return py_result;
   57553             : }
   57554             : 
   57555           0 : static int py_srvsvc_NetSetFileSecurity_set_result(PyObject *py_obj, PyObject *value, void *closure)
   57556             : {
   57557           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(py_obj);
   57558           0 :         if (value == NULL) {
   57559           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   57560           0 :                 return -1;
   57561             :         }
   57562           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   57563           0 :         return 0;
   57564             : }
   57565             : 
   57566             : static PyGetSetDef py_srvsvc_NetSetFileSecurity_getsetters[] = {
   57567             :         {
   57568             :                 .name = discard_const_p(char, "in_server_unc"),
   57569             :                 .get = py_srvsvc_NetSetFileSecurity_in_get_server_unc,
   57570             :                 .set = py_srvsvc_NetSetFileSecurity_in_set_server_unc,
   57571             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57572             :         },
   57573             :         {
   57574             :                 .name = discard_const_p(char, "in_share"),
   57575             :                 .get = py_srvsvc_NetSetFileSecurity_in_get_share,
   57576             :                 .set = py_srvsvc_NetSetFileSecurity_in_set_share,
   57577             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57578             :         },
   57579             :         {
   57580             :                 .name = discard_const_p(char, "in_file"),
   57581             :                 .get = py_srvsvc_NetSetFileSecurity_in_get_file,
   57582             :                 .set = py_srvsvc_NetSetFileSecurity_in_set_file,
   57583             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57584             :         },
   57585             :         {
   57586             :                 .name = discard_const_p(char, "in_securityinformation"),
   57587             :                 .get = py_srvsvc_NetSetFileSecurity_in_get_securityinformation,
   57588             :                 .set = py_srvsvc_NetSetFileSecurity_in_set_securityinformation,
   57589             :                 .doc = discard_const_p(char, "PIDL-generated element of base type security_secinfo")
   57590             :         },
   57591             :         {
   57592             :                 .name = discard_const_p(char, "in_sd_buf"),
   57593             :                 .get = py_srvsvc_NetSetFileSecurity_in_get_sd_buf,
   57594             :                 .set = py_srvsvc_NetSetFileSecurity_in_set_sd_buf,
   57595             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   57596             :         },
   57597             :         {
   57598             :                 .name = discard_const_p(char, "result"),
   57599             :                 .get = py_srvsvc_NetSetFileSecurity_get_result,
   57600             :                 .set = py_srvsvc_NetSetFileSecurity_set_result,
   57601             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   57602             :         },
   57603             :         { .name = NULL }
   57604             : };
   57605             : 
   57606           0 : static PyObject *py_srvsvc_NetSetFileSecurity_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   57607             : {
   57608           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetSetFileSecurity, type);
   57609           0 :         struct srvsvc_NetSetFileSecurity *_self = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(self);
   57610           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   57611           0 :         _self->in.sd_buf = talloc_zero(mem_ctx, struct sec_desc_buf);
   57612           0 :         return self;
   57613             : }
   57614             : 
   57615           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   57616             : {
   57617             : 
   57618             : 
   57619           0 :         return PyLong_FromLong(40);
   57620             : }
   57621             : 
   57622           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   57623             : {
   57624           0 :         const struct ndr_interface_call *call = NULL;
   57625           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(py_obj);
   57626           0 :         PyObject *ret = NULL;
   57627           0 :         struct ndr_push *push = NULL;
   57628           0 :         DATA_BLOB blob;
   57629           0 :         enum ndr_err_code err;
   57630             : 
   57631           0 :         if (ndr_table_srvsvc.num_calls < 41) {
   57632           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSetFileSecurity_ndr_pack");
   57633           0 :                 return NULL;
   57634             :         }
   57635           0 :         call = &ndr_table_srvsvc.calls[40];
   57636             : 
   57637           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   57638           0 :         if (push == NULL) {
   57639           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57640           0 :                 return NULL;
   57641             :         }
   57642             : 
   57643           0 :         push->flags |= ndr_push_flags;
   57644             : 
   57645           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   57646           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57647           0 :                 TALLOC_FREE(push);
   57648           0 :                 PyErr_SetNdrError(err);
   57649           0 :                 return NULL;
   57650             :         }
   57651           0 :         blob = ndr_push_blob(push);
   57652           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   57653           0 :         TALLOC_FREE(push);
   57654           0 :         return ret;
   57655             : }
   57656             : 
   57657           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57658             : {
   57659           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57660           0 :         PyObject *bigendian_obj = NULL;
   57661           0 :         PyObject *ndr64_obj = NULL;
   57662           0 :         libndr_flags ndr_push_flags = 0;
   57663             : 
   57664           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   57665             :                 discard_const_p(char *, kwnames),
   57666             :                 &bigendian_obj,
   57667             :                 &ndr64_obj)) {
   57668           0 :                 return NULL;
   57669             :         }
   57670             : 
   57671           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57672           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57673             :         }
   57674           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57675           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57676             :         }
   57677             : 
   57678           0 :         return py_srvsvc_NetSetFileSecurity_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   57679             : }
   57680             : 
   57681           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57682             : {
   57683           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57684           0 :         PyObject *bigendian_obj = NULL;
   57685           0 :         PyObject *ndr64_obj = NULL;
   57686           0 :         libndr_flags ndr_push_flags = 0;
   57687             : 
   57688           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   57689             :                 discard_const_p(char *, kwnames),
   57690             :                 &bigendian_obj,
   57691             :                 &ndr64_obj)) {
   57692           0 :                 return NULL;
   57693             :         }
   57694             : 
   57695           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57696           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57697             :         }
   57698           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57699           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57700             :         }
   57701             : 
   57702           0 :         return py_srvsvc_NetSetFileSecurity_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   57703             : }
   57704             : 
   57705           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   57706             : {
   57707           0 :         const struct ndr_interface_call *call = NULL;
   57708           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(py_obj);
   57709           0 :         struct ndr_pull *pull = NULL;
   57710           0 :         enum ndr_err_code err;
   57711             : 
   57712           0 :         if (ndr_table_srvsvc.num_calls < 41) {
   57713           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSetFileSecurity_ndr_unpack");
   57714           0 :                 return NULL;
   57715             :         }
   57716           0 :         call = &ndr_table_srvsvc.calls[40];
   57717             : 
   57718           0 :         pull = ndr_pull_init_blob(blob, object);
   57719           0 :         if (pull == NULL) {
   57720           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57721           0 :                 return NULL;
   57722             :         }
   57723             : 
   57724           0 :         pull->flags |= ndr_pull_flags;
   57725             : 
   57726           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   57727           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57728           0 :                 TALLOC_FREE(pull);
   57729           0 :                 PyErr_SetNdrError(err);
   57730           0 :                 return NULL;
   57731             :         }
   57732           0 :         if (!allow_remaining) {
   57733           0 :                 uint32_t highest_ofs;
   57734             : 
   57735           0 :                 if (pull->offset > pull->relative_highest_offset) {
   57736           0 :                         highest_ofs = pull->offset;
   57737             :                 } else {
   57738           0 :                         highest_ofs = pull->relative_highest_offset;
   57739             :                 }
   57740           0 :                 if (highest_ofs < pull->data_size) {
   57741           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   57742             :                                 "not all bytes consumed ofs[%u] size[%u]",
   57743             :                                 highest_ofs, pull->data_size);
   57744           0 :                         TALLOC_FREE(pull);
   57745           0 :                         PyErr_SetNdrError(err);
   57746           0 :                         return NULL;
   57747             :                 }
   57748             :         }
   57749             : 
   57750           0 :         TALLOC_FREE(pull);
   57751           0 :         Py_RETURN_NONE;
   57752             : }
   57753             : 
   57754           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57755             : {
   57756           0 :         DATA_BLOB blob;
   57757           0 :         Py_ssize_t blob_length = 0;
   57758           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57759           0 :         PyObject *bigendian_obj = NULL;
   57760           0 :         PyObject *ndr64_obj = NULL;
   57761           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57762           0 :         PyObject *allow_remaining_obj = NULL;
   57763           0 :         bool allow_remaining = false;
   57764             : 
   57765           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   57766             :                 discard_const_p(char *, kwnames),
   57767             :                 &blob.data, &blob_length,
   57768             :                 &bigendian_obj,
   57769             :                 &ndr64_obj,
   57770             :                 &allow_remaining_obj)) {
   57771           0 :                 return NULL;
   57772             :         }
   57773           0 :         blob.length = blob_length;
   57774             : 
   57775           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57776           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57777             :         }
   57778           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57779           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57780             :         }
   57781             : 
   57782           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57783           0 :                 allow_remaining = true;
   57784             :         }
   57785             : 
   57786           0 :         return py_srvsvc_NetSetFileSecurity_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   57787             : }
   57788             : 
   57789           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57790             : {
   57791           0 :         DATA_BLOB blob;
   57792           0 :         Py_ssize_t blob_length = 0;
   57793           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57794           0 :         PyObject *bigendian_obj = NULL;
   57795           0 :         PyObject *ndr64_obj = NULL;
   57796           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57797           0 :         PyObject *allow_remaining_obj = NULL;
   57798           0 :         bool allow_remaining = false;
   57799             : 
   57800           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   57801             :                 discard_const_p(char *, kwnames),
   57802             :                 &blob.data, &blob_length,
   57803             :                 &bigendian_obj,
   57804             :                 &ndr64_obj,
   57805             :                 &allow_remaining_obj)) {
   57806           0 :                 return NULL;
   57807             :         }
   57808           0 :         blob.length = blob_length;
   57809             : 
   57810           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57811           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57812             :         }
   57813           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57814           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57815             :         }
   57816             : 
   57817           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57818           0 :                 allow_remaining = true;
   57819             :         }
   57820             : 
   57821           0 :         return py_srvsvc_NetSetFileSecurity_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   57822             : }
   57823             : 
   57824           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   57825             : {
   57826           0 :         const struct ndr_interface_call *call = NULL;
   57827           0 :         struct srvsvc_NetSetFileSecurity *object = pytalloc_get_ptr(py_obj);
   57828           0 :         PyObject *ret;
   57829           0 :         char *retstr;
   57830             : 
   57831           0 :         if (ndr_table_srvsvc.num_calls < 41) {
   57832           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSetFileSecurity_ndr_print");
   57833           0 :                 return NULL;
   57834             :         }
   57835           0 :         call = &ndr_table_srvsvc.calls[40];
   57836             : 
   57837           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   57838           0 :         ret = PyUnicode_FromString(retstr);
   57839           0 :         TALLOC_FREE(retstr);
   57840             : 
   57841           0 :         return ret;
   57842             : }
   57843             : 
   57844           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   57845             : {
   57846           0 :         return py_srvsvc_NetSetFileSecurity_ndr_print(py_obj, "srvsvc_NetSetFileSecurity_in", NDR_IN);
   57847             : }
   57848             : 
   57849           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   57850             : {
   57851           0 :         return py_srvsvc_NetSetFileSecurity_ndr_print(py_obj, "srvsvc_NetSetFileSecurity_out", NDR_OUT);
   57852             : }
   57853             : 
   57854             : static PyMethodDef py_srvsvc_NetSetFileSecurity_methods[] = {
   57855             :         { "opnum", (PyCFunction)py_srvsvc_NetSetFileSecurity_ndr_opnum, METH_NOARGS|METH_CLASS,
   57856             :                 "srvsvc.NetSetFileSecurity.opnum() -> 40 (0x28) " },
   57857             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetFileSecurity_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   57858             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   57859             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetFileSecurity_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   57860             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   57861             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetFileSecurity_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   57862             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   57863             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetFileSecurity_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   57864             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   57865             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetSetFileSecurity_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   57866             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetSetFileSecurity_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   57867             :         { NULL, NULL, 0, NULL }
   57868             : };
   57869             : 
   57870             : 
   57871             : static PyTypeObject srvsvc_NetSetFileSecurity_Type = {
   57872             :         PyVarObject_HEAD_INIT(NULL, 0)
   57873             :         .tp_name = "srvsvc.NetSetFileSecurity",
   57874             :         .tp_getset = py_srvsvc_NetSetFileSecurity_getsetters,
   57875             :         .tp_methods = py_srvsvc_NetSetFileSecurity_methods,
   57876             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   57877             :         .tp_new = py_srvsvc_NetSetFileSecurity_new,
   57878             : };
   57879             : 
   57880           0 : static bool pack_py_srvsvc_NetSetFileSecurity_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSetFileSecurity *r)
   57881             : {
   57882           0 :         PyObject *py_server_unc;
   57883           0 :         PyObject *py_share;
   57884           0 :         PyObject *py_file;
   57885           0 :         PyObject *py_securityinformation;
   57886           0 :         PyObject *py_sd_buf;
   57887           0 :         const char *kwnames[] = {
   57888             :                 "server_unc", "share", "file", "securityinformation", "sd_buf", NULL
   57889             :         };
   57890             : 
   57891           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)) {
   57892           0 :                 return false;
   57893             :         }
   57894             : 
   57895           0 :         if (py_server_unc == NULL) {
   57896           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   57897           0 :                 return false;
   57898             :         }
   57899           0 :         if (py_server_unc == Py_None) {
   57900           0 :                 r->in.server_unc = NULL;
   57901             :         } else {
   57902           0 :                 r->in.server_unc = NULL;
   57903             :                 {
   57904           0 :                         const char *test_str;
   57905           0 :                         const char *talloc_str;
   57906           0 :                         PyObject *unicode = NULL;
   57907           0 :                         if (PyUnicode_Check(py_server_unc)) {
   57908           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   57909           0 :                                 if (unicode == NULL) {
   57910           0 :                                         return false;
   57911             :                                 }
   57912           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57913           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   57914           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   57915             :                         } else {
   57916           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   57917           0 :                                 return false;
   57918             :                         }
   57919           0 :                         talloc_str = talloc_strdup(r, test_str);
   57920           0 :                         if (unicode != NULL) {
   57921           0 :                                 Py_DECREF(unicode);
   57922             :                         }
   57923           0 :                         if (talloc_str == NULL) {
   57924           0 :                                 PyErr_NoMemory();
   57925           0 :                                 return false;
   57926             :                         }
   57927           0 :                         r->in.server_unc = talloc_str;
   57928             :                 }
   57929             :         }
   57930           0 :         if (py_share == NULL) {
   57931           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.share");
   57932           0 :                 return false;
   57933             :         }
   57934           0 :         if (py_share == Py_None) {
   57935           0 :                 r->in.share = NULL;
   57936             :         } else {
   57937           0 :                 r->in.share = NULL;
   57938             :                 {
   57939           0 :                         const char *test_str;
   57940           0 :                         const char *talloc_str;
   57941           0 :                         PyObject *unicode = NULL;
   57942           0 :                         if (PyUnicode_Check(py_share)) {
   57943           0 :                                 unicode = PyUnicode_AsEncodedString(py_share, "utf-8", "ignore");
   57944           0 :                                 if (unicode == NULL) {
   57945           0 :                                         return false;
   57946             :                                 }
   57947           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57948           0 :                         } else if (PyBytes_Check(py_share)) {
   57949           0 :                                 test_str = PyBytes_AS_STRING(py_share);
   57950             :                         } else {
   57951           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
   57952           0 :                                 return false;
   57953             :                         }
   57954           0 :                         talloc_str = talloc_strdup(r, test_str);
   57955           0 :                         if (unicode != NULL) {
   57956           0 :                                 Py_DECREF(unicode);
   57957             :                         }
   57958           0 :                         if (talloc_str == NULL) {
   57959           0 :                                 PyErr_NoMemory();
   57960           0 :                                 return false;
   57961             :                         }
   57962           0 :                         r->in.share = talloc_str;
   57963             :                 }
   57964             :         }
   57965           0 :         if (py_file == NULL) {
   57966           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.file");
   57967           0 :                 return false;
   57968             :         }
   57969             :         {
   57970           0 :                 const char *test_str;
   57971           0 :                 const char *talloc_str;
   57972           0 :                 PyObject *unicode = NULL;
   57973           0 :                 if (PyUnicode_Check(py_file)) {
   57974           0 :                         unicode = PyUnicode_AsEncodedString(py_file, "utf-8", "ignore");
   57975           0 :                         if (unicode == NULL) {
   57976           0 :                                 return false;
   57977             :                         }
   57978           0 :                         test_str = PyBytes_AS_STRING(unicode);
   57979           0 :                 } else if (PyBytes_Check(py_file)) {
   57980           0 :                         test_str = PyBytes_AS_STRING(py_file);
   57981             :                 } else {
   57982           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_file)->tp_name);
   57983           0 :                         return false;
   57984             :                 }
   57985           0 :                 talloc_str = talloc_strdup(r, test_str);
   57986           0 :                 if (unicode != NULL) {
   57987           0 :                         Py_DECREF(unicode);
   57988             :                 }
   57989           0 :                 if (talloc_str == NULL) {
   57990           0 :                         PyErr_NoMemory();
   57991           0 :                         return false;
   57992             :                 }
   57993           0 :                 r->in.file = talloc_str;
   57994             :         }
   57995           0 :         if (py_securityinformation == NULL) {
   57996           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.securityinformation");
   57997           0 :                 return false;
   57998             :         }
   57999             :         {
   58000           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.securityinformation));
   58001           0 :                 if (PyLong_Check(py_securityinformation)) {
   58002           0 :                         unsigned long long test_var;
   58003           0 :                         test_var = PyLong_AsUnsignedLongLong(py_securityinformation);
   58004           0 :                         if (PyErr_Occurred() != NULL) {
   58005           0 :                                 return false;
   58006             :                         }
   58007           0 :                         if (test_var > uint_max) {
   58008           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58009             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58010           0 :                                 return false;
   58011             :                         }
   58012           0 :                         r->in.securityinformation = test_var;
   58013             :                 } else {
   58014           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58015             :                           PyLong_Type.tp_name);
   58016           0 :                         return false;
   58017             :                 }
   58018             :         }
   58019           0 :         if (py_sd_buf == NULL) {
   58020           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.sd_buf");
   58021           0 :                 return false;
   58022             :         }
   58023           0 :         r->in.sd_buf = talloc_ptrtype(r, r->in.sd_buf);
   58024           0 :         if (r->in.sd_buf == NULL) {
   58025           0 :                 PyErr_NoMemory();
   58026           0 :                 return false;
   58027             :         }
   58028           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, py_sd_buf, return false;);
   58029           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sd_buf)) == NULL) {
   58030           0 :                 PyErr_NoMemory();
   58031           0 :                 return false;
   58032             :         }
   58033           0 :         r->in.sd_buf = (struct sec_desc_buf *)pytalloc_get_ptr(py_sd_buf);
   58034           0 :         return true;
   58035             : }
   58036             : 
   58037           0 : static PyObject *unpack_py_srvsvc_NetSetFileSecurity_args_out(struct srvsvc_NetSetFileSecurity *r)
   58038             : {
   58039           0 :         PyObject *result;
   58040           0 :         result = Py_None;
   58041           0 :         Py_INCREF(result);
   58042           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   58043           0 :                 PyErr_SetWERROR(r->out.result);
   58044           0 :                 return NULL;
   58045             :         }
   58046             : 
   58047           0 :         return result;
   58048             : }
   58049             : 
   58050             : 
   58051           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_in_get_server_unc(PyObject *obj, void *closure)
   58052             : {
   58053           0 :         struct srvsvc_NetServerTransportAddEx *object = pytalloc_get_ptr(obj);
   58054           0 :         PyObject *py_server_unc;
   58055           0 :         if (object->in.server_unc == NULL) {
   58056           0 :                 Py_RETURN_NONE;
   58057             :         }
   58058           0 :         if (object->in.server_unc == NULL) {
   58059           0 :                 py_server_unc = Py_None;
   58060           0 :                 Py_INCREF(py_server_unc);
   58061             :         } else {
   58062           0 :                 if (object->in.server_unc == NULL) {
   58063           0 :                         py_server_unc = Py_None;
   58064           0 :                         Py_INCREF(py_server_unc);
   58065             :                 } else {
   58066           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   58067             :                 }
   58068             :         }
   58069           0 :         return py_server_unc;
   58070             : }
   58071             : 
   58072           0 : static int py_srvsvc_NetServerTransportAddEx_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   58073             : {
   58074           0 :         struct srvsvc_NetServerTransportAddEx *object = pytalloc_get_ptr(py_obj);
   58075           0 :         if (value == NULL) {
   58076           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   58077           0 :                 return -1;
   58078             :         }
   58079           0 :         if (value == Py_None) {
   58080           0 :                 object->in.server_unc = NULL;
   58081             :         } else {
   58082           0 :                 object->in.server_unc = NULL;
   58083             :                 {
   58084           0 :                         const char *test_str;
   58085           0 :                         const char *talloc_str;
   58086           0 :                         PyObject *unicode = NULL;
   58087           0 :                         if (PyUnicode_Check(value)) {
   58088           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58089           0 :                                 if (unicode == NULL) {
   58090           0 :                                         return -1;
   58091             :                                 }
   58092           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58093           0 :                         } else if (PyBytes_Check(value)) {
   58094           0 :                                 test_str = PyBytes_AS_STRING(value);
   58095             :                         } else {
   58096           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58097           0 :                                 return -1;
   58098             :                         }
   58099           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58100           0 :                         if (unicode != NULL) {
   58101           0 :                                 Py_DECREF(unicode);
   58102             :                         }
   58103           0 :                         if (talloc_str == NULL) {
   58104           0 :                                 PyErr_NoMemory();
   58105           0 :                                 return -1;
   58106             :                         }
   58107           0 :                         object->in.server_unc = talloc_str;
   58108             :                 }
   58109             :         }
   58110           0 :         return 0;
   58111             : }
   58112             : 
   58113           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_in_get_level(PyObject *obj, void *closure)
   58114             : {
   58115           0 :         struct srvsvc_NetServerTransportAddEx *object = pytalloc_get_ptr(obj);
   58116           0 :         PyObject *py_level;
   58117           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   58118           0 :         return py_level;
   58119             : }
   58120             : 
   58121           0 : static int py_srvsvc_NetServerTransportAddEx_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   58122             : {
   58123           0 :         struct srvsvc_NetServerTransportAddEx *object = pytalloc_get_ptr(py_obj);
   58124           0 :         if (value == NULL) {
   58125           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
   58126           0 :                 return -1;
   58127             :         }
   58128             :         {
   58129           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   58130           0 :                 if (PyLong_Check(value)) {
   58131           0 :                         unsigned long long test_var;
   58132           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58133           0 :                         if (PyErr_Occurred() != NULL) {
   58134           0 :                                 return -1;
   58135             :                         }
   58136           0 :                         if (test_var > uint_max) {
   58137           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58138             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58139           0 :                                 return -1;
   58140             :                         }
   58141           0 :                         object->in.level = test_var;
   58142             :                 } else {
   58143           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58144             :                           PyLong_Type.tp_name);
   58145           0 :                         return -1;
   58146             :                 }
   58147             :         }
   58148           0 :         return 0;
   58149             : }
   58150             : 
   58151           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_in_get_info(PyObject *obj, void *closure)
   58152             : {
   58153           0 :         struct srvsvc_NetServerTransportAddEx *object = pytalloc_get_ptr(obj);
   58154           0 :         PyObject *py_info;
   58155           0 :         py_info = pyrpc_import_union(&srvsvc_NetTransportInfo_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.info, "union srvsvc_NetTransportInfo");
   58156           0 :         if (py_info == NULL) {
   58157           0 :                 return NULL;
   58158             :         }
   58159           0 :         return py_info;
   58160             : }
   58161             : 
   58162           0 : static int py_srvsvc_NetServerTransportAddEx_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   58163             : {
   58164           0 :         struct srvsvc_NetServerTransportAddEx *object = pytalloc_get_ptr(py_obj);
   58165           0 :         if (value == NULL) {
   58166           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.info");
   58167           0 :                 return -1;
   58168             :         }
   58169             :         {
   58170           0 :                 union srvsvc_NetTransportInfo *info_switch_0;
   58171           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");
   58172           0 :                 if (info_switch_0 == NULL) {
   58173           0 :                         return -1;
   58174             :                 }
   58175           0 :                 object->in.info = *info_switch_0;
   58176             :         }
   58177           0 :         return 0;
   58178             : }
   58179             : 
   58180           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_get_result(PyObject *obj, void *closure)
   58181             : {
   58182           0 :         struct srvsvc_NetServerTransportAddEx *object = pytalloc_get_ptr(obj);
   58183           0 :         PyObject *py_result;
   58184           0 :         py_result = PyErr_FromWERROR(object->out.result);
   58185           0 :         return py_result;
   58186             : }
   58187             : 
   58188           0 : static int py_srvsvc_NetServerTransportAddEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   58189             : {
   58190           0 :         struct srvsvc_NetServerTransportAddEx *object = pytalloc_get_ptr(py_obj);
   58191           0 :         if (value == NULL) {
   58192           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   58193           0 :                 return -1;
   58194             :         }
   58195           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   58196           0 :         return 0;
   58197             : }
   58198             : 
   58199             : static PyGetSetDef py_srvsvc_NetServerTransportAddEx_getsetters[] = {
   58200             :         {
   58201             :                 .name = discard_const_p(char, "in_server_unc"),
   58202             :                 .get = py_srvsvc_NetServerTransportAddEx_in_get_server_unc,
   58203             :                 .set = py_srvsvc_NetServerTransportAddEx_in_set_server_unc,
   58204             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   58205             :         },
   58206             :         {
   58207             :                 .name = discard_const_p(char, "in_level"),
   58208             :                 .get = py_srvsvc_NetServerTransportAddEx_in_get_level,
   58209             :                 .set = py_srvsvc_NetServerTransportAddEx_in_set_level,
   58210             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   58211             :         },
   58212             :         {
   58213             :                 .name = discard_const_p(char, "in_info"),
   58214             :                 .get = py_srvsvc_NetServerTransportAddEx_in_get_info,
   58215             :                 .set = py_srvsvc_NetServerTransportAddEx_in_set_info,
   58216             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo")
   58217             :         },
   58218             :         {
   58219             :                 .name = discard_const_p(char, "result"),
   58220             :                 .get = py_srvsvc_NetServerTransportAddEx_get_result,
   58221             :                 .set = py_srvsvc_NetServerTransportAddEx_set_result,
   58222             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   58223             :         },
   58224             :         { .name = NULL }
   58225             : };
   58226             : 
   58227           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   58228             : {
   58229           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetServerTransportAddEx, type);
   58230           0 :         return self;
   58231             : }
   58232             : 
   58233           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   58234             : {
   58235             : 
   58236             : 
   58237           0 :         return PyLong_FromLong(41);
   58238             : }
   58239             : 
   58240           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   58241             : {
   58242           0 :         const struct ndr_interface_call *call = NULL;
   58243           0 :         struct srvsvc_NetServerTransportAddEx *object = pytalloc_get_ptr(py_obj);
   58244           0 :         PyObject *ret = NULL;
   58245           0 :         struct ndr_push *push = NULL;
   58246           0 :         DATA_BLOB blob;
   58247           0 :         enum ndr_err_code err;
   58248             : 
   58249           0 :         if (ndr_table_srvsvc.num_calls < 42) {
   58250           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerTransportAddEx_ndr_pack");
   58251           0 :                 return NULL;
   58252             :         }
   58253           0 :         call = &ndr_table_srvsvc.calls[41];
   58254             : 
   58255           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   58256           0 :         if (push == NULL) {
   58257           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   58258           0 :                 return NULL;
   58259             :         }
   58260             : 
   58261           0 :         push->flags |= ndr_push_flags;
   58262             : 
   58263           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   58264           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   58265           0 :                 TALLOC_FREE(push);
   58266           0 :                 PyErr_SetNdrError(err);
   58267           0 :                 return NULL;
   58268             :         }
   58269           0 :         blob = ndr_push_blob(push);
   58270           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   58271           0 :         TALLOC_FREE(push);
   58272           0 :         return ret;
   58273             : }
   58274             : 
   58275           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58276             : {
   58277           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   58278           0 :         PyObject *bigendian_obj = NULL;
   58279           0 :         PyObject *ndr64_obj = NULL;
   58280           0 :         libndr_flags ndr_push_flags = 0;
   58281             : 
   58282           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   58283             :                 discard_const_p(char *, kwnames),
   58284             :                 &bigendian_obj,
   58285             :                 &ndr64_obj)) {
   58286           0 :                 return NULL;
   58287             :         }
   58288             : 
   58289           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58290           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   58291             :         }
   58292           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58293           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   58294             :         }
   58295             : 
   58296           0 :         return py_srvsvc_NetServerTransportAddEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   58297             : }
   58298             : 
   58299           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58300             : {
   58301           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   58302           0 :         PyObject *bigendian_obj = NULL;
   58303           0 :         PyObject *ndr64_obj = NULL;
   58304           0 :         libndr_flags ndr_push_flags = 0;
   58305             : 
   58306           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   58307             :                 discard_const_p(char *, kwnames),
   58308             :                 &bigendian_obj,
   58309             :                 &ndr64_obj)) {
   58310           0 :                 return NULL;
   58311             :         }
   58312             : 
   58313           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58314           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   58315             :         }
   58316           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58317           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   58318             :         }
   58319             : 
   58320           0 :         return py_srvsvc_NetServerTransportAddEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   58321             : }
   58322             : 
   58323           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   58324             : {
   58325           0 :         const struct ndr_interface_call *call = NULL;
   58326           0 :         struct srvsvc_NetServerTransportAddEx *object = pytalloc_get_ptr(py_obj);
   58327           0 :         struct ndr_pull *pull = NULL;
   58328           0 :         enum ndr_err_code err;
   58329             : 
   58330           0 :         if (ndr_table_srvsvc.num_calls < 42) {
   58331           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerTransportAddEx_ndr_unpack");
   58332           0 :                 return NULL;
   58333             :         }
   58334           0 :         call = &ndr_table_srvsvc.calls[41];
   58335             : 
   58336           0 :         pull = ndr_pull_init_blob(blob, object);
   58337           0 :         if (pull == NULL) {
   58338           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   58339           0 :                 return NULL;
   58340             :         }
   58341             : 
   58342           0 :         pull->flags |= ndr_pull_flags;
   58343             : 
   58344           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   58345           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   58346           0 :                 TALLOC_FREE(pull);
   58347           0 :                 PyErr_SetNdrError(err);
   58348           0 :                 return NULL;
   58349             :         }
   58350           0 :         if (!allow_remaining) {
   58351           0 :                 uint32_t highest_ofs;
   58352             : 
   58353           0 :                 if (pull->offset > pull->relative_highest_offset) {
   58354           0 :                         highest_ofs = pull->offset;
   58355             :                 } else {
   58356           0 :                         highest_ofs = pull->relative_highest_offset;
   58357             :                 }
   58358           0 :                 if (highest_ofs < pull->data_size) {
   58359           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   58360             :                                 "not all bytes consumed ofs[%u] size[%u]",
   58361             :                                 highest_ofs, pull->data_size);
   58362           0 :                         TALLOC_FREE(pull);
   58363           0 :                         PyErr_SetNdrError(err);
   58364           0 :                         return NULL;
   58365             :                 }
   58366             :         }
   58367             : 
   58368           0 :         TALLOC_FREE(pull);
   58369           0 :         Py_RETURN_NONE;
   58370             : }
   58371             : 
   58372           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58373             : {
   58374           0 :         DATA_BLOB blob;
   58375           0 :         Py_ssize_t blob_length = 0;
   58376           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   58377           0 :         PyObject *bigendian_obj = NULL;
   58378           0 :         PyObject *ndr64_obj = NULL;
   58379           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   58380           0 :         PyObject *allow_remaining_obj = NULL;
   58381           0 :         bool allow_remaining = false;
   58382             : 
   58383           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   58384             :                 discard_const_p(char *, kwnames),
   58385             :                 &blob.data, &blob_length,
   58386             :                 &bigendian_obj,
   58387             :                 &ndr64_obj,
   58388             :                 &allow_remaining_obj)) {
   58389           0 :                 return NULL;
   58390             :         }
   58391           0 :         blob.length = blob_length;
   58392             : 
   58393           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58394           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   58395             :         }
   58396           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58397           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   58398             :         }
   58399             : 
   58400           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   58401           0 :                 allow_remaining = true;
   58402             :         }
   58403             : 
   58404           0 :         return py_srvsvc_NetServerTransportAddEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   58405             : }
   58406             : 
   58407           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58408             : {
   58409           0 :         DATA_BLOB blob;
   58410           0 :         Py_ssize_t blob_length = 0;
   58411           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   58412           0 :         PyObject *bigendian_obj = NULL;
   58413           0 :         PyObject *ndr64_obj = NULL;
   58414           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   58415           0 :         PyObject *allow_remaining_obj = NULL;
   58416           0 :         bool allow_remaining = false;
   58417             : 
   58418           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   58419             :                 discard_const_p(char *, kwnames),
   58420             :                 &blob.data, &blob_length,
   58421             :                 &bigendian_obj,
   58422             :                 &ndr64_obj,
   58423             :                 &allow_remaining_obj)) {
   58424           0 :                 return NULL;
   58425             :         }
   58426           0 :         blob.length = blob_length;
   58427             : 
   58428           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58429           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   58430             :         }
   58431           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58432           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   58433             :         }
   58434             : 
   58435           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   58436           0 :                 allow_remaining = true;
   58437             :         }
   58438             : 
   58439           0 :         return py_srvsvc_NetServerTransportAddEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   58440             : }
   58441             : 
   58442           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   58443             : {
   58444           0 :         const struct ndr_interface_call *call = NULL;
   58445           0 :         struct srvsvc_NetServerTransportAddEx *object = pytalloc_get_ptr(py_obj);
   58446           0 :         PyObject *ret;
   58447           0 :         char *retstr;
   58448             : 
   58449           0 :         if (ndr_table_srvsvc.num_calls < 42) {
   58450           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerTransportAddEx_ndr_print");
   58451           0 :                 return NULL;
   58452             :         }
   58453           0 :         call = &ndr_table_srvsvc.calls[41];
   58454             : 
   58455           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   58456           0 :         ret = PyUnicode_FromString(retstr);
   58457           0 :         TALLOC_FREE(retstr);
   58458             : 
   58459           0 :         return ret;
   58460             : }
   58461             : 
   58462           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   58463             : {
   58464           0 :         return py_srvsvc_NetServerTransportAddEx_ndr_print(py_obj, "srvsvc_NetServerTransportAddEx_in", NDR_IN);
   58465             : }
   58466             : 
   58467           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   58468             : {
   58469           0 :         return py_srvsvc_NetServerTransportAddEx_ndr_print(py_obj, "srvsvc_NetServerTransportAddEx_out", NDR_OUT);
   58470             : }
   58471             : 
   58472             : static PyMethodDef py_srvsvc_NetServerTransportAddEx_methods[] = {
   58473             :         { "opnum", (PyCFunction)py_srvsvc_NetServerTransportAddEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   58474             :                 "srvsvc.NetServerTransportAddEx.opnum() -> 41 (0x29) " },
   58475             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerTransportAddEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   58476             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   58477             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerTransportAddEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   58478             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   58479             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerTransportAddEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   58480             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   58481             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerTransportAddEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   58482             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   58483             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetServerTransportAddEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   58484             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetServerTransportAddEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   58485             :         { NULL, NULL, 0, NULL }
   58486             : };
   58487             : 
   58488             : 
   58489             : static PyTypeObject srvsvc_NetServerTransportAddEx_Type = {
   58490             :         PyVarObject_HEAD_INIT(NULL, 0)
   58491             :         .tp_name = "srvsvc.NetServerTransportAddEx",
   58492             :         .tp_getset = py_srvsvc_NetServerTransportAddEx_getsetters,
   58493             :         .tp_methods = py_srvsvc_NetServerTransportAddEx_methods,
   58494             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   58495             :         .tp_new = py_srvsvc_NetServerTransportAddEx_new,
   58496             : };
   58497             : 
   58498           0 : static bool pack_py_srvsvc_NetServerTransportAddEx_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetServerTransportAddEx *r)
   58499             : {
   58500           0 :         PyObject *py_server_unc;
   58501           0 :         PyObject *py_level;
   58502           0 :         PyObject *py_info;
   58503           0 :         const char *kwnames[] = {
   58504             :                 "server_unc", "level", "info", NULL
   58505             :         };
   58506             : 
   58507           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetServerTransportAddEx", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info)) {
   58508           0 :                 return false;
   58509             :         }
   58510             : 
   58511           0 :         if (py_server_unc == NULL) {
   58512           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   58513           0 :                 return false;
   58514             :         }
   58515           0 :         if (py_server_unc == Py_None) {
   58516           0 :                 r->in.server_unc = NULL;
   58517             :         } else {
   58518           0 :                 r->in.server_unc = NULL;
   58519             :                 {
   58520           0 :                         const char *test_str;
   58521           0 :                         const char *talloc_str;
   58522           0 :                         PyObject *unicode = NULL;
   58523           0 :                         if (PyUnicode_Check(py_server_unc)) {
   58524           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   58525           0 :                                 if (unicode == NULL) {
   58526           0 :                                         return false;
   58527             :                                 }
   58528           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58529           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   58530           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   58531             :                         } else {
   58532           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   58533           0 :                                 return false;
   58534             :                         }
   58535           0 :                         talloc_str = talloc_strdup(r, test_str);
   58536           0 :                         if (unicode != NULL) {
   58537           0 :                                 Py_DECREF(unicode);
   58538             :                         }
   58539           0 :                         if (talloc_str == NULL) {
   58540           0 :                                 PyErr_NoMemory();
   58541           0 :                                 return false;
   58542             :                         }
   58543           0 :                         r->in.server_unc = talloc_str;
   58544             :                 }
   58545             :         }
   58546           0 :         if (py_level == NULL) {
   58547           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
   58548           0 :                 return false;
   58549             :         }
   58550             :         {
   58551           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   58552           0 :                 if (PyLong_Check(py_level)) {
   58553           0 :                         unsigned long long test_var;
   58554           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   58555           0 :                         if (PyErr_Occurred() != NULL) {
   58556           0 :                                 return false;
   58557             :                         }
   58558           0 :                         if (test_var > uint_max) {
   58559           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58560             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58561           0 :                                 return false;
   58562             :                         }
   58563           0 :                         r->in.level = test_var;
   58564             :                 } else {
   58565           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58566             :                           PyLong_Type.tp_name);
   58567           0 :                         return false;
   58568             :                 }
   58569             :         }
   58570           0 :         if (py_info == NULL) {
   58571           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.info");
   58572           0 :                 return false;
   58573             :         }
   58574             :         {
   58575           0 :                 union srvsvc_NetTransportInfo *info_switch_0;
   58576           0 :                 info_switch_0 = (union srvsvc_NetTransportInfo *)pyrpc_export_union(&srvsvc_NetTransportInfo_Type, r, r->in.level, py_info, "union srvsvc_NetTransportInfo");
   58577           0 :                 if (info_switch_0 == NULL) {
   58578           0 :                         return false;
   58579             :                 }
   58580           0 :                 r->in.info = *info_switch_0;
   58581             :         }
   58582           0 :         return true;
   58583             : }
   58584             : 
   58585           0 : static PyObject *unpack_py_srvsvc_NetServerTransportAddEx_args_out(struct srvsvc_NetServerTransportAddEx *r)
   58586             : {
   58587           0 :         PyObject *result;
   58588           0 :         result = Py_None;
   58589           0 :         Py_INCREF(result);
   58590           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   58591           0 :                 PyErr_SetWERROR(r->out.result);
   58592           0 :                 return NULL;
   58593             :         }
   58594             : 
   58595           0 :         return result;
   58596             : }
   58597             : 
   58598             : 
   58599           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_in_get_server_unc(PyObject *obj, void *closure)
   58600             : {
   58601           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(obj);
   58602           0 :         PyObject *py_server_unc;
   58603           0 :         if (object->in.server_unc == NULL) {
   58604           0 :                 Py_RETURN_NONE;
   58605             :         }
   58606           0 :         if (object->in.server_unc == NULL) {
   58607           0 :                 py_server_unc = Py_None;
   58608           0 :                 Py_INCREF(py_server_unc);
   58609             :         } else {
   58610           0 :                 if (object->in.server_unc == NULL) {
   58611           0 :                         py_server_unc = Py_None;
   58612           0 :                         Py_INCREF(py_server_unc);
   58613             :                 } else {
   58614           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   58615             :                 }
   58616             :         }
   58617           0 :         return py_server_unc;
   58618             : }
   58619             : 
   58620           0 : static int py_srvsvc_NetServerSetServiceBitsEx_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   58621             : {
   58622           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(py_obj);
   58623           0 :         if (value == NULL) {
   58624           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
   58625           0 :                 return -1;
   58626             :         }
   58627           0 :         if (value == Py_None) {
   58628           0 :                 object->in.server_unc = NULL;
   58629             :         } else {
   58630           0 :                 object->in.server_unc = NULL;
   58631             :                 {
   58632           0 :                         const char *test_str;
   58633           0 :                         const char *talloc_str;
   58634           0 :                         PyObject *unicode = NULL;
   58635           0 :                         if (PyUnicode_Check(value)) {
   58636           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58637           0 :                                 if (unicode == NULL) {
   58638           0 :                                         return -1;
   58639             :                                 }
   58640           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58641           0 :                         } else if (PyBytes_Check(value)) {
   58642           0 :                                 test_str = PyBytes_AS_STRING(value);
   58643             :                         } else {
   58644           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58645           0 :                                 return -1;
   58646             :                         }
   58647           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58648           0 :                         if (unicode != NULL) {
   58649           0 :                                 Py_DECREF(unicode);
   58650             :                         }
   58651           0 :                         if (talloc_str == NULL) {
   58652           0 :                                 PyErr_NoMemory();
   58653           0 :                                 return -1;
   58654             :                         }
   58655           0 :                         object->in.server_unc = talloc_str;
   58656             :                 }
   58657             :         }
   58658           0 :         return 0;
   58659             : }
   58660             : 
   58661           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_in_get_emulated_server_unc(PyObject *obj, void *closure)
   58662             : {
   58663           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(obj);
   58664           0 :         PyObject *py_emulated_server_unc;
   58665           0 :         if (object->in.emulated_server_unc == NULL) {
   58666           0 :                 Py_RETURN_NONE;
   58667             :         }
   58668           0 :         if (object->in.emulated_server_unc == NULL) {
   58669           0 :                 py_emulated_server_unc = Py_None;
   58670           0 :                 Py_INCREF(py_emulated_server_unc);
   58671             :         } else {
   58672           0 :                 if (object->in.emulated_server_unc == NULL) {
   58673           0 :                         py_emulated_server_unc = Py_None;
   58674           0 :                         Py_INCREF(py_emulated_server_unc);
   58675             :                 } else {
   58676           0 :                         py_emulated_server_unc = PyUnicode_Decode(object->in.emulated_server_unc, strlen(object->in.emulated_server_unc), "utf-8", "ignore");
   58677             :                 }
   58678             :         }
   58679           0 :         return py_emulated_server_unc;
   58680             : }
   58681             : 
   58682           0 : static int py_srvsvc_NetServerSetServiceBitsEx_in_set_emulated_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   58683             : {
   58684           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(py_obj);
   58685           0 :         if (value == NULL) {
   58686           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.emulated_server_unc");
   58687           0 :                 return -1;
   58688             :         }
   58689           0 :         if (value == Py_None) {
   58690           0 :                 object->in.emulated_server_unc = NULL;
   58691             :         } else {
   58692           0 :                 object->in.emulated_server_unc = NULL;
   58693             :                 {
   58694           0 :                         const char *test_str;
   58695           0 :                         const char *talloc_str;
   58696           0 :                         PyObject *unicode = NULL;
   58697           0 :                         if (PyUnicode_Check(value)) {
   58698           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58699           0 :                                 if (unicode == NULL) {
   58700           0 :                                         return -1;
   58701             :                                 }
   58702           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58703           0 :                         } else if (PyBytes_Check(value)) {
   58704           0 :                                 test_str = PyBytes_AS_STRING(value);
   58705             :                         } else {
   58706           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58707           0 :                                 return -1;
   58708             :                         }
   58709           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58710           0 :                         if (unicode != NULL) {
   58711           0 :                                 Py_DECREF(unicode);
   58712             :                         }
   58713           0 :                         if (talloc_str == NULL) {
   58714           0 :                                 PyErr_NoMemory();
   58715           0 :                                 return -1;
   58716             :                         }
   58717           0 :                         object->in.emulated_server_unc = talloc_str;
   58718             :                 }
   58719             :         }
   58720           0 :         return 0;
   58721             : }
   58722             : 
   58723           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_in_get_transport(PyObject *obj, void *closure)
   58724             : {
   58725           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(obj);
   58726           0 :         PyObject *py_transport;
   58727           0 :         if (object->in.transport == NULL) {
   58728           0 :                 Py_RETURN_NONE;
   58729             :         }
   58730           0 :         if (object->in.transport == NULL) {
   58731           0 :                 py_transport = Py_None;
   58732           0 :                 Py_INCREF(py_transport);
   58733             :         } else {
   58734           0 :                 if (object->in.transport == NULL) {
   58735           0 :                         py_transport = Py_None;
   58736           0 :                         Py_INCREF(py_transport);
   58737             :                 } else {
   58738           0 :                         py_transport = PyUnicode_Decode(object->in.transport, strlen(object->in.transport), "utf-8", "ignore");
   58739             :                 }
   58740             :         }
   58741           0 :         return py_transport;
   58742             : }
   58743             : 
   58744           0 : static int py_srvsvc_NetServerSetServiceBitsEx_in_set_transport(PyObject *py_obj, PyObject *value, void *closure)
   58745             : {
   58746           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(py_obj);
   58747           0 :         if (value == NULL) {
   58748           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.transport");
   58749           0 :                 return -1;
   58750             :         }
   58751           0 :         if (value == Py_None) {
   58752           0 :                 object->in.transport = NULL;
   58753             :         } else {
   58754           0 :                 object->in.transport = NULL;
   58755             :                 {
   58756           0 :                         const char *test_str;
   58757           0 :                         const char *talloc_str;
   58758           0 :                         PyObject *unicode = NULL;
   58759           0 :                         if (PyUnicode_Check(value)) {
   58760           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58761           0 :                                 if (unicode == NULL) {
   58762           0 :                                         return -1;
   58763             :                                 }
   58764           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58765           0 :                         } else if (PyBytes_Check(value)) {
   58766           0 :                                 test_str = PyBytes_AS_STRING(value);
   58767             :                         } else {
   58768           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58769           0 :                                 return -1;
   58770             :                         }
   58771           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58772           0 :                         if (unicode != NULL) {
   58773           0 :                                 Py_DECREF(unicode);
   58774             :                         }
   58775           0 :                         if (talloc_str == NULL) {
   58776           0 :                                 PyErr_NoMemory();
   58777           0 :                                 return -1;
   58778             :                         }
   58779           0 :                         object->in.transport = talloc_str;
   58780             :                 }
   58781             :         }
   58782           0 :         return 0;
   58783             : }
   58784             : 
   58785           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_in_get_servicebitsofinterest(PyObject *obj, void *closure)
   58786             : {
   58787           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(obj);
   58788           0 :         PyObject *py_servicebitsofinterest;
   58789           0 :         py_servicebitsofinterest = PyLong_FromUnsignedLongLong((uint32_t)(object->in.servicebitsofinterest));
   58790           0 :         return py_servicebitsofinterest;
   58791             : }
   58792             : 
   58793           0 : static int py_srvsvc_NetServerSetServiceBitsEx_in_set_servicebitsofinterest(PyObject *py_obj, PyObject *value, void *closure)
   58794             : {
   58795           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(py_obj);
   58796           0 :         if (value == NULL) {
   58797           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servicebitsofinterest");
   58798           0 :                 return -1;
   58799             :         }
   58800             :         {
   58801           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.servicebitsofinterest));
   58802           0 :                 if (PyLong_Check(value)) {
   58803           0 :                         unsigned long long test_var;
   58804           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58805           0 :                         if (PyErr_Occurred() != NULL) {
   58806           0 :                                 return -1;
   58807             :                         }
   58808           0 :                         if (test_var > uint_max) {
   58809           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58810             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58811           0 :                                 return -1;
   58812             :                         }
   58813           0 :                         object->in.servicebitsofinterest = test_var;
   58814             :                 } else {
   58815           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58816             :                           PyLong_Type.tp_name);
   58817           0 :                         return -1;
   58818             :                 }
   58819             :         }
   58820           0 :         return 0;
   58821             : }
   58822             : 
   58823           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_in_get_servicebits(PyObject *obj, void *closure)
   58824             : {
   58825           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(obj);
   58826           0 :         PyObject *py_servicebits;
   58827           0 :         py_servicebits = PyLong_FromUnsignedLongLong((uint32_t)(object->in.servicebits));
   58828           0 :         return py_servicebits;
   58829             : }
   58830             : 
   58831           0 : static int py_srvsvc_NetServerSetServiceBitsEx_in_set_servicebits(PyObject *py_obj, PyObject *value, void *closure)
   58832             : {
   58833           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(py_obj);
   58834           0 :         if (value == NULL) {
   58835           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.servicebits");
   58836           0 :                 return -1;
   58837             :         }
   58838             :         {
   58839           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.servicebits));
   58840           0 :                 if (PyLong_Check(value)) {
   58841           0 :                         unsigned long long test_var;
   58842           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58843           0 :                         if (PyErr_Occurred() != NULL) {
   58844           0 :                                 return -1;
   58845             :                         }
   58846           0 :                         if (test_var > uint_max) {
   58847           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58848             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58849           0 :                                 return -1;
   58850             :                         }
   58851           0 :                         object->in.servicebits = test_var;
   58852             :                 } else {
   58853           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58854             :                           PyLong_Type.tp_name);
   58855           0 :                         return -1;
   58856             :                 }
   58857             :         }
   58858           0 :         return 0;
   58859             : }
   58860             : 
   58861           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_in_get_updateimmediately(PyObject *obj, void *closure)
   58862             : {
   58863           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(obj);
   58864           0 :         PyObject *py_updateimmediately;
   58865           0 :         py_updateimmediately = PyLong_FromUnsignedLongLong((uint32_t)(object->in.updateimmediately));
   58866           0 :         return py_updateimmediately;
   58867             : }
   58868             : 
   58869           0 : static int py_srvsvc_NetServerSetServiceBitsEx_in_set_updateimmediately(PyObject *py_obj, PyObject *value, void *closure)
   58870             : {
   58871           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(py_obj);
   58872           0 :         if (value == NULL) {
   58873           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.updateimmediately");
   58874           0 :                 return -1;
   58875             :         }
   58876             :         {
   58877           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.updateimmediately));
   58878           0 :                 if (PyLong_Check(value)) {
   58879           0 :                         unsigned long long test_var;
   58880           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58881           0 :                         if (PyErr_Occurred() != NULL) {
   58882           0 :                                 return -1;
   58883             :                         }
   58884           0 :                         if (test_var > uint_max) {
   58885           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58886             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58887           0 :                                 return -1;
   58888             :                         }
   58889           0 :                         object->in.updateimmediately = test_var;
   58890             :                 } else {
   58891           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58892             :                           PyLong_Type.tp_name);
   58893           0 :                         return -1;
   58894             :                 }
   58895             :         }
   58896           0 :         return 0;
   58897             : }
   58898             : 
   58899           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_get_result(PyObject *obj, void *closure)
   58900             : {
   58901           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(obj);
   58902           0 :         PyObject *py_result;
   58903           0 :         py_result = PyErr_FromWERROR(object->out.result);
   58904           0 :         return py_result;
   58905             : }
   58906             : 
   58907           0 : static int py_srvsvc_NetServerSetServiceBitsEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   58908             : {
   58909           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(py_obj);
   58910           0 :         if (value == NULL) {
   58911           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
   58912           0 :                 return -1;
   58913             :         }
   58914           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   58915           0 :         return 0;
   58916             : }
   58917             : 
   58918             : static PyGetSetDef py_srvsvc_NetServerSetServiceBitsEx_getsetters[] = {
   58919             :         {
   58920             :                 .name = discard_const_p(char, "in_server_unc"),
   58921             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_in_get_server_unc,
   58922             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_in_set_server_unc,
   58923             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   58924             :         },
   58925             :         {
   58926             :                 .name = discard_const_p(char, "in_emulated_server_unc"),
   58927             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_in_get_emulated_server_unc,
   58928             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_in_set_emulated_server_unc,
   58929             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   58930             :         },
   58931             :         {
   58932             :                 .name = discard_const_p(char, "in_transport"),
   58933             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_in_get_transport,
   58934             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_in_set_transport,
   58935             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   58936             :         },
   58937             :         {
   58938             :                 .name = discard_const_p(char, "in_servicebitsofinterest"),
   58939             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_in_get_servicebitsofinterest,
   58940             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_in_set_servicebitsofinterest,
   58941             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   58942             :         },
   58943             :         {
   58944             :                 .name = discard_const_p(char, "in_servicebits"),
   58945             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_in_get_servicebits,
   58946             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_in_set_servicebits,
   58947             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   58948             :         },
   58949             :         {
   58950             :                 .name = discard_const_p(char, "in_updateimmediately"),
   58951             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_in_get_updateimmediately,
   58952             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_in_set_updateimmediately,
   58953             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   58954             :         },
   58955             :         {
   58956             :                 .name = discard_const_p(char, "result"),
   58957             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_get_result,
   58958             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_set_result,
   58959             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   58960             :         },
   58961             :         { .name = NULL }
   58962             : };
   58963             : 
   58964           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   58965             : {
   58966           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetServerSetServiceBitsEx, type);
   58967           0 :         return self;
   58968             : }
   58969             : 
   58970           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   58971             : {
   58972             : 
   58973             : 
   58974           0 :         return PyLong_FromLong(42);
   58975             : }
   58976             : 
   58977           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   58978             : {
   58979           0 :         const struct ndr_interface_call *call = NULL;
   58980           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(py_obj);
   58981           0 :         PyObject *ret = NULL;
   58982           0 :         struct ndr_push *push = NULL;
   58983           0 :         DATA_BLOB blob;
   58984           0 :         enum ndr_err_code err;
   58985             : 
   58986           0 :         if (ndr_table_srvsvc.num_calls < 43) {
   58987           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerSetServiceBitsEx_ndr_pack");
   58988           0 :                 return NULL;
   58989             :         }
   58990           0 :         call = &ndr_table_srvsvc.calls[42];
   58991             : 
   58992           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   58993           0 :         if (push == NULL) {
   58994           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   58995           0 :                 return NULL;
   58996             :         }
   58997             : 
   58998           0 :         push->flags |= ndr_push_flags;
   58999             : 
   59000           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   59001           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   59002           0 :                 TALLOC_FREE(push);
   59003           0 :                 PyErr_SetNdrError(err);
   59004           0 :                 return NULL;
   59005             :         }
   59006           0 :         blob = ndr_push_blob(push);
   59007           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   59008           0 :         TALLOC_FREE(push);
   59009           0 :         return ret;
   59010             : }
   59011             : 
   59012           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59013             : {
   59014           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   59015           0 :         PyObject *bigendian_obj = NULL;
   59016           0 :         PyObject *ndr64_obj = NULL;
   59017           0 :         libndr_flags ndr_push_flags = 0;
   59018             : 
   59019           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   59020             :                 discard_const_p(char *, kwnames),
   59021             :                 &bigendian_obj,
   59022             :                 &ndr64_obj)) {
   59023           0 :                 return NULL;
   59024             :         }
   59025             : 
   59026           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59027           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   59028             :         }
   59029           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59030           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   59031             :         }
   59032             : 
   59033           0 :         return py_srvsvc_NetServerSetServiceBitsEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   59034             : }
   59035             : 
   59036           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59037             : {
   59038           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   59039           0 :         PyObject *bigendian_obj = NULL;
   59040           0 :         PyObject *ndr64_obj = NULL;
   59041           0 :         libndr_flags ndr_push_flags = 0;
   59042             : 
   59043           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   59044             :                 discard_const_p(char *, kwnames),
   59045             :                 &bigendian_obj,
   59046             :                 &ndr64_obj)) {
   59047           0 :                 return NULL;
   59048             :         }
   59049             : 
   59050           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59051           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   59052             :         }
   59053           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59054           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   59055             :         }
   59056             : 
   59057           0 :         return py_srvsvc_NetServerSetServiceBitsEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   59058             : }
   59059             : 
   59060           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   59061             : {
   59062           0 :         const struct ndr_interface_call *call = NULL;
   59063           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(py_obj);
   59064           0 :         struct ndr_pull *pull = NULL;
   59065           0 :         enum ndr_err_code err;
   59066             : 
   59067           0 :         if (ndr_table_srvsvc.num_calls < 43) {
   59068           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack");
   59069           0 :                 return NULL;
   59070             :         }
   59071           0 :         call = &ndr_table_srvsvc.calls[42];
   59072             : 
   59073           0 :         pull = ndr_pull_init_blob(blob, object);
   59074           0 :         if (pull == NULL) {
   59075           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   59076           0 :                 return NULL;
   59077             :         }
   59078             : 
   59079           0 :         pull->flags |= ndr_pull_flags;
   59080             : 
   59081           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   59082           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   59083           0 :                 TALLOC_FREE(pull);
   59084           0 :                 PyErr_SetNdrError(err);
   59085           0 :                 return NULL;
   59086             :         }
   59087           0 :         if (!allow_remaining) {
   59088           0 :                 uint32_t highest_ofs;
   59089             : 
   59090           0 :                 if (pull->offset > pull->relative_highest_offset) {
   59091           0 :                         highest_ofs = pull->offset;
   59092             :                 } else {
   59093           0 :                         highest_ofs = pull->relative_highest_offset;
   59094             :                 }
   59095           0 :                 if (highest_ofs < pull->data_size) {
   59096           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   59097             :                                 "not all bytes consumed ofs[%u] size[%u]",
   59098             :                                 highest_ofs, pull->data_size);
   59099           0 :                         TALLOC_FREE(pull);
   59100           0 :                         PyErr_SetNdrError(err);
   59101           0 :                         return NULL;
   59102             :                 }
   59103             :         }
   59104             : 
   59105           0 :         TALLOC_FREE(pull);
   59106           0 :         Py_RETURN_NONE;
   59107             : }
   59108             : 
   59109           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59110             : {
   59111           0 :         DATA_BLOB blob;
   59112           0 :         Py_ssize_t blob_length = 0;
   59113           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   59114           0 :         PyObject *bigendian_obj = NULL;
   59115           0 :         PyObject *ndr64_obj = NULL;
   59116           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   59117           0 :         PyObject *allow_remaining_obj = NULL;
   59118           0 :         bool allow_remaining = false;
   59119             : 
   59120           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   59121             :                 discard_const_p(char *, kwnames),
   59122             :                 &blob.data, &blob_length,
   59123             :                 &bigendian_obj,
   59124             :                 &ndr64_obj,
   59125             :                 &allow_remaining_obj)) {
   59126           0 :                 return NULL;
   59127             :         }
   59128           0 :         blob.length = blob_length;
   59129             : 
   59130           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59131           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   59132             :         }
   59133           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59134           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   59135             :         }
   59136             : 
   59137           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   59138           0 :                 allow_remaining = true;
   59139             :         }
   59140             : 
   59141           0 :         return py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   59142             : }
   59143             : 
   59144           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59145             : {
   59146           0 :         DATA_BLOB blob;
   59147           0 :         Py_ssize_t blob_length = 0;
   59148           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   59149           0 :         PyObject *bigendian_obj = NULL;
   59150           0 :         PyObject *ndr64_obj = NULL;
   59151           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   59152           0 :         PyObject *allow_remaining_obj = NULL;
   59153           0 :         bool allow_remaining = false;
   59154             : 
   59155           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   59156             :                 discard_const_p(char *, kwnames),
   59157             :                 &blob.data, &blob_length,
   59158             :                 &bigendian_obj,
   59159             :                 &ndr64_obj,
   59160             :                 &allow_remaining_obj)) {
   59161           0 :                 return NULL;
   59162             :         }
   59163           0 :         blob.length = blob_length;
   59164             : 
   59165           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59166           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   59167             :         }
   59168           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59169           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   59170             :         }
   59171             : 
   59172           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   59173           0 :                 allow_remaining = true;
   59174             :         }
   59175             : 
   59176           0 :         return py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   59177             : }
   59178             : 
   59179           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   59180             : {
   59181           0 :         const struct ndr_interface_call *call = NULL;
   59182           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = pytalloc_get_ptr(py_obj);
   59183           0 :         PyObject *ret;
   59184           0 :         char *retstr;
   59185             : 
   59186           0 :         if (ndr_table_srvsvc.num_calls < 43) {
   59187           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerSetServiceBitsEx_ndr_print");
   59188           0 :                 return NULL;
   59189             :         }
   59190           0 :         call = &ndr_table_srvsvc.calls[42];
   59191             : 
   59192           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   59193           0 :         ret = PyUnicode_FromString(retstr);
   59194           0 :         TALLOC_FREE(retstr);
   59195             : 
   59196           0 :         return ret;
   59197             : }
   59198             : 
   59199           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   59200             : {
   59201           0 :         return py_srvsvc_NetServerSetServiceBitsEx_ndr_print(py_obj, "srvsvc_NetServerSetServiceBitsEx_in", NDR_IN);
   59202             : }
   59203             : 
   59204           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   59205             : {
   59206           0 :         return py_srvsvc_NetServerSetServiceBitsEx_ndr_print(py_obj, "srvsvc_NetServerSetServiceBitsEx_out", NDR_OUT);
   59207             : }
   59208             : 
   59209             : static PyMethodDef py_srvsvc_NetServerSetServiceBitsEx_methods[] = {
   59210             :         { "opnum", (PyCFunction)py_srvsvc_NetServerSetServiceBitsEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   59211             :                 "srvsvc.NetServerSetServiceBitsEx.opnum() -> 42 (0x2a) " },
   59212             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerSetServiceBitsEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   59213             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   59214             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerSetServiceBitsEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   59215             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   59216             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   59217             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   59218             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   59219             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   59220             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetServerSetServiceBitsEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   59221             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetServerSetServiceBitsEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   59222             :         { NULL, NULL, 0, NULL }
   59223             : };
   59224             : 
   59225             : 
   59226             : static PyTypeObject srvsvc_NetServerSetServiceBitsEx_Type = {
   59227             :         PyVarObject_HEAD_INIT(NULL, 0)
   59228             :         .tp_name = "srvsvc.NetServerSetServiceBitsEx",
   59229             :         .tp_getset = py_srvsvc_NetServerSetServiceBitsEx_getsetters,
   59230             :         .tp_methods = py_srvsvc_NetServerSetServiceBitsEx_methods,
   59231             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   59232             :         .tp_new = py_srvsvc_NetServerSetServiceBitsEx_new,
   59233             : };
   59234             : 
   59235           0 : static bool pack_py_srvsvc_NetServerSetServiceBitsEx_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetServerSetServiceBitsEx *r)
   59236             : {
   59237           0 :         PyObject *py_server_unc;
   59238           0 :         PyObject *py_emulated_server_unc;
   59239           0 :         PyObject *py_transport;
   59240           0 :         PyObject *py_servicebitsofinterest;
   59241           0 :         PyObject *py_servicebits;
   59242           0 :         PyObject *py_updateimmediately;
   59243           0 :         const char *kwnames[] = {
   59244             :                 "server_unc", "emulated_server_unc", "transport", "servicebitsofinterest", "servicebits", "updateimmediately", NULL
   59245             :         };
   59246             : 
   59247           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)) {
   59248           0 :                 return false;
   59249             :         }
   59250             : 
   59251           0 :         if (py_server_unc == NULL) {
   59252           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
   59253           0 :                 return false;
   59254             :         }
   59255           0 :         if (py_server_unc == Py_None) {
   59256           0 :                 r->in.server_unc = NULL;
   59257             :         } else {
   59258           0 :                 r->in.server_unc = NULL;
   59259             :                 {
   59260           0 :                         const char *test_str;
   59261           0 :                         const char *talloc_str;
   59262           0 :                         PyObject *unicode = NULL;
   59263           0 :                         if (PyUnicode_Check(py_server_unc)) {
   59264           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   59265           0 :                                 if (unicode == NULL) {
   59266           0 :                                         return false;
   59267             :                                 }
   59268           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   59269           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   59270           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   59271             :                         } else {
   59272           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   59273           0 :                                 return false;
   59274             :                         }
   59275           0 :                         talloc_str = talloc_strdup(r, test_str);
   59276           0 :                         if (unicode != NULL) {
   59277           0 :                                 Py_DECREF(unicode);
   59278             :                         }
   59279           0 :                         if (talloc_str == NULL) {
   59280           0 :                                 PyErr_NoMemory();
   59281           0 :                                 return false;
   59282             :                         }
   59283           0 :                         r->in.server_unc = talloc_str;
   59284             :                 }
   59285             :         }
   59286           0 :         if (py_emulated_server_unc == NULL) {
   59287           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.emulated_server_unc");
   59288           0 :                 return false;
   59289             :         }
   59290           0 :         if (py_emulated_server_unc == Py_None) {
   59291           0 :                 r->in.emulated_server_unc = NULL;
   59292             :         } else {
   59293           0 :                 r->in.emulated_server_unc = NULL;
   59294             :                 {
   59295           0 :                         const char *test_str;
   59296           0 :                         const char *talloc_str;
   59297           0 :                         PyObject *unicode = NULL;
   59298           0 :                         if (PyUnicode_Check(py_emulated_server_unc)) {
   59299           0 :                                 unicode = PyUnicode_AsEncodedString(py_emulated_server_unc, "utf-8", "ignore");
   59300           0 :                                 if (unicode == NULL) {
   59301           0 :                                         return false;
   59302             :                                 }
   59303           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   59304           0 :                         } else if (PyBytes_Check(py_emulated_server_unc)) {
   59305           0 :                                 test_str = PyBytes_AS_STRING(py_emulated_server_unc);
   59306             :                         } else {
   59307           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_emulated_server_unc)->tp_name);
   59308           0 :                                 return false;
   59309             :                         }
   59310           0 :                         talloc_str = talloc_strdup(r, test_str);
   59311           0 :                         if (unicode != NULL) {
   59312           0 :                                 Py_DECREF(unicode);
   59313             :                         }
   59314           0 :                         if (talloc_str == NULL) {
   59315           0 :                                 PyErr_NoMemory();
   59316           0 :                                 return false;
   59317             :                         }
   59318           0 :                         r->in.emulated_server_unc = talloc_str;
   59319             :                 }
   59320             :         }
   59321           0 :         if (py_transport == NULL) {
   59322           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.transport");
   59323           0 :                 return false;
   59324             :         }
   59325           0 :         if (py_transport == Py_None) {
   59326           0 :                 r->in.transport = NULL;
   59327             :         } else {
   59328           0 :                 r->in.transport = NULL;
   59329             :                 {
   59330           0 :                         const char *test_str;
   59331           0 :                         const char *talloc_str;
   59332           0 :                         PyObject *unicode = NULL;
   59333           0 :                         if (PyUnicode_Check(py_transport)) {
   59334           0 :                                 unicode = PyUnicode_AsEncodedString(py_transport, "utf-8", "ignore");
   59335           0 :                                 if (unicode == NULL) {
   59336           0 :                                         return false;
   59337             :                                 }
   59338           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   59339           0 :                         } else if (PyBytes_Check(py_transport)) {
   59340           0 :                                 test_str = PyBytes_AS_STRING(py_transport);
   59341             :                         } else {
   59342           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_transport)->tp_name);
   59343           0 :                                 return false;
   59344             :                         }
   59345           0 :                         talloc_str = talloc_strdup(r, test_str);
   59346           0 :                         if (unicode != NULL) {
   59347           0 :                                 Py_DECREF(unicode);
   59348             :                         }
   59349           0 :                         if (talloc_str == NULL) {
   59350           0 :                                 PyErr_NoMemory();
   59351           0 :                                 return false;
   59352             :                         }
   59353           0 :                         r->in.transport = talloc_str;
   59354             :                 }
   59355             :         }
   59356           0 :         if (py_servicebitsofinterest == NULL) {
   59357           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servicebitsofinterest");
   59358           0 :                 return false;
   59359             :         }
   59360             :         {
   59361           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.servicebitsofinterest));
   59362           0 :                 if (PyLong_Check(py_servicebitsofinterest)) {
   59363           0 :                         unsigned long long test_var;
   59364           0 :                         test_var = PyLong_AsUnsignedLongLong(py_servicebitsofinterest);
   59365           0 :                         if (PyErr_Occurred() != NULL) {
   59366           0 :                                 return false;
   59367             :                         }
   59368           0 :                         if (test_var > uint_max) {
   59369           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59370             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59371           0 :                                 return false;
   59372             :                         }
   59373           0 :                         r->in.servicebitsofinterest = test_var;
   59374             :                 } else {
   59375           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59376             :                           PyLong_Type.tp_name);
   59377           0 :                         return false;
   59378             :                 }
   59379             :         }
   59380           0 :         if (py_servicebits == NULL) {
   59381           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.servicebits");
   59382           0 :                 return false;
   59383             :         }
   59384             :         {
   59385           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.servicebits));
   59386           0 :                 if (PyLong_Check(py_servicebits)) {
   59387           0 :                         unsigned long long test_var;
   59388           0 :                         test_var = PyLong_AsUnsignedLongLong(py_servicebits);
   59389           0 :                         if (PyErr_Occurred() != NULL) {
   59390           0 :                                 return false;
   59391             :                         }
   59392           0 :                         if (test_var > uint_max) {
   59393           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59394             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59395           0 :                                 return false;
   59396             :                         }
   59397           0 :                         r->in.servicebits = test_var;
   59398             :                 } else {
   59399           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59400             :                           PyLong_Type.tp_name);
   59401           0 :                         return false;
   59402             :                 }
   59403             :         }
   59404           0 :         if (py_updateimmediately == NULL) {
   59405           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.updateimmediately");
   59406           0 :                 return false;
   59407             :         }
   59408             :         {
   59409           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.updateimmediately));
   59410           0 :                 if (PyLong_Check(py_updateimmediately)) {
   59411           0 :                         unsigned long long test_var;
   59412           0 :                         test_var = PyLong_AsUnsignedLongLong(py_updateimmediately);
   59413           0 :                         if (PyErr_Occurred() != NULL) {
   59414           0 :                                 return false;
   59415             :                         }
   59416           0 :                         if (test_var > uint_max) {
   59417           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59418             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59419           0 :                                 return false;
   59420             :                         }
   59421           0 :                         r->in.updateimmediately = test_var;
   59422             :                 } else {
   59423           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59424             :                           PyLong_Type.tp_name);
   59425           0 :                         return false;
   59426             :                 }
   59427             :         }
   59428           0 :         return true;
   59429             : }
   59430             : 
   59431           0 : static PyObject *unpack_py_srvsvc_NetServerSetServiceBitsEx_args_out(struct srvsvc_NetServerSetServiceBitsEx *r)
   59432             : {
   59433           0 :         PyObject *result;
   59434           0 :         result = Py_None;
   59435           0 :         Py_INCREF(result);
   59436           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   59437           0 :                 PyErr_SetWERROR(r->out.result);
   59438           0 :                 return NULL;
   59439             :         }
   59440             : 
   59441           0 :         return result;
   59442             : }
   59443             : 
   59444             : const struct PyNdrRpcMethodDef py_ndr_srvsvc_methods[] = {
   59445             :         { "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 },
   59446             :         { "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 },
   59447             :         { "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 },
   59448             :         { "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 },
   59449             :         { "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 },
   59450             :         { "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 },
   59451             :         { "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 },
   59452             :         { "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 },
   59453             :         { "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 },
   59454             :         { "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 },
   59455             :         { "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 },
   59456             :         { "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 },
   59457             :         { "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 },
   59458             :         { "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 },
   59459             :         { "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 },
   59460             :         { "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 },
   59461             :         { "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 },
   59462             :         { "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 },
   59463             :         { "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 },
   59464             :         { "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 },
   59465             :         { "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 },
   59466             :         { "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 },
   59467             :         { "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 },
   59468             :         { "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 },
   59469             :         { "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 },
   59470             :         { "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 },
   59471             :         { "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 },
   59472             :         { "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 },
   59473             :         { "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 },
   59474             :         { "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 },
   59475             :         { "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 },
   59476             :         { "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 },
   59477             :         { "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 },
   59478             :         { "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 },
   59479             :         { "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 },
   59480             :         { "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 },
   59481             :         { "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 },
   59482             :         { "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 },
   59483             :         { "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 },
   59484             :         { "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 },
   59485             :         { "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 },
   59486             :         { "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 },
   59487             :         {0}
   59488             : };
   59489             : 
   59490          23 : static PyObject *interface_srvsvc_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   59491             : {
   59492          23 :         return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_srvsvc);
   59493             : }
   59494             : 
   59495             : #define PY_DOC_SRVSVC "Server Service"
   59496             : static PyTypeObject srvsvc_InterfaceType = {
   59497             :         PyVarObject_HEAD_INIT(NULL, 0)
   59498             :         .tp_name = "srvsvc.srvsvc",
   59499             :         .tp_basicsize = sizeof(dcerpc_InterfaceObject),
   59500             :         .tp_doc = "srvsvc(binding, lp_ctx=None, credentials=None) -> connection\n"
   59501             : "\n"
   59502             : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
   59503             : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
   59504             : "credentials should be a credentials.Credentials object.\n\n"PY_DOC_SRVSVC,
   59505             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   59506             :         .tp_new = interface_srvsvc_new,
   59507             : };
   59508             : 
   59509           0 : static PyObject *syntax_srvsvc_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   59510             : {
   59511           0 :         return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_srvsvc.syntax_id);
   59512             : }
   59513             : 
   59514             : #define PY_DOC_SRVSVC_SYNTAX "Server Service"
   59515             : static PyTypeObject srvsvc_SyntaxType = {
   59516             :         PyVarObject_HEAD_INIT(NULL, 0)
   59517             :         .tp_name = "srvsvc.srvsvc_abstract_syntax",
   59518             :         .tp_doc = "srvsvc_abstract_syntax()\n"PY_DOC_SRVSVC_SYNTAX,
   59519             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   59520             :         .tp_new = syntax_srvsvc_new,
   59521             : };
   59522             : 
   59523             : static PyMethodDef srvsvc_methods[] = {
   59524             :         { NULL, NULL, 0, NULL }
   59525             : };
   59526             : 
   59527             : static struct PyModuleDef moduledef = {
   59528             :         PyModuleDef_HEAD_INIT,
   59529             :         .m_name = "srvsvc",
   59530             :         .m_doc = "srvsvc DCE/RPC",
   59531             :         .m_size = -1,
   59532             :         .m_methods = srvsvc_methods,
   59533             : };
   59534          40 : MODULE_INIT_FUNC(srvsvc)
   59535             : {
   59536          40 :         PyObject *m = NULL;
   59537          40 :         PyObject *dep_samba_dcerpc_misc = NULL;
   59538          40 :         PyObject *dep_samba_dcerpc_security = NULL;
   59539          40 :         PyObject *dep_samba_dcerpc_svcctl = NULL;
   59540          40 :         PyObject *dep_talloc = NULL;
   59541          40 :         PyObject *dep_samba_dcerpc_base = NULL;
   59542             : 
   59543          40 :         dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
   59544          40 :         if (dep_samba_dcerpc_misc == NULL)
   59545           0 :                 goto out;
   59546             : 
   59547          40 :         dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
   59548          40 :         if (dep_samba_dcerpc_security == NULL)
   59549           0 :                 goto out;
   59550             : 
   59551          40 :         dep_samba_dcerpc_svcctl = PyImport_ImportModule("samba.dcerpc.svcctl");
   59552          40 :         if (dep_samba_dcerpc_svcctl == NULL)
   59553           0 :                 goto out;
   59554             : 
   59555          40 :         dep_talloc = PyImport_ImportModule("talloc");
   59556          40 :         if (dep_talloc == NULL)
   59557           0 :                 goto out;
   59558             : 
   59559          40 :         dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
   59560          40 :         if (dep_samba_dcerpc_base == NULL)
   59561           0 :                 goto out;
   59562             : 
   59563          40 :         BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
   59564          40 :         if (BaseObject_Type == NULL)
   59565           0 :                 goto out;
   59566             : 
   59567          40 :         sec_desc_buf_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "sec_desc_buf");
   59568          40 :         if (sec_desc_buf_Type == NULL)
   59569           0 :                 goto out;
   59570             : 
   59571          40 :         policy_handle_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "policy_handle");
   59572          40 :         if (policy_handle_Type == NULL)
   59573           0 :                 goto out;
   59574             : 
   59575          40 :         ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
   59576          40 :         if (ClientConnection_Type == NULL)
   59577           0 :                 goto out;
   59578             : 
   59579          40 :         ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
   59580          40 :         if (ndr_syntax_id_Type == NULL)
   59581           0 :                 goto out;
   59582             : 
   59583          40 :         srvsvc_NetCharDevInfo0_Type.tp_base = BaseObject_Type;
   59584          40 :         srvsvc_NetCharDevInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59585             : 
   59586          40 :         srvsvc_NetCharDevCtr0_Type.tp_base = BaseObject_Type;
   59587          40 :         srvsvc_NetCharDevCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59588             : 
   59589          40 :         srvsvc_NetCharDevInfo1_Type.tp_base = BaseObject_Type;
   59590          40 :         srvsvc_NetCharDevInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59591             : 
   59592          40 :         srvsvc_NetCharDevCtr1_Type.tp_base = BaseObject_Type;
   59593          40 :         srvsvc_NetCharDevCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59594             : 
   59595          40 :         srvsvc_NetCharDevInfo_Type.tp_base = BaseObject_Type;
   59596          40 :         srvsvc_NetCharDevInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59597             : 
   59598          40 :         srvsvc_NetCharDevCtr_Type.tp_base = BaseObject_Type;
   59599          40 :         srvsvc_NetCharDevCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59600             : 
   59601          40 :         srvsvc_NetCharDevInfoCtr_Type.tp_base = BaseObject_Type;
   59602          40 :         srvsvc_NetCharDevInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59603             : 
   59604          40 :         srvsvc_NetCharDevQInfo0_Type.tp_base = BaseObject_Type;
   59605          40 :         srvsvc_NetCharDevQInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59606             : 
   59607          40 :         srvsvc_NetCharDevQCtr0_Type.tp_base = BaseObject_Type;
   59608          40 :         srvsvc_NetCharDevQCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59609             : 
   59610          40 :         srvsvc_NetCharDevQInfo1_Type.tp_base = BaseObject_Type;
   59611          40 :         srvsvc_NetCharDevQInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59612             : 
   59613          40 :         srvsvc_NetCharDevQCtr1_Type.tp_base = BaseObject_Type;
   59614          40 :         srvsvc_NetCharDevQCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59615             : 
   59616          40 :         srvsvc_NetCharDevQInfo_Type.tp_base = BaseObject_Type;
   59617          40 :         srvsvc_NetCharDevQInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59618             : 
   59619          40 :         srvsvc_NetCharDevQCtr_Type.tp_base = BaseObject_Type;
   59620          40 :         srvsvc_NetCharDevQCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59621             : 
   59622          40 :         srvsvc_NetCharDevQInfoCtr_Type.tp_base = BaseObject_Type;
   59623          40 :         srvsvc_NetCharDevQInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59624             : 
   59625          40 :         srvsvc_NetConnInfo0_Type.tp_base = BaseObject_Type;
   59626          40 :         srvsvc_NetConnInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59627             : 
   59628          40 :         srvsvc_NetConnCtr0_Type.tp_base = BaseObject_Type;
   59629          40 :         srvsvc_NetConnCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59630             : 
   59631          40 :         srvsvc_NetConnInfo1_Type.tp_base = BaseObject_Type;
   59632          40 :         srvsvc_NetConnInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59633             : 
   59634          40 :         srvsvc_NetConnCtr1_Type.tp_base = BaseObject_Type;
   59635          40 :         srvsvc_NetConnCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59636             : 
   59637          40 :         srvsvc_NetConnCtr_Type.tp_base = BaseObject_Type;
   59638          40 :         srvsvc_NetConnCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59639             : 
   59640          40 :         srvsvc_NetConnInfoCtr_Type.tp_base = BaseObject_Type;
   59641          40 :         srvsvc_NetConnInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59642             : 
   59643          40 :         srvsvc_NetFileInfo2_Type.tp_base = BaseObject_Type;
   59644          40 :         srvsvc_NetFileInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59645             : 
   59646          40 :         srvsvc_NetFileCtr2_Type.tp_base = BaseObject_Type;
   59647          40 :         srvsvc_NetFileCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59648             : 
   59649          40 :         srvsvc_NetFileInfo3_Type.tp_base = BaseObject_Type;
   59650          40 :         srvsvc_NetFileInfo3_Type.tp_basicsize = pytalloc_BaseObject_size();
   59651             : 
   59652          40 :         srvsvc_NetFileCtr3_Type.tp_base = BaseObject_Type;
   59653          40 :         srvsvc_NetFileCtr3_Type.tp_basicsize = pytalloc_BaseObject_size();
   59654             : 
   59655          40 :         srvsvc_NetFileInfo_Type.tp_base = BaseObject_Type;
   59656          40 :         srvsvc_NetFileInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59657             : 
   59658          40 :         srvsvc_NetFileCtr_Type.tp_base = BaseObject_Type;
   59659          40 :         srvsvc_NetFileCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59660             : 
   59661          40 :         srvsvc_NetFileInfoCtr_Type.tp_base = BaseObject_Type;
   59662          40 :         srvsvc_NetFileInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59663             : 
   59664          40 :         srvsvc_NetSessInfo0_Type.tp_base = BaseObject_Type;
   59665          40 :         srvsvc_NetSessInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59666             : 
   59667          40 :         srvsvc_NetSessCtr0_Type.tp_base = BaseObject_Type;
   59668          40 :         srvsvc_NetSessCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59669             : 
   59670          40 :         srvsvc_NetSessInfo1_Type.tp_base = BaseObject_Type;
   59671          40 :         srvsvc_NetSessInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59672             : 
   59673          40 :         srvsvc_NetSessCtr1_Type.tp_base = BaseObject_Type;
   59674          40 :         srvsvc_NetSessCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59675             : 
   59676          40 :         srvsvc_NetSessInfo2_Type.tp_base = BaseObject_Type;
   59677          40 :         srvsvc_NetSessInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59678             : 
   59679          40 :         srvsvc_NetSessCtr2_Type.tp_base = BaseObject_Type;
   59680          40 :         srvsvc_NetSessCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59681             : 
   59682          40 :         srvsvc_NetSessInfo10_Type.tp_base = BaseObject_Type;
   59683          40 :         srvsvc_NetSessInfo10_Type.tp_basicsize = pytalloc_BaseObject_size();
   59684             : 
   59685          40 :         srvsvc_NetSessCtr10_Type.tp_base = BaseObject_Type;
   59686          40 :         srvsvc_NetSessCtr10_Type.tp_basicsize = pytalloc_BaseObject_size();
   59687             : 
   59688          40 :         srvsvc_NetSessInfo502_Type.tp_base = BaseObject_Type;
   59689          40 :         srvsvc_NetSessInfo502_Type.tp_basicsize = pytalloc_BaseObject_size();
   59690             : 
   59691          40 :         srvsvc_NetSessCtr502_Type.tp_base = BaseObject_Type;
   59692          40 :         srvsvc_NetSessCtr502_Type.tp_basicsize = pytalloc_BaseObject_size();
   59693             : 
   59694          40 :         srvsvc_NetSessCtr_Type.tp_base = BaseObject_Type;
   59695          40 :         srvsvc_NetSessCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59696             : 
   59697          40 :         srvsvc_NetSessInfoCtr_Type.tp_base = BaseObject_Type;
   59698          40 :         srvsvc_NetSessInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59699             : 
   59700          40 :         srvsvc_NetShareInfo0_Type.tp_base = BaseObject_Type;
   59701          40 :         srvsvc_NetShareInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59702             : 
   59703          40 :         srvsvc_NetShareCtr0_Type.tp_base = BaseObject_Type;
   59704          40 :         srvsvc_NetShareCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59705             : 
   59706          40 :         srvsvc_NetShareInfo1_Type.tp_base = BaseObject_Type;
   59707          40 :         srvsvc_NetShareInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59708             : 
   59709          40 :         srvsvc_NetShareCtr1_Type.tp_base = BaseObject_Type;
   59710          40 :         srvsvc_NetShareCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59711             : 
   59712          40 :         srvsvc_NetShareInfo2_Type.tp_base = BaseObject_Type;
   59713          40 :         srvsvc_NetShareInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59714             : 
   59715          40 :         srvsvc_NetShareCtr2_Type.tp_base = BaseObject_Type;
   59716          40 :         srvsvc_NetShareCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59717             : 
   59718          40 :         srvsvc_NetShareInfo501_Type.tp_base = BaseObject_Type;
   59719          40 :         srvsvc_NetShareInfo501_Type.tp_basicsize = pytalloc_BaseObject_size();
   59720             : 
   59721          40 :         srvsvc_NetShareCtr501_Type.tp_base = BaseObject_Type;
   59722          40 :         srvsvc_NetShareCtr501_Type.tp_basicsize = pytalloc_BaseObject_size();
   59723             : 
   59724          40 :         srvsvc_NetShareInfo502_Type.tp_base = BaseObject_Type;
   59725          40 :         srvsvc_NetShareInfo502_Type.tp_basicsize = pytalloc_BaseObject_size();
   59726             : 
   59727          40 :         srvsvc_NetShareCtr502_Type.tp_base = BaseObject_Type;
   59728          40 :         srvsvc_NetShareCtr502_Type.tp_basicsize = pytalloc_BaseObject_size();
   59729             : 
   59730          40 :         srvsvc_NetShareInfo1004_Type.tp_base = BaseObject_Type;
   59731          40 :         srvsvc_NetShareInfo1004_Type.tp_basicsize = pytalloc_BaseObject_size();
   59732             : 
   59733          40 :         srvsvc_NetShareCtr1004_Type.tp_base = BaseObject_Type;
   59734          40 :         srvsvc_NetShareCtr1004_Type.tp_basicsize = pytalloc_BaseObject_size();
   59735             : 
   59736          40 :         srvsvc_NetShareInfo1005_Type.tp_base = BaseObject_Type;
   59737          40 :         srvsvc_NetShareInfo1005_Type.tp_basicsize = pytalloc_BaseObject_size();
   59738             : 
   59739          40 :         srvsvc_NetShareCtr1005_Type.tp_base = BaseObject_Type;
   59740          40 :         srvsvc_NetShareCtr1005_Type.tp_basicsize = pytalloc_BaseObject_size();
   59741             : 
   59742          40 :         srvsvc_NetShareInfo1006_Type.tp_base = BaseObject_Type;
   59743          40 :         srvsvc_NetShareInfo1006_Type.tp_basicsize = pytalloc_BaseObject_size();
   59744             : 
   59745          40 :         srvsvc_NetShareCtr1006_Type.tp_base = BaseObject_Type;
   59746          40 :         srvsvc_NetShareCtr1006_Type.tp_basicsize = pytalloc_BaseObject_size();
   59747             : 
   59748          40 :         srvsvc_NetShareInfo1007_Type.tp_base = BaseObject_Type;
   59749          40 :         srvsvc_NetShareInfo1007_Type.tp_basicsize = pytalloc_BaseObject_size();
   59750             : 
   59751          40 :         srvsvc_NetShareCtr1007_Type.tp_base = BaseObject_Type;
   59752          40 :         srvsvc_NetShareCtr1007_Type.tp_basicsize = pytalloc_BaseObject_size();
   59753             : 
   59754          40 :         srvsvc_NetShareCtr1501_Type.tp_base = BaseObject_Type;
   59755          40 :         srvsvc_NetShareCtr1501_Type.tp_basicsize = pytalloc_BaseObject_size();
   59756             : 
   59757          40 :         srvsvc_NetShareInfo_Type.tp_base = BaseObject_Type;
   59758          40 :         srvsvc_NetShareInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59759             : 
   59760          40 :         srvsvc_NetShareCtr_Type.tp_base = BaseObject_Type;
   59761          40 :         srvsvc_NetShareCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59762             : 
   59763          40 :         srvsvc_NetShareInfoCtr_Type.tp_base = BaseObject_Type;
   59764          40 :         srvsvc_NetShareInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59765             : 
   59766          40 :         srvsvc_NetSrvInfo100_Type.tp_base = BaseObject_Type;
   59767          40 :         srvsvc_NetSrvInfo100_Type.tp_basicsize = pytalloc_BaseObject_size();
   59768             : 
   59769          40 :         srvsvc_NetSrvInfo101_Type.tp_base = BaseObject_Type;
   59770          40 :         srvsvc_NetSrvInfo101_Type.tp_basicsize = pytalloc_BaseObject_size();
   59771             : 
   59772          40 :         srvsvc_NetSrvInfo102_Type.tp_base = BaseObject_Type;
   59773          40 :         srvsvc_NetSrvInfo102_Type.tp_basicsize = pytalloc_BaseObject_size();
   59774             : 
   59775          40 :         srvsvc_NetSrvInfo402_Type.tp_base = BaseObject_Type;
   59776          40 :         srvsvc_NetSrvInfo402_Type.tp_basicsize = pytalloc_BaseObject_size();
   59777             : 
   59778          40 :         srvsvc_NetSrvInfo403_Type.tp_base = BaseObject_Type;
   59779          40 :         srvsvc_NetSrvInfo403_Type.tp_basicsize = pytalloc_BaseObject_size();
   59780             : 
   59781          40 :         srvsvc_NetSrvInfo502_Type.tp_base = BaseObject_Type;
   59782          40 :         srvsvc_NetSrvInfo502_Type.tp_basicsize = pytalloc_BaseObject_size();
   59783             : 
   59784          40 :         srvsvc_NetSrvInfo503_Type.tp_base = BaseObject_Type;
   59785          40 :         srvsvc_NetSrvInfo503_Type.tp_basicsize = pytalloc_BaseObject_size();
   59786             : 
   59787          40 :         srvsvc_NetSrvInfo599_Type.tp_base = BaseObject_Type;
   59788          40 :         srvsvc_NetSrvInfo599_Type.tp_basicsize = pytalloc_BaseObject_size();
   59789             : 
   59790          40 :         srvsvc_NetSrvInfo1005_Type.tp_base = BaseObject_Type;
   59791          40 :         srvsvc_NetSrvInfo1005_Type.tp_basicsize = pytalloc_BaseObject_size();
   59792             : 
   59793          40 :         srvsvc_NetSrvInfo1010_Type.tp_base = BaseObject_Type;
   59794          40 :         srvsvc_NetSrvInfo1010_Type.tp_basicsize = pytalloc_BaseObject_size();
   59795             : 
   59796          40 :         srvsvc_NetSrvInfo1016_Type.tp_base = BaseObject_Type;
   59797          40 :         srvsvc_NetSrvInfo1016_Type.tp_basicsize = pytalloc_BaseObject_size();
   59798             : 
   59799          40 :         srvsvc_NetSrvInfo1017_Type.tp_base = BaseObject_Type;
   59800          40 :         srvsvc_NetSrvInfo1017_Type.tp_basicsize = pytalloc_BaseObject_size();
   59801             : 
   59802          40 :         srvsvc_NetSrvInfo1018_Type.tp_base = BaseObject_Type;
   59803          40 :         srvsvc_NetSrvInfo1018_Type.tp_basicsize = pytalloc_BaseObject_size();
   59804             : 
   59805          40 :         srvsvc_NetSrvInfo1107_Type.tp_base = BaseObject_Type;
   59806          40 :         srvsvc_NetSrvInfo1107_Type.tp_basicsize = pytalloc_BaseObject_size();
   59807             : 
   59808          40 :         srvsvc_NetSrvInfo1501_Type.tp_base = BaseObject_Type;
   59809          40 :         srvsvc_NetSrvInfo1501_Type.tp_basicsize = pytalloc_BaseObject_size();
   59810             : 
   59811          40 :         srvsvc_NetSrvInfo1502_Type.tp_base = BaseObject_Type;
   59812          40 :         srvsvc_NetSrvInfo1502_Type.tp_basicsize = pytalloc_BaseObject_size();
   59813             : 
   59814          40 :         srvsvc_NetSrvInfo1503_Type.tp_base = BaseObject_Type;
   59815          40 :         srvsvc_NetSrvInfo1503_Type.tp_basicsize = pytalloc_BaseObject_size();
   59816             : 
   59817          40 :         srvsvc_NetSrvInfo1506_Type.tp_base = BaseObject_Type;
   59818          40 :         srvsvc_NetSrvInfo1506_Type.tp_basicsize = pytalloc_BaseObject_size();
   59819             : 
   59820          40 :         srvsvc_NetSrvInfo1509_Type.tp_base = BaseObject_Type;
   59821          40 :         srvsvc_NetSrvInfo1509_Type.tp_basicsize = pytalloc_BaseObject_size();
   59822             : 
   59823          40 :         srvsvc_NetSrvInfo1510_Type.tp_base = BaseObject_Type;
   59824          40 :         srvsvc_NetSrvInfo1510_Type.tp_basicsize = pytalloc_BaseObject_size();
   59825             : 
   59826          40 :         srvsvc_NetSrvInfo1511_Type.tp_base = BaseObject_Type;
   59827          40 :         srvsvc_NetSrvInfo1511_Type.tp_basicsize = pytalloc_BaseObject_size();
   59828             : 
   59829          40 :         srvsvc_NetSrvInfo1512_Type.tp_base = BaseObject_Type;
   59830          40 :         srvsvc_NetSrvInfo1512_Type.tp_basicsize = pytalloc_BaseObject_size();
   59831             : 
   59832          40 :         srvsvc_NetSrvInfo1513_Type.tp_base = BaseObject_Type;
   59833          40 :         srvsvc_NetSrvInfo1513_Type.tp_basicsize = pytalloc_BaseObject_size();
   59834             : 
   59835          40 :         srvsvc_NetSrvInfo1514_Type.tp_base = BaseObject_Type;
   59836          40 :         srvsvc_NetSrvInfo1514_Type.tp_basicsize = pytalloc_BaseObject_size();
   59837             : 
   59838          40 :         srvsvc_NetSrvInfo1515_Type.tp_base = BaseObject_Type;
   59839          40 :         srvsvc_NetSrvInfo1515_Type.tp_basicsize = pytalloc_BaseObject_size();
   59840             : 
   59841          40 :         srvsvc_NetSrvInfo1516_Type.tp_base = BaseObject_Type;
   59842          40 :         srvsvc_NetSrvInfo1516_Type.tp_basicsize = pytalloc_BaseObject_size();
   59843             : 
   59844          40 :         srvsvc_NetSrvInfo1518_Type.tp_base = BaseObject_Type;
   59845          40 :         srvsvc_NetSrvInfo1518_Type.tp_basicsize = pytalloc_BaseObject_size();
   59846             : 
   59847          40 :         srvsvc_NetSrvInfo1520_Type.tp_base = BaseObject_Type;
   59848          40 :         srvsvc_NetSrvInfo1520_Type.tp_basicsize = pytalloc_BaseObject_size();
   59849             : 
   59850          40 :         srvsvc_NetSrvInfo1521_Type.tp_base = BaseObject_Type;
   59851          40 :         srvsvc_NetSrvInfo1521_Type.tp_basicsize = pytalloc_BaseObject_size();
   59852             : 
   59853          40 :         srvsvc_NetSrvInfo1522_Type.tp_base = BaseObject_Type;
   59854          40 :         srvsvc_NetSrvInfo1522_Type.tp_basicsize = pytalloc_BaseObject_size();
   59855             : 
   59856          40 :         srvsvc_NetSrvInfo1523_Type.tp_base = BaseObject_Type;
   59857          40 :         srvsvc_NetSrvInfo1523_Type.tp_basicsize = pytalloc_BaseObject_size();
   59858             : 
   59859          40 :         srvsvc_NetSrvInfo1524_Type.tp_base = BaseObject_Type;
   59860          40 :         srvsvc_NetSrvInfo1524_Type.tp_basicsize = pytalloc_BaseObject_size();
   59861             : 
   59862          40 :         srvsvc_NetSrvInfo1525_Type.tp_base = BaseObject_Type;
   59863          40 :         srvsvc_NetSrvInfo1525_Type.tp_basicsize = pytalloc_BaseObject_size();
   59864             : 
   59865          40 :         srvsvc_NetSrvInfo1528_Type.tp_base = BaseObject_Type;
   59866          40 :         srvsvc_NetSrvInfo1528_Type.tp_basicsize = pytalloc_BaseObject_size();
   59867             : 
   59868          40 :         srvsvc_NetSrvInfo1529_Type.tp_base = BaseObject_Type;
   59869          40 :         srvsvc_NetSrvInfo1529_Type.tp_basicsize = pytalloc_BaseObject_size();
   59870             : 
   59871          40 :         srvsvc_NetSrvInfo1530_Type.tp_base = BaseObject_Type;
   59872          40 :         srvsvc_NetSrvInfo1530_Type.tp_basicsize = pytalloc_BaseObject_size();
   59873             : 
   59874          40 :         srvsvc_NetSrvInfo1533_Type.tp_base = BaseObject_Type;
   59875          40 :         srvsvc_NetSrvInfo1533_Type.tp_basicsize = pytalloc_BaseObject_size();
   59876             : 
   59877          40 :         srvsvc_NetSrvInfo1534_Type.tp_base = BaseObject_Type;
   59878          40 :         srvsvc_NetSrvInfo1534_Type.tp_basicsize = pytalloc_BaseObject_size();
   59879             : 
   59880          40 :         srvsvc_NetSrvInfo1535_Type.tp_base = BaseObject_Type;
   59881          40 :         srvsvc_NetSrvInfo1535_Type.tp_basicsize = pytalloc_BaseObject_size();
   59882             : 
   59883          40 :         srvsvc_NetSrvInfo1536_Type.tp_base = BaseObject_Type;
   59884          40 :         srvsvc_NetSrvInfo1536_Type.tp_basicsize = pytalloc_BaseObject_size();
   59885             : 
   59886          40 :         srvsvc_NetSrvInfo1537_Type.tp_base = BaseObject_Type;
   59887          40 :         srvsvc_NetSrvInfo1537_Type.tp_basicsize = pytalloc_BaseObject_size();
   59888             : 
   59889          40 :         srvsvc_NetSrvInfo1538_Type.tp_base = BaseObject_Type;
   59890          40 :         srvsvc_NetSrvInfo1538_Type.tp_basicsize = pytalloc_BaseObject_size();
   59891             : 
   59892          40 :         srvsvc_NetSrvInfo1539_Type.tp_base = BaseObject_Type;
   59893          40 :         srvsvc_NetSrvInfo1539_Type.tp_basicsize = pytalloc_BaseObject_size();
   59894             : 
   59895          40 :         srvsvc_NetSrvInfo1540_Type.tp_base = BaseObject_Type;
   59896          40 :         srvsvc_NetSrvInfo1540_Type.tp_basicsize = pytalloc_BaseObject_size();
   59897             : 
   59898          40 :         srvsvc_NetSrvInfo1541_Type.tp_base = BaseObject_Type;
   59899          40 :         srvsvc_NetSrvInfo1541_Type.tp_basicsize = pytalloc_BaseObject_size();
   59900             : 
   59901          40 :         srvsvc_NetSrvInfo1542_Type.tp_base = BaseObject_Type;
   59902          40 :         srvsvc_NetSrvInfo1542_Type.tp_basicsize = pytalloc_BaseObject_size();
   59903             : 
   59904          40 :         srvsvc_NetSrvInfo1543_Type.tp_base = BaseObject_Type;
   59905          40 :         srvsvc_NetSrvInfo1543_Type.tp_basicsize = pytalloc_BaseObject_size();
   59906             : 
   59907          40 :         srvsvc_NetSrvInfo1544_Type.tp_base = BaseObject_Type;
   59908          40 :         srvsvc_NetSrvInfo1544_Type.tp_basicsize = pytalloc_BaseObject_size();
   59909             : 
   59910          40 :         srvsvc_NetSrvInfo1545_Type.tp_base = BaseObject_Type;
   59911          40 :         srvsvc_NetSrvInfo1545_Type.tp_basicsize = pytalloc_BaseObject_size();
   59912             : 
   59913          40 :         srvsvc_NetSrvInfo1546_Type.tp_base = BaseObject_Type;
   59914          40 :         srvsvc_NetSrvInfo1546_Type.tp_basicsize = pytalloc_BaseObject_size();
   59915             : 
   59916          40 :         srvsvc_NetSrvInfo1547_Type.tp_base = BaseObject_Type;
   59917          40 :         srvsvc_NetSrvInfo1547_Type.tp_basicsize = pytalloc_BaseObject_size();
   59918             : 
   59919          40 :         srvsvc_NetSrvInfo1548_Type.tp_base = BaseObject_Type;
   59920          40 :         srvsvc_NetSrvInfo1548_Type.tp_basicsize = pytalloc_BaseObject_size();
   59921             : 
   59922          40 :         srvsvc_NetSrvInfo1549_Type.tp_base = BaseObject_Type;
   59923          40 :         srvsvc_NetSrvInfo1549_Type.tp_basicsize = pytalloc_BaseObject_size();
   59924             : 
   59925          40 :         srvsvc_NetSrvInfo1550_Type.tp_base = BaseObject_Type;
   59926          40 :         srvsvc_NetSrvInfo1550_Type.tp_basicsize = pytalloc_BaseObject_size();
   59927             : 
   59928          40 :         srvsvc_NetSrvInfo1552_Type.tp_base = BaseObject_Type;
   59929          40 :         srvsvc_NetSrvInfo1552_Type.tp_basicsize = pytalloc_BaseObject_size();
   59930             : 
   59931          40 :         srvsvc_NetSrvInfo1553_Type.tp_base = BaseObject_Type;
   59932          40 :         srvsvc_NetSrvInfo1553_Type.tp_basicsize = pytalloc_BaseObject_size();
   59933             : 
   59934          40 :         srvsvc_NetSrvInfo1554_Type.tp_base = BaseObject_Type;
   59935          40 :         srvsvc_NetSrvInfo1554_Type.tp_basicsize = pytalloc_BaseObject_size();
   59936             : 
   59937          40 :         srvsvc_NetSrvInfo1555_Type.tp_base = BaseObject_Type;
   59938          40 :         srvsvc_NetSrvInfo1555_Type.tp_basicsize = pytalloc_BaseObject_size();
   59939             : 
   59940          40 :         srvsvc_NetSrvInfo1556_Type.tp_base = BaseObject_Type;
   59941          40 :         srvsvc_NetSrvInfo1556_Type.tp_basicsize = pytalloc_BaseObject_size();
   59942             : 
   59943          40 :         srvsvc_NetSrvInfo_Type.tp_base = BaseObject_Type;
   59944          40 :         srvsvc_NetSrvInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59945             : 
   59946          40 :         srvsvc_NetDiskInfo0_Type.tp_base = BaseObject_Type;
   59947          40 :         srvsvc_NetDiskInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59948             : 
   59949          40 :         srvsvc_NetDiskInfo_Type.tp_base = BaseObject_Type;
   59950          40 :         srvsvc_NetDiskInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59951             : 
   59952          40 :         srvsvc_Statistics_Type.tp_base = BaseObject_Type;
   59953          40 :         srvsvc_Statistics_Type.tp_basicsize = pytalloc_BaseObject_size();
   59954             : 
   59955          40 :         srvsvc_NetTransportInfo0_Type.tp_base = BaseObject_Type;
   59956          40 :         srvsvc_NetTransportInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59957             : 
   59958          40 :         srvsvc_NetTransportCtr0_Type.tp_base = BaseObject_Type;
   59959          40 :         srvsvc_NetTransportCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59960             : 
   59961          40 :         srvsvc_NetTransportInfo1_Type.tp_base = BaseObject_Type;
   59962          40 :         srvsvc_NetTransportInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59963             : 
   59964          40 :         srvsvc_NetTransportCtr1_Type.tp_base = BaseObject_Type;
   59965          40 :         srvsvc_NetTransportCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59966             : 
   59967          40 :         srvsvc_NetTransportInfo2_Type.tp_base = BaseObject_Type;
   59968          40 :         srvsvc_NetTransportInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59969             : 
   59970          40 :         srvsvc_NetTransportCtr2_Type.tp_base = BaseObject_Type;
   59971          40 :         srvsvc_NetTransportCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59972             : 
   59973          40 :         srvsvc_NetTransportInfo3_Type.tp_base = BaseObject_Type;
   59974          40 :         srvsvc_NetTransportInfo3_Type.tp_basicsize = pytalloc_BaseObject_size();
   59975             : 
   59976          40 :         srvsvc_NetTransportCtr3_Type.tp_base = BaseObject_Type;
   59977          40 :         srvsvc_NetTransportCtr3_Type.tp_basicsize = pytalloc_BaseObject_size();
   59978             : 
   59979          40 :         srvsvc_NetTransportCtr_Type.tp_base = BaseObject_Type;
   59980          40 :         srvsvc_NetTransportCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59981             : 
   59982          40 :         srvsvc_NetTransportInfoCtr_Type.tp_base = BaseObject_Type;
   59983          40 :         srvsvc_NetTransportInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59984             : 
   59985          40 :         srvsvc_NetRemoteTODInfo_Type.tp_base = BaseObject_Type;
   59986          40 :         srvsvc_NetRemoteTODInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59987             : 
   59988          40 :         srvsvc_NetTransportInfo_Type.tp_base = BaseObject_Type;
   59989          40 :         srvsvc_NetTransportInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59990             : 
   59991          40 :         srvsvc_NetCharDevEnum_Type.tp_base = BaseObject_Type;
   59992          40 :         srvsvc_NetCharDevEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   59993             : 
   59994          40 :         srvsvc_NetCharDevGetInfo_Type.tp_base = BaseObject_Type;
   59995          40 :         srvsvc_NetCharDevGetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59996             : 
   59997          40 :         srvsvc_NetCharDevControl_Type.tp_base = BaseObject_Type;
   59998          40 :         srvsvc_NetCharDevControl_Type.tp_basicsize = pytalloc_BaseObject_size();
   59999             : 
   60000          40 :         srvsvc_NetCharDevQEnum_Type.tp_base = BaseObject_Type;
   60001          40 :         srvsvc_NetCharDevQEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60002             : 
   60003          40 :         srvsvc_NetCharDevQGetInfo_Type.tp_base = BaseObject_Type;
   60004          40 :         srvsvc_NetCharDevQGetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60005             : 
   60006          40 :         srvsvc_NetCharDevQSetInfo_Type.tp_base = BaseObject_Type;
   60007          40 :         srvsvc_NetCharDevQSetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60008             : 
   60009          40 :         srvsvc_NetCharDevQPurge_Type.tp_base = BaseObject_Type;
   60010          40 :         srvsvc_NetCharDevQPurge_Type.tp_basicsize = pytalloc_BaseObject_size();
   60011             : 
   60012          40 :         srvsvc_NetCharDevQPurgeSelf_Type.tp_base = BaseObject_Type;
   60013          40 :         srvsvc_NetCharDevQPurgeSelf_Type.tp_basicsize = pytalloc_BaseObject_size();
   60014             : 
   60015          40 :         srvsvc_NetConnEnum_Type.tp_base = BaseObject_Type;
   60016          40 :         srvsvc_NetConnEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60017             : 
   60018          40 :         srvsvc_NetFileEnum_Type.tp_base = BaseObject_Type;
   60019          40 :         srvsvc_NetFileEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60020             : 
   60021          40 :         srvsvc_NetFileGetInfo_Type.tp_base = BaseObject_Type;
   60022          40 :         srvsvc_NetFileGetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60023             : 
   60024          40 :         srvsvc_NetFileClose_Type.tp_base = BaseObject_Type;
   60025          40 :         srvsvc_NetFileClose_Type.tp_basicsize = pytalloc_BaseObject_size();
   60026             : 
   60027          40 :         srvsvc_NetSessEnum_Type.tp_base = BaseObject_Type;
   60028          40 :         srvsvc_NetSessEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60029             : 
   60030          40 :         srvsvc_NetSessDel_Type.tp_base = BaseObject_Type;
   60031          40 :         srvsvc_NetSessDel_Type.tp_basicsize = pytalloc_BaseObject_size();
   60032             : 
   60033          40 :         srvsvc_NetShareAdd_Type.tp_base = BaseObject_Type;
   60034          40 :         srvsvc_NetShareAdd_Type.tp_basicsize = pytalloc_BaseObject_size();
   60035             : 
   60036          40 :         srvsvc_NetShareEnumAll_Type.tp_base = BaseObject_Type;
   60037          40 :         srvsvc_NetShareEnumAll_Type.tp_basicsize = pytalloc_BaseObject_size();
   60038             : 
   60039          40 :         srvsvc_NetShareGetInfo_Type.tp_base = BaseObject_Type;
   60040          40 :         srvsvc_NetShareGetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60041             : 
   60042          40 :         srvsvc_NetShareSetInfo_Type.tp_base = BaseObject_Type;
   60043          40 :         srvsvc_NetShareSetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60044             : 
   60045          40 :         srvsvc_NetShareDel_Type.tp_base = BaseObject_Type;
   60046          40 :         srvsvc_NetShareDel_Type.tp_basicsize = pytalloc_BaseObject_size();
   60047             : 
   60048          40 :         srvsvc_NetShareDelSticky_Type.tp_base = BaseObject_Type;
   60049          40 :         srvsvc_NetShareDelSticky_Type.tp_basicsize = pytalloc_BaseObject_size();
   60050             : 
   60051          40 :         srvsvc_NetShareCheck_Type.tp_base = BaseObject_Type;
   60052          40 :         srvsvc_NetShareCheck_Type.tp_basicsize = pytalloc_BaseObject_size();
   60053             : 
   60054          40 :         srvsvc_NetSrvGetInfo_Type.tp_base = BaseObject_Type;
   60055          40 :         srvsvc_NetSrvGetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60056             : 
   60057          40 :         srvsvc_NetSrvSetInfo_Type.tp_base = BaseObject_Type;
   60058          40 :         srvsvc_NetSrvSetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60059             : 
   60060          40 :         srvsvc_NetDiskEnum_Type.tp_base = BaseObject_Type;
   60061          40 :         srvsvc_NetDiskEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60062             : 
   60063          40 :         srvsvc_NetServerStatisticsGet_Type.tp_base = BaseObject_Type;
   60064          40 :         srvsvc_NetServerStatisticsGet_Type.tp_basicsize = pytalloc_BaseObject_size();
   60065             : 
   60066          40 :         srvsvc_NetTransportAdd_Type.tp_base = BaseObject_Type;
   60067          40 :         srvsvc_NetTransportAdd_Type.tp_basicsize = pytalloc_BaseObject_size();
   60068             : 
   60069          40 :         srvsvc_NetTransportEnum_Type.tp_base = BaseObject_Type;
   60070          40 :         srvsvc_NetTransportEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60071             : 
   60072          40 :         srvsvc_NetTransportDel_Type.tp_base = BaseObject_Type;
   60073          40 :         srvsvc_NetTransportDel_Type.tp_basicsize = pytalloc_BaseObject_size();
   60074             : 
   60075          40 :         srvsvc_NetRemoteTOD_Type.tp_base = BaseObject_Type;
   60076          40 :         srvsvc_NetRemoteTOD_Type.tp_basicsize = pytalloc_BaseObject_size();
   60077             : 
   60078          40 :         srvsvc_NetSetServiceBits_Type.tp_base = BaseObject_Type;
   60079          40 :         srvsvc_NetSetServiceBits_Type.tp_basicsize = pytalloc_BaseObject_size();
   60080             : 
   60081          40 :         srvsvc_NetPathType_Type.tp_base = BaseObject_Type;
   60082          40 :         srvsvc_NetPathType_Type.tp_basicsize = pytalloc_BaseObject_size();
   60083             : 
   60084          40 :         srvsvc_NetPathCanonicalize_Type.tp_base = BaseObject_Type;
   60085          40 :         srvsvc_NetPathCanonicalize_Type.tp_basicsize = pytalloc_BaseObject_size();
   60086             : 
   60087          40 :         srvsvc_NetPathCompare_Type.tp_base = BaseObject_Type;
   60088          40 :         srvsvc_NetPathCompare_Type.tp_basicsize = pytalloc_BaseObject_size();
   60089             : 
   60090          40 :         srvsvc_NetNameValidate_Type.tp_base = BaseObject_Type;
   60091          40 :         srvsvc_NetNameValidate_Type.tp_basicsize = pytalloc_BaseObject_size();
   60092             : 
   60093          40 :         srvsvc_NetPRNameCompare_Type.tp_base = BaseObject_Type;
   60094          40 :         srvsvc_NetPRNameCompare_Type.tp_basicsize = pytalloc_BaseObject_size();
   60095             : 
   60096          40 :         srvsvc_NetShareEnum_Type.tp_base = BaseObject_Type;
   60097          40 :         srvsvc_NetShareEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60098             : 
   60099          40 :         srvsvc_NetShareDelStart_Type.tp_base = BaseObject_Type;
   60100          40 :         srvsvc_NetShareDelStart_Type.tp_basicsize = pytalloc_BaseObject_size();
   60101             : 
   60102          40 :         srvsvc_NetShareDelCommit_Type.tp_base = BaseObject_Type;
   60103          40 :         srvsvc_NetShareDelCommit_Type.tp_basicsize = pytalloc_BaseObject_size();
   60104             : 
   60105          40 :         srvsvc_NetGetFileSecurity_Type.tp_base = BaseObject_Type;
   60106          40 :         srvsvc_NetGetFileSecurity_Type.tp_basicsize = pytalloc_BaseObject_size();
   60107             : 
   60108          40 :         srvsvc_NetSetFileSecurity_Type.tp_base = BaseObject_Type;
   60109          40 :         srvsvc_NetSetFileSecurity_Type.tp_basicsize = pytalloc_BaseObject_size();
   60110             : 
   60111          40 :         srvsvc_NetServerTransportAddEx_Type.tp_base = BaseObject_Type;
   60112          40 :         srvsvc_NetServerTransportAddEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   60113             : 
   60114          40 :         srvsvc_NetServerSetServiceBitsEx_Type.tp_base = BaseObject_Type;
   60115          40 :         srvsvc_NetServerSetServiceBitsEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   60116             : 
   60117          40 :         srvsvc_InterfaceType.tp_base = ClientConnection_Type;
   60118             : 
   60119          40 :         srvsvc_SyntaxType.tp_base = ndr_syntax_id_Type;
   60120          40 :         srvsvc_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
   60121             : 
   60122          40 :         if (PyType_Ready(&srvsvc_NetCharDevInfo0_Type) < 0)
   60123           0 :                 goto out;
   60124          40 :         if (PyType_Ready(&srvsvc_NetCharDevCtr0_Type) < 0)
   60125           0 :                 goto out;
   60126          40 :         if (PyType_Ready(&srvsvc_NetCharDevInfo1_Type) < 0)
   60127           0 :                 goto out;
   60128          40 :         if (PyType_Ready(&srvsvc_NetCharDevCtr1_Type) < 0)
   60129           0 :                 goto out;
   60130          40 :         if (PyType_Ready(&srvsvc_NetCharDevInfo_Type) < 0)
   60131           0 :                 goto out;
   60132          40 :         if (PyType_Ready(&srvsvc_NetCharDevCtr_Type) < 0)
   60133           0 :                 goto out;
   60134          40 :         if (PyType_Ready(&srvsvc_NetCharDevInfoCtr_Type) < 0)
   60135           0 :                 goto out;
   60136          40 :         if (PyType_Ready(&srvsvc_NetCharDevQInfo0_Type) < 0)
   60137           0 :                 goto out;
   60138          40 :         if (PyType_Ready(&srvsvc_NetCharDevQCtr0_Type) < 0)
   60139           0 :                 goto out;
   60140          40 :         if (PyType_Ready(&srvsvc_NetCharDevQInfo1_Type) < 0)
   60141           0 :                 goto out;
   60142          40 :         if (PyType_Ready(&srvsvc_NetCharDevQCtr1_Type) < 0)
   60143           0 :                 goto out;
   60144          40 :         if (PyType_Ready(&srvsvc_NetCharDevQInfo_Type) < 0)
   60145           0 :                 goto out;
   60146          40 :         if (PyType_Ready(&srvsvc_NetCharDevQCtr_Type) < 0)
   60147           0 :                 goto out;
   60148          40 :         if (PyType_Ready(&srvsvc_NetCharDevQInfoCtr_Type) < 0)
   60149           0 :                 goto out;
   60150          40 :         if (PyType_Ready(&srvsvc_NetConnInfo0_Type) < 0)
   60151           0 :                 goto out;
   60152          40 :         if (PyType_Ready(&srvsvc_NetConnCtr0_Type) < 0)
   60153           0 :                 goto out;
   60154          40 :         if (PyType_Ready(&srvsvc_NetConnInfo1_Type) < 0)
   60155           0 :                 goto out;
   60156          40 :         if (PyType_Ready(&srvsvc_NetConnCtr1_Type) < 0)
   60157           0 :                 goto out;
   60158          40 :         if (PyType_Ready(&srvsvc_NetConnCtr_Type) < 0)
   60159           0 :                 goto out;
   60160          40 :         if (PyType_Ready(&srvsvc_NetConnInfoCtr_Type) < 0)
   60161           0 :                 goto out;
   60162          40 :         if (PyType_Ready(&srvsvc_NetFileInfo2_Type) < 0)
   60163           0 :                 goto out;
   60164          40 :         if (PyType_Ready(&srvsvc_NetFileCtr2_Type) < 0)
   60165           0 :                 goto out;
   60166          40 :         if (PyType_Ready(&srvsvc_NetFileInfo3_Type) < 0)
   60167           0 :                 goto out;
   60168          40 :         if (PyType_Ready(&srvsvc_NetFileCtr3_Type) < 0)
   60169           0 :                 goto out;
   60170          40 :         if (PyType_Ready(&srvsvc_NetFileInfo_Type) < 0)
   60171           0 :                 goto out;
   60172          40 :         if (PyType_Ready(&srvsvc_NetFileCtr_Type) < 0)
   60173           0 :                 goto out;
   60174          40 :         if (PyType_Ready(&srvsvc_NetFileInfoCtr_Type) < 0)
   60175           0 :                 goto out;
   60176          40 :         if (PyType_Ready(&srvsvc_NetSessInfo0_Type) < 0)
   60177           0 :                 goto out;
   60178          40 :         if (PyType_Ready(&srvsvc_NetSessCtr0_Type) < 0)
   60179           0 :                 goto out;
   60180          40 :         if (PyType_Ready(&srvsvc_NetSessInfo1_Type) < 0)
   60181           0 :                 goto out;
   60182          40 :         if (PyType_Ready(&srvsvc_NetSessCtr1_Type) < 0)
   60183           0 :                 goto out;
   60184          40 :         if (PyType_Ready(&srvsvc_NetSessInfo2_Type) < 0)
   60185           0 :                 goto out;
   60186          40 :         if (PyType_Ready(&srvsvc_NetSessCtr2_Type) < 0)
   60187           0 :                 goto out;
   60188          40 :         if (PyType_Ready(&srvsvc_NetSessInfo10_Type) < 0)
   60189           0 :                 goto out;
   60190          40 :         if (PyType_Ready(&srvsvc_NetSessCtr10_Type) < 0)
   60191           0 :                 goto out;
   60192          40 :         if (PyType_Ready(&srvsvc_NetSessInfo502_Type) < 0)
   60193           0 :                 goto out;
   60194          40 :         if (PyType_Ready(&srvsvc_NetSessCtr502_Type) < 0)
   60195           0 :                 goto out;
   60196          40 :         if (PyType_Ready(&srvsvc_NetSessCtr_Type) < 0)
   60197           0 :                 goto out;
   60198          40 :         if (PyType_Ready(&srvsvc_NetSessInfoCtr_Type) < 0)
   60199           0 :                 goto out;
   60200          40 :         if (PyType_Ready(&srvsvc_NetShareInfo0_Type) < 0)
   60201           0 :                 goto out;
   60202          40 :         if (PyType_Ready(&srvsvc_NetShareCtr0_Type) < 0)
   60203           0 :                 goto out;
   60204          40 :         if (PyType_Ready(&srvsvc_NetShareInfo1_Type) < 0)
   60205           0 :                 goto out;
   60206          40 :         if (PyType_Ready(&srvsvc_NetShareCtr1_Type) < 0)
   60207           0 :                 goto out;
   60208          40 :         if (PyType_Ready(&srvsvc_NetShareInfo2_Type) < 0)
   60209           0 :                 goto out;
   60210          40 :         if (PyType_Ready(&srvsvc_NetShareCtr2_Type) < 0)
   60211           0 :                 goto out;
   60212          40 :         if (PyType_Ready(&srvsvc_NetShareInfo501_Type) < 0)
   60213           0 :                 goto out;
   60214          40 :         if (PyType_Ready(&srvsvc_NetShareCtr501_Type) < 0)
   60215           0 :                 goto out;
   60216          40 :         if (PyType_Ready(&srvsvc_NetShareInfo502_Type) < 0)
   60217           0 :                 goto out;
   60218          40 :         if (PyType_Ready(&srvsvc_NetShareCtr502_Type) < 0)
   60219           0 :                 goto out;
   60220          40 :         if (PyType_Ready(&srvsvc_NetShareInfo1004_Type) < 0)
   60221           0 :                 goto out;
   60222          40 :         if (PyType_Ready(&srvsvc_NetShareCtr1004_Type) < 0)
   60223           0 :                 goto out;
   60224          40 :         if (PyType_Ready(&srvsvc_NetShareInfo1005_Type) < 0)
   60225           0 :                 goto out;
   60226          40 :         if (PyType_Ready(&srvsvc_NetShareCtr1005_Type) < 0)
   60227           0 :                 goto out;
   60228          40 :         if (PyType_Ready(&srvsvc_NetShareInfo1006_Type) < 0)
   60229           0 :                 goto out;
   60230          40 :         if (PyType_Ready(&srvsvc_NetShareCtr1006_Type) < 0)
   60231           0 :                 goto out;
   60232          40 :         if (PyType_Ready(&srvsvc_NetShareInfo1007_Type) < 0)
   60233           0 :                 goto out;
   60234          40 :         if (PyType_Ready(&srvsvc_NetShareCtr1007_Type) < 0)
   60235           0 :                 goto out;
   60236          40 :         if (PyType_Ready(&srvsvc_NetShareCtr1501_Type) < 0)
   60237           0 :                 goto out;
   60238          40 :         if (PyType_Ready(&srvsvc_NetShareInfo_Type) < 0)
   60239           0 :                 goto out;
   60240          40 :         if (PyType_Ready(&srvsvc_NetShareCtr_Type) < 0)
   60241           0 :                 goto out;
   60242          40 :         if (PyType_Ready(&srvsvc_NetShareInfoCtr_Type) < 0)
   60243           0 :                 goto out;
   60244          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo100_Type) < 0)
   60245           0 :                 goto out;
   60246          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo101_Type) < 0)
   60247           0 :                 goto out;
   60248          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo102_Type) < 0)
   60249           0 :                 goto out;
   60250          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo402_Type) < 0)
   60251           0 :                 goto out;
   60252          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo403_Type) < 0)
   60253           0 :                 goto out;
   60254          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo502_Type) < 0)
   60255           0 :                 goto out;
   60256          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo503_Type) < 0)
   60257           0 :                 goto out;
   60258          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo599_Type) < 0)
   60259           0 :                 goto out;
   60260          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1005_Type) < 0)
   60261           0 :                 goto out;
   60262          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1010_Type) < 0)
   60263           0 :                 goto out;
   60264          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1016_Type) < 0)
   60265           0 :                 goto out;
   60266          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1017_Type) < 0)
   60267           0 :                 goto out;
   60268          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1018_Type) < 0)
   60269           0 :                 goto out;
   60270          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1107_Type) < 0)
   60271           0 :                 goto out;
   60272          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1501_Type) < 0)
   60273           0 :                 goto out;
   60274          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1502_Type) < 0)
   60275           0 :                 goto out;
   60276          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1503_Type) < 0)
   60277           0 :                 goto out;
   60278          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1506_Type) < 0)
   60279           0 :                 goto out;
   60280          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1509_Type) < 0)
   60281           0 :                 goto out;
   60282          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1510_Type) < 0)
   60283           0 :                 goto out;
   60284          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1511_Type) < 0)
   60285           0 :                 goto out;
   60286          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1512_Type) < 0)
   60287           0 :                 goto out;
   60288          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1513_Type) < 0)
   60289           0 :                 goto out;
   60290          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1514_Type) < 0)
   60291           0 :                 goto out;
   60292          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1515_Type) < 0)
   60293           0 :                 goto out;
   60294          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1516_Type) < 0)
   60295           0 :                 goto out;
   60296          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1518_Type) < 0)
   60297           0 :                 goto out;
   60298          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1520_Type) < 0)
   60299           0 :                 goto out;
   60300          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1521_Type) < 0)
   60301           0 :                 goto out;
   60302          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1522_Type) < 0)
   60303           0 :                 goto out;
   60304          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1523_Type) < 0)
   60305           0 :                 goto out;
   60306          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1524_Type) < 0)
   60307           0 :                 goto out;
   60308          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1525_Type) < 0)
   60309           0 :                 goto out;
   60310          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1528_Type) < 0)
   60311           0 :                 goto out;
   60312          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1529_Type) < 0)
   60313           0 :                 goto out;
   60314          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1530_Type) < 0)
   60315           0 :                 goto out;
   60316          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1533_Type) < 0)
   60317           0 :                 goto out;
   60318          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1534_Type) < 0)
   60319           0 :                 goto out;
   60320          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1535_Type) < 0)
   60321           0 :                 goto out;
   60322          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1536_Type) < 0)
   60323           0 :                 goto out;
   60324          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1537_Type) < 0)
   60325           0 :                 goto out;
   60326          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1538_Type) < 0)
   60327           0 :                 goto out;
   60328          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1539_Type) < 0)
   60329           0 :                 goto out;
   60330          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1540_Type) < 0)
   60331           0 :                 goto out;
   60332          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1541_Type) < 0)
   60333           0 :                 goto out;
   60334          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1542_Type) < 0)
   60335           0 :                 goto out;
   60336          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1543_Type) < 0)
   60337           0 :                 goto out;
   60338          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1544_Type) < 0)
   60339           0 :                 goto out;
   60340          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1545_Type) < 0)
   60341           0 :                 goto out;
   60342          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1546_Type) < 0)
   60343           0 :                 goto out;
   60344          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1547_Type) < 0)
   60345           0 :                 goto out;
   60346          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1548_Type) < 0)
   60347           0 :                 goto out;
   60348          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1549_Type) < 0)
   60349           0 :                 goto out;
   60350          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1550_Type) < 0)
   60351           0 :                 goto out;
   60352          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1552_Type) < 0)
   60353           0 :                 goto out;
   60354          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1553_Type) < 0)
   60355           0 :                 goto out;
   60356          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1554_Type) < 0)
   60357           0 :                 goto out;
   60358          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1555_Type) < 0)
   60359           0 :                 goto out;
   60360          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo1556_Type) < 0)
   60361           0 :                 goto out;
   60362          40 :         if (PyType_Ready(&srvsvc_NetSrvInfo_Type) < 0)
   60363           0 :                 goto out;
   60364          40 :         if (PyType_Ready(&srvsvc_NetDiskInfo0_Type) < 0)
   60365           0 :                 goto out;
   60366          40 :         if (PyType_Ready(&srvsvc_NetDiskInfo_Type) < 0)
   60367           0 :                 goto out;
   60368          40 :         if (PyType_Ready(&srvsvc_Statistics_Type) < 0)
   60369           0 :                 goto out;
   60370          40 :         if (PyType_Ready(&srvsvc_NetTransportInfo0_Type) < 0)
   60371           0 :                 goto out;
   60372          40 :         if (PyType_Ready(&srvsvc_NetTransportCtr0_Type) < 0)
   60373           0 :                 goto out;
   60374          40 :         if (PyType_Ready(&srvsvc_NetTransportInfo1_Type) < 0)
   60375           0 :                 goto out;
   60376          40 :         if (PyType_Ready(&srvsvc_NetTransportCtr1_Type) < 0)
   60377           0 :                 goto out;
   60378          40 :         if (PyType_Ready(&srvsvc_NetTransportInfo2_Type) < 0)
   60379           0 :                 goto out;
   60380          40 :         if (PyType_Ready(&srvsvc_NetTransportCtr2_Type) < 0)
   60381           0 :                 goto out;
   60382          40 :         if (PyType_Ready(&srvsvc_NetTransportInfo3_Type) < 0)
   60383           0 :                 goto out;
   60384          40 :         if (PyType_Ready(&srvsvc_NetTransportCtr3_Type) < 0)
   60385           0 :                 goto out;
   60386          40 :         if (PyType_Ready(&srvsvc_NetTransportCtr_Type) < 0)
   60387           0 :                 goto out;
   60388          40 :         if (PyType_Ready(&srvsvc_NetTransportInfoCtr_Type) < 0)
   60389           0 :                 goto out;
   60390          40 :         if (PyType_Ready(&srvsvc_NetRemoteTODInfo_Type) < 0)
   60391           0 :                 goto out;
   60392          40 :         if (PyType_Ready(&srvsvc_NetTransportInfo_Type) < 0)
   60393           0 :                 goto out;
   60394          40 :         if (PyType_Ready(&srvsvc_NetCharDevEnum_Type) < 0)
   60395           0 :                 goto out;
   60396          40 :         if (PyType_Ready(&srvsvc_NetCharDevGetInfo_Type) < 0)
   60397           0 :                 goto out;
   60398          40 :         if (PyType_Ready(&srvsvc_NetCharDevControl_Type) < 0)
   60399           0 :                 goto out;
   60400          40 :         if (PyType_Ready(&srvsvc_NetCharDevQEnum_Type) < 0)
   60401           0 :                 goto out;
   60402          40 :         if (PyType_Ready(&srvsvc_NetCharDevQGetInfo_Type) < 0)
   60403           0 :                 goto out;
   60404          40 :         if (PyType_Ready(&srvsvc_NetCharDevQSetInfo_Type) < 0)
   60405           0 :                 goto out;
   60406          40 :         if (PyType_Ready(&srvsvc_NetCharDevQPurge_Type) < 0)
   60407           0 :                 goto out;
   60408          40 :         if (PyType_Ready(&srvsvc_NetCharDevQPurgeSelf_Type) < 0)
   60409           0 :                 goto out;
   60410          40 :         if (PyType_Ready(&srvsvc_NetConnEnum_Type) < 0)
   60411           0 :                 goto out;
   60412          40 :         if (PyType_Ready(&srvsvc_NetFileEnum_Type) < 0)
   60413           0 :                 goto out;
   60414          40 :         if (PyType_Ready(&srvsvc_NetFileGetInfo_Type) < 0)
   60415           0 :                 goto out;
   60416          40 :         if (PyType_Ready(&srvsvc_NetFileClose_Type) < 0)
   60417           0 :                 goto out;
   60418          40 :         if (PyType_Ready(&srvsvc_NetSessEnum_Type) < 0)
   60419           0 :                 goto out;
   60420          40 :         if (PyType_Ready(&srvsvc_NetSessDel_Type) < 0)
   60421           0 :                 goto out;
   60422          40 :         if (PyType_Ready(&srvsvc_NetShareAdd_Type) < 0)
   60423           0 :                 goto out;
   60424          40 :         if (PyType_Ready(&srvsvc_NetShareEnumAll_Type) < 0)
   60425           0 :                 goto out;
   60426          40 :         if (PyType_Ready(&srvsvc_NetShareGetInfo_Type) < 0)
   60427           0 :                 goto out;
   60428          40 :         if (PyType_Ready(&srvsvc_NetShareSetInfo_Type) < 0)
   60429           0 :                 goto out;
   60430          40 :         if (PyType_Ready(&srvsvc_NetShareDel_Type) < 0)
   60431           0 :                 goto out;
   60432          40 :         if (PyType_Ready(&srvsvc_NetShareDelSticky_Type) < 0)
   60433           0 :                 goto out;
   60434          40 :         if (PyType_Ready(&srvsvc_NetShareCheck_Type) < 0)
   60435           0 :                 goto out;
   60436          40 :         if (PyType_Ready(&srvsvc_NetSrvGetInfo_Type) < 0)
   60437           0 :                 goto out;
   60438          40 :         if (PyType_Ready(&srvsvc_NetSrvSetInfo_Type) < 0)
   60439           0 :                 goto out;
   60440          40 :         if (PyType_Ready(&srvsvc_NetDiskEnum_Type) < 0)
   60441           0 :                 goto out;
   60442          40 :         if (PyType_Ready(&srvsvc_NetServerStatisticsGet_Type) < 0)
   60443           0 :                 goto out;
   60444          40 :         if (PyType_Ready(&srvsvc_NetTransportAdd_Type) < 0)
   60445           0 :                 goto out;
   60446          40 :         if (PyType_Ready(&srvsvc_NetTransportEnum_Type) < 0)
   60447           0 :                 goto out;
   60448          40 :         if (PyType_Ready(&srvsvc_NetTransportDel_Type) < 0)
   60449           0 :                 goto out;
   60450          40 :         if (PyType_Ready(&srvsvc_NetRemoteTOD_Type) < 0)
   60451           0 :                 goto out;
   60452          40 :         if (PyType_Ready(&srvsvc_NetSetServiceBits_Type) < 0)
   60453           0 :                 goto out;
   60454          40 :         if (PyType_Ready(&srvsvc_NetPathType_Type) < 0)
   60455           0 :                 goto out;
   60456          40 :         if (PyType_Ready(&srvsvc_NetPathCanonicalize_Type) < 0)
   60457           0 :                 goto out;
   60458          40 :         if (PyType_Ready(&srvsvc_NetPathCompare_Type) < 0)
   60459           0 :                 goto out;
   60460          40 :         if (PyType_Ready(&srvsvc_NetNameValidate_Type) < 0)
   60461           0 :                 goto out;
   60462          40 :         if (PyType_Ready(&srvsvc_NetPRNameCompare_Type) < 0)
   60463           0 :                 goto out;
   60464          40 :         if (PyType_Ready(&srvsvc_NetShareEnum_Type) < 0)
   60465           0 :                 goto out;
   60466          40 :         if (PyType_Ready(&srvsvc_NetShareDelStart_Type) < 0)
   60467           0 :                 goto out;
   60468          40 :         if (PyType_Ready(&srvsvc_NetShareDelCommit_Type) < 0)
   60469           0 :                 goto out;
   60470          40 :         if (PyType_Ready(&srvsvc_NetGetFileSecurity_Type) < 0)
   60471           0 :                 goto out;
   60472          40 :         if (PyType_Ready(&srvsvc_NetSetFileSecurity_Type) < 0)
   60473           0 :                 goto out;
   60474          40 :         if (PyType_Ready(&srvsvc_NetServerTransportAddEx_Type) < 0)
   60475           0 :                 goto out;
   60476          40 :         if (PyType_Ready(&srvsvc_NetServerSetServiceBitsEx_Type) < 0)
   60477           0 :                 goto out;
   60478          40 :         if (PyType_Ready(&srvsvc_InterfaceType) < 0)
   60479           0 :                 goto out;
   60480          40 :         if (PyType_Ready(&srvsvc_SyntaxType) < 0)
   60481           0 :                 goto out;
   60482          40 :         if (!PyInterface_AddNdrRpcMethods(&srvsvc_InterfaceType, py_ndr_srvsvc_methods))
   60483           0 :                 return NULL;
   60484             : 
   60485             : #ifdef PY_NETCHARDEVINFO0_PATCH
   60486             :         PY_NETCHARDEVINFO0_PATCH(&srvsvc_NetCharDevInfo0_Type);
   60487             : #endif
   60488             : #ifdef PY_NETCHARDEVCTR0_PATCH
   60489             :         PY_NETCHARDEVCTR0_PATCH(&srvsvc_NetCharDevCtr0_Type);
   60490             : #endif
   60491             : #ifdef PY_NETCHARDEVINFO1_PATCH
   60492             :         PY_NETCHARDEVINFO1_PATCH(&srvsvc_NetCharDevInfo1_Type);
   60493             : #endif
   60494             : #ifdef PY_NETCHARDEVCTR1_PATCH
   60495             :         PY_NETCHARDEVCTR1_PATCH(&srvsvc_NetCharDevCtr1_Type);
   60496             : #endif
   60497             : #ifdef PY_NETCHARDEVINFO_PATCH
   60498             :         PY_NETCHARDEVINFO_PATCH(&srvsvc_NetCharDevInfo_Type);
   60499             : #endif
   60500             : #ifdef PY_NETCHARDEVCTR_PATCH
   60501             :         PY_NETCHARDEVCTR_PATCH(&srvsvc_NetCharDevCtr_Type);
   60502             : #endif
   60503             : #ifdef PY_NETCHARDEVINFOCTR_PATCH
   60504             :         PY_NETCHARDEVINFOCTR_PATCH(&srvsvc_NetCharDevInfoCtr_Type);
   60505             : #endif
   60506             : #ifdef PY_NETCHARDEVQINFO0_PATCH
   60507             :         PY_NETCHARDEVQINFO0_PATCH(&srvsvc_NetCharDevQInfo0_Type);
   60508             : #endif
   60509             : #ifdef PY_NETCHARDEVQCTR0_PATCH
   60510             :         PY_NETCHARDEVQCTR0_PATCH(&srvsvc_NetCharDevQCtr0_Type);
   60511             : #endif
   60512             : #ifdef PY_NETCHARDEVQINFO1_PATCH
   60513             :         PY_NETCHARDEVQINFO1_PATCH(&srvsvc_NetCharDevQInfo1_Type);
   60514             : #endif
   60515             : #ifdef PY_NETCHARDEVQCTR1_PATCH
   60516             :         PY_NETCHARDEVQCTR1_PATCH(&srvsvc_NetCharDevQCtr1_Type);
   60517             : #endif
   60518             : #ifdef PY_NETCHARDEVQINFO_PATCH
   60519             :         PY_NETCHARDEVQINFO_PATCH(&srvsvc_NetCharDevQInfo_Type);
   60520             : #endif
   60521             : #ifdef PY_NETCHARDEVQCTR_PATCH
   60522             :         PY_NETCHARDEVQCTR_PATCH(&srvsvc_NetCharDevQCtr_Type);
   60523             : #endif
   60524             : #ifdef PY_NETCHARDEVQINFOCTR_PATCH
   60525             :         PY_NETCHARDEVQINFOCTR_PATCH(&srvsvc_NetCharDevQInfoCtr_Type);
   60526             : #endif
   60527             : #ifdef PY_NETCONNINFO0_PATCH
   60528             :         PY_NETCONNINFO0_PATCH(&srvsvc_NetConnInfo0_Type);
   60529             : #endif
   60530             : #ifdef PY_NETCONNCTR0_PATCH
   60531             :         PY_NETCONNCTR0_PATCH(&srvsvc_NetConnCtr0_Type);
   60532             : #endif
   60533             : #ifdef PY_NETCONNINFO1_PATCH
   60534             :         PY_NETCONNINFO1_PATCH(&srvsvc_NetConnInfo1_Type);
   60535             : #endif
   60536             : #ifdef PY_NETCONNCTR1_PATCH
   60537             :         PY_NETCONNCTR1_PATCH(&srvsvc_NetConnCtr1_Type);
   60538             : #endif
   60539             : #ifdef PY_NETCONNCTR_PATCH
   60540             :         PY_NETCONNCTR_PATCH(&srvsvc_NetConnCtr_Type);
   60541             : #endif
   60542             : #ifdef PY_NETCONNINFOCTR_PATCH
   60543             :         PY_NETCONNINFOCTR_PATCH(&srvsvc_NetConnInfoCtr_Type);
   60544             : #endif
   60545             : #ifdef PY_NETFILEINFO2_PATCH
   60546             :         PY_NETFILEINFO2_PATCH(&srvsvc_NetFileInfo2_Type);
   60547             : #endif
   60548             : #ifdef PY_NETFILECTR2_PATCH
   60549             :         PY_NETFILECTR2_PATCH(&srvsvc_NetFileCtr2_Type);
   60550             : #endif
   60551             : #ifdef PY_NETFILEINFO3_PATCH
   60552             :         PY_NETFILEINFO3_PATCH(&srvsvc_NetFileInfo3_Type);
   60553             : #endif
   60554             : #ifdef PY_NETFILECTR3_PATCH
   60555             :         PY_NETFILECTR3_PATCH(&srvsvc_NetFileCtr3_Type);
   60556             : #endif
   60557             : #ifdef PY_NETFILEINFO_PATCH
   60558             :         PY_NETFILEINFO_PATCH(&srvsvc_NetFileInfo_Type);
   60559             : #endif
   60560             : #ifdef PY_NETFILECTR_PATCH
   60561             :         PY_NETFILECTR_PATCH(&srvsvc_NetFileCtr_Type);
   60562             : #endif
   60563             : #ifdef PY_NETFILEINFOCTR_PATCH
   60564             :         PY_NETFILEINFOCTR_PATCH(&srvsvc_NetFileInfoCtr_Type);
   60565             : #endif
   60566             : #ifdef PY_NETSESSINFO0_PATCH
   60567             :         PY_NETSESSINFO0_PATCH(&srvsvc_NetSessInfo0_Type);
   60568             : #endif
   60569             : #ifdef PY_NETSESSCTR0_PATCH
   60570             :         PY_NETSESSCTR0_PATCH(&srvsvc_NetSessCtr0_Type);
   60571             : #endif
   60572             : #ifdef PY_NETSESSINFO1_PATCH
   60573             :         PY_NETSESSINFO1_PATCH(&srvsvc_NetSessInfo1_Type);
   60574             : #endif
   60575             : #ifdef PY_NETSESSCTR1_PATCH
   60576             :         PY_NETSESSCTR1_PATCH(&srvsvc_NetSessCtr1_Type);
   60577             : #endif
   60578             : #ifdef PY_NETSESSINFO2_PATCH
   60579             :         PY_NETSESSINFO2_PATCH(&srvsvc_NetSessInfo2_Type);
   60580             : #endif
   60581             : #ifdef PY_NETSESSCTR2_PATCH
   60582             :         PY_NETSESSCTR2_PATCH(&srvsvc_NetSessCtr2_Type);
   60583             : #endif
   60584             : #ifdef PY_NETSESSINFO10_PATCH
   60585             :         PY_NETSESSINFO10_PATCH(&srvsvc_NetSessInfo10_Type);
   60586             : #endif
   60587             : #ifdef PY_NETSESSCTR10_PATCH
   60588             :         PY_NETSESSCTR10_PATCH(&srvsvc_NetSessCtr10_Type);
   60589             : #endif
   60590             : #ifdef PY_NETSESSINFO502_PATCH
   60591             :         PY_NETSESSINFO502_PATCH(&srvsvc_NetSessInfo502_Type);
   60592             : #endif
   60593             : #ifdef PY_NETSESSCTR502_PATCH
   60594             :         PY_NETSESSCTR502_PATCH(&srvsvc_NetSessCtr502_Type);
   60595             : #endif
   60596             : #ifdef PY_NETSESSCTR_PATCH
   60597             :         PY_NETSESSCTR_PATCH(&srvsvc_NetSessCtr_Type);
   60598             : #endif
   60599             : #ifdef PY_NETSESSINFOCTR_PATCH
   60600             :         PY_NETSESSINFOCTR_PATCH(&srvsvc_NetSessInfoCtr_Type);
   60601             : #endif
   60602             : #ifdef PY_NETSHAREINFO0_PATCH
   60603             :         PY_NETSHAREINFO0_PATCH(&srvsvc_NetShareInfo0_Type);
   60604             : #endif
   60605             : #ifdef PY_NETSHARECTR0_PATCH
   60606             :         PY_NETSHARECTR0_PATCH(&srvsvc_NetShareCtr0_Type);
   60607             : #endif
   60608             : #ifdef PY_NETSHAREINFO1_PATCH
   60609             :         PY_NETSHAREINFO1_PATCH(&srvsvc_NetShareInfo1_Type);
   60610             : #endif
   60611             : #ifdef PY_NETSHARECTR1_PATCH
   60612             :         PY_NETSHARECTR1_PATCH(&srvsvc_NetShareCtr1_Type);
   60613             : #endif
   60614             : #ifdef PY_NETSHAREINFO2_PATCH
   60615             :         PY_NETSHAREINFO2_PATCH(&srvsvc_NetShareInfo2_Type);
   60616             : #endif
   60617             : #ifdef PY_NETSHARECTR2_PATCH
   60618             :         PY_NETSHARECTR2_PATCH(&srvsvc_NetShareCtr2_Type);
   60619             : #endif
   60620             : #ifdef PY_NETSHAREINFO501_PATCH
   60621             :         PY_NETSHAREINFO501_PATCH(&srvsvc_NetShareInfo501_Type);
   60622             : #endif
   60623             : #ifdef PY_NETSHARECTR501_PATCH
   60624             :         PY_NETSHARECTR501_PATCH(&srvsvc_NetShareCtr501_Type);
   60625             : #endif
   60626             : #ifdef PY_NETSHAREINFO502_PATCH
   60627             :         PY_NETSHAREINFO502_PATCH(&srvsvc_NetShareInfo502_Type);
   60628             : #endif
   60629             : #ifdef PY_NETSHARECTR502_PATCH
   60630             :         PY_NETSHARECTR502_PATCH(&srvsvc_NetShareCtr502_Type);
   60631             : #endif
   60632             : #ifdef PY_NETSHAREINFO1004_PATCH
   60633             :         PY_NETSHAREINFO1004_PATCH(&srvsvc_NetShareInfo1004_Type);
   60634             : #endif
   60635             : #ifdef PY_NETSHARECTR1004_PATCH
   60636             :         PY_NETSHARECTR1004_PATCH(&srvsvc_NetShareCtr1004_Type);
   60637             : #endif
   60638             : #ifdef PY_NETSHAREINFO1005_PATCH
   60639             :         PY_NETSHAREINFO1005_PATCH(&srvsvc_NetShareInfo1005_Type);
   60640             : #endif
   60641             : #ifdef PY_NETSHARECTR1005_PATCH
   60642             :         PY_NETSHARECTR1005_PATCH(&srvsvc_NetShareCtr1005_Type);
   60643             : #endif
   60644             : #ifdef PY_NETSHAREINFO1006_PATCH
   60645             :         PY_NETSHAREINFO1006_PATCH(&srvsvc_NetShareInfo1006_Type);
   60646             : #endif
   60647             : #ifdef PY_NETSHARECTR1006_PATCH
   60648             :         PY_NETSHARECTR1006_PATCH(&srvsvc_NetShareCtr1006_Type);
   60649             : #endif
   60650             : #ifdef PY_NETSHAREINFO1007_PATCH
   60651             :         PY_NETSHAREINFO1007_PATCH(&srvsvc_NetShareInfo1007_Type);
   60652             : #endif
   60653             : #ifdef PY_NETSHARECTR1007_PATCH
   60654             :         PY_NETSHARECTR1007_PATCH(&srvsvc_NetShareCtr1007_Type);
   60655             : #endif
   60656             : #ifdef PY_NETSHARECTR1501_PATCH
   60657             :         PY_NETSHARECTR1501_PATCH(&srvsvc_NetShareCtr1501_Type);
   60658             : #endif
   60659             : #ifdef PY_NETSHAREINFO_PATCH
   60660             :         PY_NETSHAREINFO_PATCH(&srvsvc_NetShareInfo_Type);
   60661             : #endif
   60662             : #ifdef PY_NETSHARECTR_PATCH
   60663             :         PY_NETSHARECTR_PATCH(&srvsvc_NetShareCtr_Type);
   60664             : #endif
   60665             : #ifdef PY_NETSHAREINFOCTR_PATCH
   60666             :         PY_NETSHAREINFOCTR_PATCH(&srvsvc_NetShareInfoCtr_Type);
   60667             : #endif
   60668             : #ifdef PY_NETSRVINFO100_PATCH
   60669             :         PY_NETSRVINFO100_PATCH(&srvsvc_NetSrvInfo100_Type);
   60670             : #endif
   60671             : #ifdef PY_NETSRVINFO101_PATCH
   60672             :         PY_NETSRVINFO101_PATCH(&srvsvc_NetSrvInfo101_Type);
   60673             : #endif
   60674             : #ifdef PY_NETSRVINFO102_PATCH
   60675             :         PY_NETSRVINFO102_PATCH(&srvsvc_NetSrvInfo102_Type);
   60676             : #endif
   60677             : #ifdef PY_NETSRVINFO402_PATCH
   60678             :         PY_NETSRVINFO402_PATCH(&srvsvc_NetSrvInfo402_Type);
   60679             : #endif
   60680             : #ifdef PY_NETSRVINFO403_PATCH
   60681             :         PY_NETSRVINFO403_PATCH(&srvsvc_NetSrvInfo403_Type);
   60682             : #endif
   60683             : #ifdef PY_NETSRVINFO502_PATCH
   60684             :         PY_NETSRVINFO502_PATCH(&srvsvc_NetSrvInfo502_Type);
   60685             : #endif
   60686             : #ifdef PY_NETSRVINFO503_PATCH
   60687             :         PY_NETSRVINFO503_PATCH(&srvsvc_NetSrvInfo503_Type);
   60688             : #endif
   60689             : #ifdef PY_NETSRVINFO599_PATCH
   60690             :         PY_NETSRVINFO599_PATCH(&srvsvc_NetSrvInfo599_Type);
   60691             : #endif
   60692             : #ifdef PY_NETSRVINFO1005_PATCH
   60693             :         PY_NETSRVINFO1005_PATCH(&srvsvc_NetSrvInfo1005_Type);
   60694             : #endif
   60695             : #ifdef PY_NETSRVINFO1010_PATCH
   60696             :         PY_NETSRVINFO1010_PATCH(&srvsvc_NetSrvInfo1010_Type);
   60697             : #endif
   60698             : #ifdef PY_NETSRVINFO1016_PATCH
   60699             :         PY_NETSRVINFO1016_PATCH(&srvsvc_NetSrvInfo1016_Type);
   60700             : #endif
   60701             : #ifdef PY_NETSRVINFO1017_PATCH
   60702             :         PY_NETSRVINFO1017_PATCH(&srvsvc_NetSrvInfo1017_Type);
   60703             : #endif
   60704             : #ifdef PY_NETSRVINFO1018_PATCH
   60705             :         PY_NETSRVINFO1018_PATCH(&srvsvc_NetSrvInfo1018_Type);
   60706             : #endif
   60707             : #ifdef PY_NETSRVINFO1107_PATCH
   60708             :         PY_NETSRVINFO1107_PATCH(&srvsvc_NetSrvInfo1107_Type);
   60709             : #endif
   60710             : #ifdef PY_NETSRVINFO1501_PATCH
   60711             :         PY_NETSRVINFO1501_PATCH(&srvsvc_NetSrvInfo1501_Type);
   60712             : #endif
   60713             : #ifdef PY_NETSRVINFO1502_PATCH
   60714             :         PY_NETSRVINFO1502_PATCH(&srvsvc_NetSrvInfo1502_Type);
   60715             : #endif
   60716             : #ifdef PY_NETSRVINFO1503_PATCH
   60717             :         PY_NETSRVINFO1503_PATCH(&srvsvc_NetSrvInfo1503_Type);
   60718             : #endif
   60719             : #ifdef PY_NETSRVINFO1506_PATCH
   60720             :         PY_NETSRVINFO1506_PATCH(&srvsvc_NetSrvInfo1506_Type);
   60721             : #endif
   60722             : #ifdef PY_NETSRVINFO1509_PATCH
   60723             :         PY_NETSRVINFO1509_PATCH(&srvsvc_NetSrvInfo1509_Type);
   60724             : #endif
   60725             : #ifdef PY_NETSRVINFO1510_PATCH
   60726             :         PY_NETSRVINFO1510_PATCH(&srvsvc_NetSrvInfo1510_Type);
   60727             : #endif
   60728             : #ifdef PY_NETSRVINFO1511_PATCH
   60729             :         PY_NETSRVINFO1511_PATCH(&srvsvc_NetSrvInfo1511_Type);
   60730             : #endif
   60731             : #ifdef PY_NETSRVINFO1512_PATCH
   60732             :         PY_NETSRVINFO1512_PATCH(&srvsvc_NetSrvInfo1512_Type);
   60733             : #endif
   60734             : #ifdef PY_NETSRVINFO1513_PATCH
   60735             :         PY_NETSRVINFO1513_PATCH(&srvsvc_NetSrvInfo1513_Type);
   60736             : #endif
   60737             : #ifdef PY_NETSRVINFO1514_PATCH
   60738             :         PY_NETSRVINFO1514_PATCH(&srvsvc_NetSrvInfo1514_Type);
   60739             : #endif
   60740             : #ifdef PY_NETSRVINFO1515_PATCH
   60741             :         PY_NETSRVINFO1515_PATCH(&srvsvc_NetSrvInfo1515_Type);
   60742             : #endif
   60743             : #ifdef PY_NETSRVINFO1516_PATCH
   60744             :         PY_NETSRVINFO1516_PATCH(&srvsvc_NetSrvInfo1516_Type);
   60745             : #endif
   60746             : #ifdef PY_NETSRVINFO1518_PATCH
   60747             :         PY_NETSRVINFO1518_PATCH(&srvsvc_NetSrvInfo1518_Type);
   60748             : #endif
   60749             : #ifdef PY_NETSRVINFO1520_PATCH
   60750             :         PY_NETSRVINFO1520_PATCH(&srvsvc_NetSrvInfo1520_Type);
   60751             : #endif
   60752             : #ifdef PY_NETSRVINFO1521_PATCH
   60753             :         PY_NETSRVINFO1521_PATCH(&srvsvc_NetSrvInfo1521_Type);
   60754             : #endif
   60755             : #ifdef PY_NETSRVINFO1522_PATCH
   60756             :         PY_NETSRVINFO1522_PATCH(&srvsvc_NetSrvInfo1522_Type);
   60757             : #endif
   60758             : #ifdef PY_NETSRVINFO1523_PATCH
   60759             :         PY_NETSRVINFO1523_PATCH(&srvsvc_NetSrvInfo1523_Type);
   60760             : #endif
   60761             : #ifdef PY_NETSRVINFO1524_PATCH
   60762             :         PY_NETSRVINFO1524_PATCH(&srvsvc_NetSrvInfo1524_Type);
   60763             : #endif
   60764             : #ifdef PY_NETSRVINFO1525_PATCH
   60765             :         PY_NETSRVINFO1525_PATCH(&srvsvc_NetSrvInfo1525_Type);
   60766             : #endif
   60767             : #ifdef PY_NETSRVINFO1528_PATCH
   60768             :         PY_NETSRVINFO1528_PATCH(&srvsvc_NetSrvInfo1528_Type);
   60769             : #endif
   60770             : #ifdef PY_NETSRVINFO1529_PATCH
   60771             :         PY_NETSRVINFO1529_PATCH(&srvsvc_NetSrvInfo1529_Type);
   60772             : #endif
   60773             : #ifdef PY_NETSRVINFO1530_PATCH
   60774             :         PY_NETSRVINFO1530_PATCH(&srvsvc_NetSrvInfo1530_Type);
   60775             : #endif
   60776             : #ifdef PY_NETSRVINFO1533_PATCH
   60777             :         PY_NETSRVINFO1533_PATCH(&srvsvc_NetSrvInfo1533_Type);
   60778             : #endif
   60779             : #ifdef PY_NETSRVINFO1534_PATCH
   60780             :         PY_NETSRVINFO1534_PATCH(&srvsvc_NetSrvInfo1534_Type);
   60781             : #endif
   60782             : #ifdef PY_NETSRVINFO1535_PATCH
   60783             :         PY_NETSRVINFO1535_PATCH(&srvsvc_NetSrvInfo1535_Type);
   60784             : #endif
   60785             : #ifdef PY_NETSRVINFO1536_PATCH
   60786             :         PY_NETSRVINFO1536_PATCH(&srvsvc_NetSrvInfo1536_Type);
   60787             : #endif
   60788             : #ifdef PY_NETSRVINFO1537_PATCH
   60789             :         PY_NETSRVINFO1537_PATCH(&srvsvc_NetSrvInfo1537_Type);
   60790             : #endif
   60791             : #ifdef PY_NETSRVINFO1538_PATCH
   60792             :         PY_NETSRVINFO1538_PATCH(&srvsvc_NetSrvInfo1538_Type);
   60793             : #endif
   60794             : #ifdef PY_NETSRVINFO1539_PATCH
   60795             :         PY_NETSRVINFO1539_PATCH(&srvsvc_NetSrvInfo1539_Type);
   60796             : #endif
   60797             : #ifdef PY_NETSRVINFO1540_PATCH
   60798             :         PY_NETSRVINFO1540_PATCH(&srvsvc_NetSrvInfo1540_Type);
   60799             : #endif
   60800             : #ifdef PY_NETSRVINFO1541_PATCH
   60801             :         PY_NETSRVINFO1541_PATCH(&srvsvc_NetSrvInfo1541_Type);
   60802             : #endif
   60803             : #ifdef PY_NETSRVINFO1542_PATCH
   60804             :         PY_NETSRVINFO1542_PATCH(&srvsvc_NetSrvInfo1542_Type);
   60805             : #endif
   60806             : #ifdef PY_NETSRVINFO1543_PATCH
   60807             :         PY_NETSRVINFO1543_PATCH(&srvsvc_NetSrvInfo1543_Type);
   60808             : #endif
   60809             : #ifdef PY_NETSRVINFO1544_PATCH
   60810             :         PY_NETSRVINFO1544_PATCH(&srvsvc_NetSrvInfo1544_Type);
   60811             : #endif
   60812             : #ifdef PY_NETSRVINFO1545_PATCH
   60813             :         PY_NETSRVINFO1545_PATCH(&srvsvc_NetSrvInfo1545_Type);
   60814             : #endif
   60815             : #ifdef PY_NETSRVINFO1546_PATCH
   60816             :         PY_NETSRVINFO1546_PATCH(&srvsvc_NetSrvInfo1546_Type);
   60817             : #endif
   60818             : #ifdef PY_NETSRVINFO1547_PATCH
   60819             :         PY_NETSRVINFO1547_PATCH(&srvsvc_NetSrvInfo1547_Type);
   60820             : #endif
   60821             : #ifdef PY_NETSRVINFO1548_PATCH
   60822             :         PY_NETSRVINFO1548_PATCH(&srvsvc_NetSrvInfo1548_Type);
   60823             : #endif
   60824             : #ifdef PY_NETSRVINFO1549_PATCH
   60825             :         PY_NETSRVINFO1549_PATCH(&srvsvc_NetSrvInfo1549_Type);
   60826             : #endif
   60827             : #ifdef PY_NETSRVINFO1550_PATCH
   60828             :         PY_NETSRVINFO1550_PATCH(&srvsvc_NetSrvInfo1550_Type);
   60829             : #endif
   60830             : #ifdef PY_NETSRVINFO1552_PATCH
   60831             :         PY_NETSRVINFO1552_PATCH(&srvsvc_NetSrvInfo1552_Type);
   60832             : #endif
   60833             : #ifdef PY_NETSRVINFO1553_PATCH
   60834             :         PY_NETSRVINFO1553_PATCH(&srvsvc_NetSrvInfo1553_Type);
   60835             : #endif
   60836             : #ifdef PY_NETSRVINFO1554_PATCH
   60837             :         PY_NETSRVINFO1554_PATCH(&srvsvc_NetSrvInfo1554_Type);
   60838             : #endif
   60839             : #ifdef PY_NETSRVINFO1555_PATCH
   60840             :         PY_NETSRVINFO1555_PATCH(&srvsvc_NetSrvInfo1555_Type);
   60841             : #endif
   60842             : #ifdef PY_NETSRVINFO1556_PATCH
   60843             :         PY_NETSRVINFO1556_PATCH(&srvsvc_NetSrvInfo1556_Type);
   60844             : #endif
   60845             : #ifdef PY_NETSRVINFO_PATCH
   60846             :         PY_NETSRVINFO_PATCH(&srvsvc_NetSrvInfo_Type);
   60847             : #endif
   60848             : #ifdef PY_NETDISKINFO0_PATCH
   60849             :         PY_NETDISKINFO0_PATCH(&srvsvc_NetDiskInfo0_Type);
   60850             : #endif
   60851             : #ifdef PY_NETDISKINFO_PATCH
   60852             :         PY_NETDISKINFO_PATCH(&srvsvc_NetDiskInfo_Type);
   60853             : #endif
   60854             : #ifdef PY_STATISTICS_PATCH
   60855             :         PY_STATISTICS_PATCH(&srvsvc_Statistics_Type);
   60856             : #endif
   60857             : #ifdef PY_NETTRANSPORTINFO0_PATCH
   60858             :         PY_NETTRANSPORTINFO0_PATCH(&srvsvc_NetTransportInfo0_Type);
   60859             : #endif
   60860             : #ifdef PY_NETTRANSPORTCTR0_PATCH
   60861             :         PY_NETTRANSPORTCTR0_PATCH(&srvsvc_NetTransportCtr0_Type);
   60862             : #endif
   60863             : #ifdef PY_NETTRANSPORTINFO1_PATCH
   60864             :         PY_NETTRANSPORTINFO1_PATCH(&srvsvc_NetTransportInfo1_Type);
   60865             : #endif
   60866             : #ifdef PY_NETTRANSPORTCTR1_PATCH
   60867             :         PY_NETTRANSPORTCTR1_PATCH(&srvsvc_NetTransportCtr1_Type);
   60868             : #endif
   60869             : #ifdef PY_NETTRANSPORTINFO2_PATCH
   60870             :         PY_NETTRANSPORTINFO2_PATCH(&srvsvc_NetTransportInfo2_Type);
   60871             : #endif
   60872             : #ifdef PY_NETTRANSPORTCTR2_PATCH
   60873             :         PY_NETTRANSPORTCTR2_PATCH(&srvsvc_NetTransportCtr2_Type);
   60874             : #endif
   60875             : #ifdef PY_NETTRANSPORTINFO3_PATCH
   60876             :         PY_NETTRANSPORTINFO3_PATCH(&srvsvc_NetTransportInfo3_Type);
   60877             : #endif
   60878             : #ifdef PY_NETTRANSPORTCTR3_PATCH
   60879             :         PY_NETTRANSPORTCTR3_PATCH(&srvsvc_NetTransportCtr3_Type);
   60880             : #endif
   60881             : #ifdef PY_NETTRANSPORTCTR_PATCH
   60882             :         PY_NETTRANSPORTCTR_PATCH(&srvsvc_NetTransportCtr_Type);
   60883             : #endif
   60884             : #ifdef PY_NETTRANSPORTINFOCTR_PATCH
   60885             :         PY_NETTRANSPORTINFOCTR_PATCH(&srvsvc_NetTransportInfoCtr_Type);
   60886             : #endif
   60887             : #ifdef PY_NETREMOTETODINFO_PATCH
   60888             :         PY_NETREMOTETODINFO_PATCH(&srvsvc_NetRemoteTODInfo_Type);
   60889             : #endif
   60890             : #ifdef PY_NETTRANSPORTINFO_PATCH
   60891             :         PY_NETTRANSPORTINFO_PATCH(&srvsvc_NetTransportInfo_Type);
   60892             : #endif
   60893             : #ifdef PY_NETCHARDEVENUM_PATCH
   60894             :         PY_NETCHARDEVENUM_PATCH(&srvsvc_NetCharDevEnum_Type);
   60895             : #endif
   60896             : #ifdef PY_NETCHARDEVGETINFO_PATCH
   60897             :         PY_NETCHARDEVGETINFO_PATCH(&srvsvc_NetCharDevGetInfo_Type);
   60898             : #endif
   60899             : #ifdef PY_NETCHARDEVCONTROL_PATCH
   60900             :         PY_NETCHARDEVCONTROL_PATCH(&srvsvc_NetCharDevControl_Type);
   60901             : #endif
   60902             : #ifdef PY_NETCHARDEVQENUM_PATCH
   60903             :         PY_NETCHARDEVQENUM_PATCH(&srvsvc_NetCharDevQEnum_Type);
   60904             : #endif
   60905             : #ifdef PY_NETCHARDEVQGETINFO_PATCH
   60906             :         PY_NETCHARDEVQGETINFO_PATCH(&srvsvc_NetCharDevQGetInfo_Type);
   60907             : #endif
   60908             : #ifdef PY_NETCHARDEVQSETINFO_PATCH
   60909             :         PY_NETCHARDEVQSETINFO_PATCH(&srvsvc_NetCharDevQSetInfo_Type);
   60910             : #endif
   60911             : #ifdef PY_NETCHARDEVQPURGE_PATCH
   60912             :         PY_NETCHARDEVQPURGE_PATCH(&srvsvc_NetCharDevQPurge_Type);
   60913             : #endif
   60914             : #ifdef PY_NETCHARDEVQPURGESELF_PATCH
   60915             :         PY_NETCHARDEVQPURGESELF_PATCH(&srvsvc_NetCharDevQPurgeSelf_Type);
   60916             : #endif
   60917             : #ifdef PY_NETCONNENUM_PATCH
   60918             :         PY_NETCONNENUM_PATCH(&srvsvc_NetConnEnum_Type);
   60919             : #endif
   60920             : #ifdef PY_NETFILEENUM_PATCH
   60921             :         PY_NETFILEENUM_PATCH(&srvsvc_NetFileEnum_Type);
   60922             : #endif
   60923             : #ifdef PY_NETFILEGETINFO_PATCH
   60924             :         PY_NETFILEGETINFO_PATCH(&srvsvc_NetFileGetInfo_Type);
   60925             : #endif
   60926             : #ifdef PY_NETFILECLOSE_PATCH
   60927             :         PY_NETFILECLOSE_PATCH(&srvsvc_NetFileClose_Type);
   60928             : #endif
   60929             : #ifdef PY_NETSESSENUM_PATCH
   60930             :         PY_NETSESSENUM_PATCH(&srvsvc_NetSessEnum_Type);
   60931             : #endif
   60932             : #ifdef PY_NETSESSDEL_PATCH
   60933             :         PY_NETSESSDEL_PATCH(&srvsvc_NetSessDel_Type);
   60934             : #endif
   60935             : #ifdef PY_NETSHAREADD_PATCH
   60936             :         PY_NETSHAREADD_PATCH(&srvsvc_NetShareAdd_Type);
   60937             : #endif
   60938             : #ifdef PY_NETSHAREENUMALL_PATCH
   60939             :         PY_NETSHAREENUMALL_PATCH(&srvsvc_NetShareEnumAll_Type);
   60940             : #endif
   60941             : #ifdef PY_NETSHAREGETINFO_PATCH
   60942             :         PY_NETSHAREGETINFO_PATCH(&srvsvc_NetShareGetInfo_Type);
   60943             : #endif
   60944             : #ifdef PY_NETSHARESETINFO_PATCH
   60945             :         PY_NETSHARESETINFO_PATCH(&srvsvc_NetShareSetInfo_Type);
   60946             : #endif
   60947             : #ifdef PY_NETSHAREDEL_PATCH
   60948             :         PY_NETSHAREDEL_PATCH(&srvsvc_NetShareDel_Type);
   60949             : #endif
   60950             : #ifdef PY_NETSHAREDELSTICKY_PATCH
   60951             :         PY_NETSHAREDELSTICKY_PATCH(&srvsvc_NetShareDelSticky_Type);
   60952             : #endif
   60953             : #ifdef PY_NETSHARECHECK_PATCH
   60954             :         PY_NETSHARECHECK_PATCH(&srvsvc_NetShareCheck_Type);
   60955             : #endif
   60956             : #ifdef PY_NETSRVGETINFO_PATCH
   60957             :         PY_NETSRVGETINFO_PATCH(&srvsvc_NetSrvGetInfo_Type);
   60958             : #endif
   60959             : #ifdef PY_NETSRVSETINFO_PATCH
   60960             :         PY_NETSRVSETINFO_PATCH(&srvsvc_NetSrvSetInfo_Type);
   60961             : #endif
   60962             : #ifdef PY_NETDISKENUM_PATCH
   60963             :         PY_NETDISKENUM_PATCH(&srvsvc_NetDiskEnum_Type);
   60964             : #endif
   60965             : #ifdef PY_NETSERVERSTATISTICSGET_PATCH
   60966             :         PY_NETSERVERSTATISTICSGET_PATCH(&srvsvc_NetServerStatisticsGet_Type);
   60967             : #endif
   60968             : #ifdef PY_NETTRANSPORTADD_PATCH
   60969             :         PY_NETTRANSPORTADD_PATCH(&srvsvc_NetTransportAdd_Type);
   60970             : #endif
   60971             : #ifdef PY_NETTRANSPORTENUM_PATCH
   60972             :         PY_NETTRANSPORTENUM_PATCH(&srvsvc_NetTransportEnum_Type);
   60973             : #endif
   60974             : #ifdef PY_NETTRANSPORTDEL_PATCH
   60975             :         PY_NETTRANSPORTDEL_PATCH(&srvsvc_NetTransportDel_Type);
   60976             : #endif
   60977             : #ifdef PY_NETREMOTETOD_PATCH
   60978             :         PY_NETREMOTETOD_PATCH(&srvsvc_NetRemoteTOD_Type);
   60979             : #endif
   60980             : #ifdef PY_NETSETSERVICEBITS_PATCH
   60981             :         PY_NETSETSERVICEBITS_PATCH(&srvsvc_NetSetServiceBits_Type);
   60982             : #endif
   60983             : #ifdef PY_NETPATHTYPE_PATCH
   60984             :         PY_NETPATHTYPE_PATCH(&srvsvc_NetPathType_Type);
   60985             : #endif
   60986             : #ifdef PY_NETPATHCANONICALIZE_PATCH
   60987             :         PY_NETPATHCANONICALIZE_PATCH(&srvsvc_NetPathCanonicalize_Type);
   60988             : #endif
   60989             : #ifdef PY_NETPATHCOMPARE_PATCH
   60990             :         PY_NETPATHCOMPARE_PATCH(&srvsvc_NetPathCompare_Type);
   60991             : #endif
   60992             : #ifdef PY_NETNAMEVALIDATE_PATCH
   60993             :         PY_NETNAMEVALIDATE_PATCH(&srvsvc_NetNameValidate_Type);
   60994             : #endif
   60995             : #ifdef PY_NETPRNAMECOMPARE_PATCH
   60996             :         PY_NETPRNAMECOMPARE_PATCH(&srvsvc_NetPRNameCompare_Type);
   60997             : #endif
   60998             : #ifdef PY_NETSHAREENUM_PATCH
   60999             :         PY_NETSHAREENUM_PATCH(&srvsvc_NetShareEnum_Type);
   61000             : #endif
   61001             : #ifdef PY_NETSHAREDELSTART_PATCH
   61002             :         PY_NETSHAREDELSTART_PATCH(&srvsvc_NetShareDelStart_Type);
   61003             : #endif
   61004             : #ifdef PY_NETSHAREDELCOMMIT_PATCH
   61005             :         PY_NETSHAREDELCOMMIT_PATCH(&srvsvc_NetShareDelCommit_Type);
   61006             : #endif
   61007             : #ifdef PY_NETGETFILESECURITY_PATCH
   61008             :         PY_NETGETFILESECURITY_PATCH(&srvsvc_NetGetFileSecurity_Type);
   61009             : #endif
   61010             : #ifdef PY_NETSETFILESECURITY_PATCH
   61011             :         PY_NETSETFILESECURITY_PATCH(&srvsvc_NetSetFileSecurity_Type);
   61012             : #endif
   61013             : #ifdef PY_NETSERVERTRANSPORTADDEX_PATCH
   61014             :         PY_NETSERVERTRANSPORTADDEX_PATCH(&srvsvc_NetServerTransportAddEx_Type);
   61015             : #endif
   61016             : #ifdef PY_NETSERVERSETSERVICEBITSEX_PATCH
   61017             :         PY_NETSERVERSETSERVICEBITSEX_PATCH(&srvsvc_NetServerSetServiceBitsEx_Type);
   61018             : #endif
   61019             : #ifdef PY_SRVSVC_PATCH
   61020             :         PY_SRVSVC_PATCH(&srvsvc_InterfaceType);
   61021             : #endif
   61022             : #ifdef PY_SRVSVC_ABSTRACT_SYNTAX_PATCH
   61023             :         PY_SRVSVC_ABSTRACT_SYNTAX_PATCH(&srvsvc_SyntaxType);
   61024             : #endif
   61025             : #ifdef PY_ABSTRACT_SYNTAX_PATCH
   61026             :         PY_ABSTRACT_SYNTAX_PATCH(&srvsvc_SyntaxType);
   61027             : #endif
   61028             : 
   61029          40 :         m = PyModule_Create(&moduledef);
   61030          40 :         if (m == NULL)
   61031           0 :                 goto out;
   61032             : 
   61033          40 :         PyModule_AddObject(m, "STYPE_TEMPORARY", PyLong_FromUnsignedLongLong(0x40000000));
   61034          40 :         PyModule_AddObject(m, "STYPE_HIDDEN", PyLong_FromUnsignedLongLong(0x80000000));
   61035          40 :         PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_MANUAL_REINT", PyLong_FromUnsignedLongLong(0x00000000));
   61036          40 :         PyModule_AddObject(m, "SHARE_1005_CSC_POLICY_MASK", PyLong_FromUnsignedLongLong(0x00000030));
   61037          40 :         PyModule_AddObject(m, "SHARE_1005_CSC_POLICY_SHIFT", PyLong_FromUnsignedLongLong(4));
   61038          40 :         PyModule_AddObject(m, "STYPE_DISKTREE", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_DISKTREE)));
   61039          40 :         PyModule_AddObject(m, "STYPE_DISKTREE_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_DISKTREE_TEMPORARY)));
   61040          40 :         PyModule_AddObject(m, "STYPE_DISKTREE_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_DISKTREE_HIDDEN)));
   61041          40 :         PyModule_AddObject(m, "STYPE_PRINTQ", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_PRINTQ)));
   61042          40 :         PyModule_AddObject(m, "STYPE_PRINTQ_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_PRINTQ_TEMPORARY)));
   61043          40 :         PyModule_AddObject(m, "STYPE_PRINTQ_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_PRINTQ_HIDDEN)));
   61044          40 :         PyModule_AddObject(m, "STYPE_DEVICE", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_DEVICE)));
   61045          40 :         PyModule_AddObject(m, "STYPE_DEVICE_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_DEVICE_TEMPORARY)));
   61046          40 :         PyModule_AddObject(m, "STYPE_DEVICE_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_DEVICE_HIDDEN)));
   61047          40 :         PyModule_AddObject(m, "STYPE_IPC", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_IPC)));
   61048          40 :         PyModule_AddObject(m, "STYPE_IPC_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_IPC_TEMPORARY)));
   61049          40 :         PyModule_AddObject(m, "STYPE_IPC_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_IPC_HIDDEN)));
   61050          40 :         PyModule_AddObject(m, "STYPE_CLUSTER_FS", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_CLUSTER_FS)));
   61051          40 :         PyModule_AddObject(m, "STYPE_CLUSTER_FS_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_CLUSTER_FS_TEMPORARY)));
   61052          40 :         PyModule_AddObject(m, "STYPE_CLUSTER_FS_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_CLUSTER_FS_HIDDEN)));
   61053          40 :         PyModule_AddObject(m, "STYPE_CLUSTER_SOFS", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_CLUSTER_SOFS)));
   61054          40 :         PyModule_AddObject(m, "STYPE_CLUSTER_SOFS_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_CLUSTER_SOFS_TEMPORARY)));
   61055          40 :         PyModule_AddObject(m, "STYPE_CLUSTER_SOFS_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_CLUSTER_SOFS_HIDDEN)));
   61056          40 :         PyModule_AddObject(m, "STYPE_CLUSTER_DFS", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_CLUSTER_DFS)));
   61057          40 :         PyModule_AddObject(m, "STYPE_CLUSTER_DFS_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_CLUSTER_DFS_TEMPORARY)));
   61058          40 :         PyModule_AddObject(m, "STYPE_CLUSTER_DFS_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)(STYPE_CLUSTER_DFS_HIDDEN)));
   61059          40 :         PyModule_AddObject(m, "SHARE_1005_IN_DFS", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_IN_DFS)));
   61060          40 :         PyModule_AddObject(m, "SHARE_1005_DFS_ROOT", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_DFS_ROOT)));
   61061          40 :         PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_AUTO_REINT", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_CSC_CACHE_AUTO_REINT)));
   61062          40 :         PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_VDO", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_CSC_CACHE_VDO)));
   61063          40 :         PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_NONE", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_CSC_CACHE_NONE)));
   61064          40 :         PyModule_AddObject(m, "SHARE_1005_RESTRICT_EXCLUSIVE_OPENS", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_RESTRICT_EXCLUSIVE_OPENS)));
   61065          40 :         PyModule_AddObject(m, "SHARE_1005_FORCE_SHARED_DELETE", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_FORCE_SHARED_DELETE)));
   61066          40 :         PyModule_AddObject(m, "SHARE_1005_ALLOW_NAMESPACE_CACHING", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_ALLOW_NAMESPACE_CACHING)));
   61067          40 :         PyModule_AddObject(m, "SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM)));
   61068          40 :         PyModule_AddObject(m, "SHARE_1005_FORCE_LEVELII_OPLOCK", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_FORCE_LEVELII_OPLOCK)));
   61069          40 :         PyModule_AddObject(m, "SHARE_1005_ENABLE_HASH", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_ENABLE_HASH)));
   61070          40 :         PyModule_AddObject(m, "SHARE_1005_ENABLE_CA", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_ENABLE_CA)));
   61071          40 :         PyModule_AddObject(m, "SHARE_1005_ENCRYPT_DATA", PyLong_FromUnsignedLongLong((uint32_t)(SHARE_1005_ENCRYPT_DATA)));
   61072          40 :         PyModule_AddObject(m, "PLATFORM_ID_DOS", PyLong_FromUnsignedLongLong((uint32_t)(PLATFORM_ID_DOS)));
   61073          40 :         PyModule_AddObject(m, "PLATFORM_ID_OS2", PyLong_FromUnsignedLongLong((uint32_t)(PLATFORM_ID_OS2)));
   61074          40 :         PyModule_AddObject(m, "PLATFORM_ID_NT", PyLong_FromUnsignedLongLong((uint32_t)(PLATFORM_ID_NT)));
   61075          40 :         PyModule_AddObject(m, "PLATFORM_ID_OSF", PyLong_FromUnsignedLongLong((uint32_t)(PLATFORM_ID_OSF)));
   61076          40 :         PyModule_AddObject(m, "PLATFORM_ID_VMS", PyLong_FromUnsignedLongLong((uint32_t)(PLATFORM_ID_VMS)));
   61077          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevInfo0_Type);
   61078          40 :         PyModule_AddObject(m, "NetCharDevInfo0", (PyObject *)(void *)&srvsvc_NetCharDevInfo0_Type);
   61079          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevCtr0_Type);
   61080          40 :         PyModule_AddObject(m, "NetCharDevCtr0", (PyObject *)(void *)&srvsvc_NetCharDevCtr0_Type);
   61081          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevInfo1_Type);
   61082          40 :         PyModule_AddObject(m, "NetCharDevInfo1", (PyObject *)(void *)&srvsvc_NetCharDevInfo1_Type);
   61083          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevCtr1_Type);
   61084          40 :         PyModule_AddObject(m, "NetCharDevCtr1", (PyObject *)(void *)&srvsvc_NetCharDevCtr1_Type);
   61085          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevInfo_Type);
   61086          40 :         PyModule_AddObject(m, "NetCharDevInfo", (PyObject *)(void *)&srvsvc_NetCharDevInfo_Type);
   61087          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevCtr_Type);
   61088          40 :         PyModule_AddObject(m, "NetCharDevCtr", (PyObject *)(void *)&srvsvc_NetCharDevCtr_Type);
   61089          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevInfoCtr_Type);
   61090          40 :         PyModule_AddObject(m, "NetCharDevInfoCtr", (PyObject *)(void *)&srvsvc_NetCharDevInfoCtr_Type);
   61091          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQInfo0_Type);
   61092          40 :         PyModule_AddObject(m, "NetCharDevQInfo0", (PyObject *)(void *)&srvsvc_NetCharDevQInfo0_Type);
   61093          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQCtr0_Type);
   61094          40 :         PyModule_AddObject(m, "NetCharDevQCtr0", (PyObject *)(void *)&srvsvc_NetCharDevQCtr0_Type);
   61095          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQInfo1_Type);
   61096          40 :         PyModule_AddObject(m, "NetCharDevQInfo1", (PyObject *)(void *)&srvsvc_NetCharDevQInfo1_Type);
   61097          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQCtr1_Type);
   61098          40 :         PyModule_AddObject(m, "NetCharDevQCtr1", (PyObject *)(void *)&srvsvc_NetCharDevQCtr1_Type);
   61099          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQInfo_Type);
   61100          40 :         PyModule_AddObject(m, "NetCharDevQInfo", (PyObject *)(void *)&srvsvc_NetCharDevQInfo_Type);
   61101          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQCtr_Type);
   61102          40 :         PyModule_AddObject(m, "NetCharDevQCtr", (PyObject *)(void *)&srvsvc_NetCharDevQCtr_Type);
   61103          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQInfoCtr_Type);
   61104          40 :         PyModule_AddObject(m, "NetCharDevQInfoCtr", (PyObject *)(void *)&srvsvc_NetCharDevQInfoCtr_Type);
   61105          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnInfo0_Type);
   61106          40 :         PyModule_AddObject(m, "NetConnInfo0", (PyObject *)(void *)&srvsvc_NetConnInfo0_Type);
   61107          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnCtr0_Type);
   61108          40 :         PyModule_AddObject(m, "NetConnCtr0", (PyObject *)(void *)&srvsvc_NetConnCtr0_Type);
   61109          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnInfo1_Type);
   61110          40 :         PyModule_AddObject(m, "NetConnInfo1", (PyObject *)(void *)&srvsvc_NetConnInfo1_Type);
   61111          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnCtr1_Type);
   61112          40 :         PyModule_AddObject(m, "NetConnCtr1", (PyObject *)(void *)&srvsvc_NetConnCtr1_Type);
   61113          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnCtr_Type);
   61114          40 :         PyModule_AddObject(m, "NetConnCtr", (PyObject *)(void *)&srvsvc_NetConnCtr_Type);
   61115          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnInfoCtr_Type);
   61116          40 :         PyModule_AddObject(m, "NetConnInfoCtr", (PyObject *)(void *)&srvsvc_NetConnInfoCtr_Type);
   61117          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileInfo2_Type);
   61118          40 :         PyModule_AddObject(m, "NetFileInfo2", (PyObject *)(void *)&srvsvc_NetFileInfo2_Type);
   61119          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileCtr2_Type);
   61120          40 :         PyModule_AddObject(m, "NetFileCtr2", (PyObject *)(void *)&srvsvc_NetFileCtr2_Type);
   61121          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileInfo3_Type);
   61122          40 :         PyModule_AddObject(m, "NetFileInfo3", (PyObject *)(void *)&srvsvc_NetFileInfo3_Type);
   61123          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileCtr3_Type);
   61124          40 :         PyModule_AddObject(m, "NetFileCtr3", (PyObject *)(void *)&srvsvc_NetFileCtr3_Type);
   61125          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileInfo_Type);
   61126          40 :         PyModule_AddObject(m, "NetFileInfo", (PyObject *)(void *)&srvsvc_NetFileInfo_Type);
   61127          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileCtr_Type);
   61128          40 :         PyModule_AddObject(m, "NetFileCtr", (PyObject *)(void *)&srvsvc_NetFileCtr_Type);
   61129          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileInfoCtr_Type);
   61130          40 :         PyModule_AddObject(m, "NetFileInfoCtr", (PyObject *)(void *)&srvsvc_NetFileInfoCtr_Type);
   61131          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo0_Type);
   61132          40 :         PyModule_AddObject(m, "NetSessInfo0", (PyObject *)(void *)&srvsvc_NetSessInfo0_Type);
   61133          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr0_Type);
   61134          40 :         PyModule_AddObject(m, "NetSessCtr0", (PyObject *)(void *)&srvsvc_NetSessCtr0_Type);
   61135          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo1_Type);
   61136          40 :         PyModule_AddObject(m, "NetSessInfo1", (PyObject *)(void *)&srvsvc_NetSessInfo1_Type);
   61137          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr1_Type);
   61138          40 :         PyModule_AddObject(m, "NetSessCtr1", (PyObject *)(void *)&srvsvc_NetSessCtr1_Type);
   61139          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo2_Type);
   61140          40 :         PyModule_AddObject(m, "NetSessInfo2", (PyObject *)(void *)&srvsvc_NetSessInfo2_Type);
   61141          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr2_Type);
   61142          40 :         PyModule_AddObject(m, "NetSessCtr2", (PyObject *)(void *)&srvsvc_NetSessCtr2_Type);
   61143          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo10_Type);
   61144          40 :         PyModule_AddObject(m, "NetSessInfo10", (PyObject *)(void *)&srvsvc_NetSessInfo10_Type);
   61145          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr10_Type);
   61146          40 :         PyModule_AddObject(m, "NetSessCtr10", (PyObject *)(void *)&srvsvc_NetSessCtr10_Type);
   61147          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo502_Type);
   61148          40 :         PyModule_AddObject(m, "NetSessInfo502", (PyObject *)(void *)&srvsvc_NetSessInfo502_Type);
   61149          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr502_Type);
   61150          40 :         PyModule_AddObject(m, "NetSessCtr502", (PyObject *)(void *)&srvsvc_NetSessCtr502_Type);
   61151          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr_Type);
   61152          40 :         PyModule_AddObject(m, "NetSessCtr", (PyObject *)(void *)&srvsvc_NetSessCtr_Type);
   61153          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfoCtr_Type);
   61154          40 :         PyModule_AddObject(m, "NetSessInfoCtr", (PyObject *)(void *)&srvsvc_NetSessInfoCtr_Type);
   61155          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo0_Type);
   61156          40 :         PyModule_AddObject(m, "NetShareInfo0", (PyObject *)(void *)&srvsvc_NetShareInfo0_Type);
   61157          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr0_Type);
   61158          40 :         PyModule_AddObject(m, "NetShareCtr0", (PyObject *)(void *)&srvsvc_NetShareCtr0_Type);
   61159          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1_Type);
   61160          40 :         PyModule_AddObject(m, "NetShareInfo1", (PyObject *)(void *)&srvsvc_NetShareInfo1_Type);
   61161          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1_Type);
   61162          40 :         PyModule_AddObject(m, "NetShareCtr1", (PyObject *)(void *)&srvsvc_NetShareCtr1_Type);
   61163          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo2_Type);
   61164          40 :         PyModule_AddObject(m, "NetShareInfo2", (PyObject *)(void *)&srvsvc_NetShareInfo2_Type);
   61165          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr2_Type);
   61166          40 :         PyModule_AddObject(m, "NetShareCtr2", (PyObject *)(void *)&srvsvc_NetShareCtr2_Type);
   61167          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo501_Type);
   61168          40 :         PyModule_AddObject(m, "NetShareInfo501", (PyObject *)(void *)&srvsvc_NetShareInfo501_Type);
   61169          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr501_Type);
   61170          40 :         PyModule_AddObject(m, "NetShareCtr501", (PyObject *)(void *)&srvsvc_NetShareCtr501_Type);
   61171          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo502_Type);
   61172          40 :         PyModule_AddObject(m, "NetShareInfo502", (PyObject *)(void *)&srvsvc_NetShareInfo502_Type);
   61173          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr502_Type);
   61174          40 :         PyModule_AddObject(m, "NetShareCtr502", (PyObject *)(void *)&srvsvc_NetShareCtr502_Type);
   61175          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1004_Type);
   61176          40 :         PyModule_AddObject(m, "NetShareInfo1004", (PyObject *)(void *)&srvsvc_NetShareInfo1004_Type);
   61177          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1004_Type);
   61178          40 :         PyModule_AddObject(m, "NetShareCtr1004", (PyObject *)(void *)&srvsvc_NetShareCtr1004_Type);
   61179          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1005_Type);
   61180          40 :         PyModule_AddObject(m, "NetShareInfo1005", (PyObject *)(void *)&srvsvc_NetShareInfo1005_Type);
   61181          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1005_Type);
   61182          40 :         PyModule_AddObject(m, "NetShareCtr1005", (PyObject *)(void *)&srvsvc_NetShareCtr1005_Type);
   61183          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1006_Type);
   61184          40 :         PyModule_AddObject(m, "NetShareInfo1006", (PyObject *)(void *)&srvsvc_NetShareInfo1006_Type);
   61185          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1006_Type);
   61186          40 :         PyModule_AddObject(m, "NetShareCtr1006", (PyObject *)(void *)&srvsvc_NetShareCtr1006_Type);
   61187          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1007_Type);
   61188          40 :         PyModule_AddObject(m, "NetShareInfo1007", (PyObject *)(void *)&srvsvc_NetShareInfo1007_Type);
   61189          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1007_Type);
   61190          40 :         PyModule_AddObject(m, "NetShareCtr1007", (PyObject *)(void *)&srvsvc_NetShareCtr1007_Type);
   61191          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1501_Type);
   61192          40 :         PyModule_AddObject(m, "NetShareCtr1501", (PyObject *)(void *)&srvsvc_NetShareCtr1501_Type);
   61193          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo_Type);
   61194          40 :         PyModule_AddObject(m, "NetShareInfo", (PyObject *)(void *)&srvsvc_NetShareInfo_Type);
   61195          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr_Type);
   61196          40 :         PyModule_AddObject(m, "NetShareCtr", (PyObject *)(void *)&srvsvc_NetShareCtr_Type);
   61197          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfoCtr_Type);
   61198          40 :         PyModule_AddObject(m, "NetShareInfoCtr", (PyObject *)(void *)&srvsvc_NetShareInfoCtr_Type);
   61199          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo100_Type);
   61200          40 :         PyModule_AddObject(m, "NetSrvInfo100", (PyObject *)(void *)&srvsvc_NetSrvInfo100_Type);
   61201          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo101_Type);
   61202          40 :         PyModule_AddObject(m, "NetSrvInfo101", (PyObject *)(void *)&srvsvc_NetSrvInfo101_Type);
   61203          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo102_Type);
   61204          40 :         PyModule_AddObject(m, "NetSrvInfo102", (PyObject *)(void *)&srvsvc_NetSrvInfo102_Type);
   61205          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo402_Type);
   61206          40 :         PyModule_AddObject(m, "NetSrvInfo402", (PyObject *)(void *)&srvsvc_NetSrvInfo402_Type);
   61207          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo403_Type);
   61208          40 :         PyModule_AddObject(m, "NetSrvInfo403", (PyObject *)(void *)&srvsvc_NetSrvInfo403_Type);
   61209          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo502_Type);
   61210          40 :         PyModule_AddObject(m, "NetSrvInfo502", (PyObject *)(void *)&srvsvc_NetSrvInfo502_Type);
   61211          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo503_Type);
   61212          40 :         PyModule_AddObject(m, "NetSrvInfo503", (PyObject *)(void *)&srvsvc_NetSrvInfo503_Type);
   61213          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo599_Type);
   61214          40 :         PyModule_AddObject(m, "NetSrvInfo599", (PyObject *)(void *)&srvsvc_NetSrvInfo599_Type);
   61215          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1005_Type);
   61216          40 :         PyModule_AddObject(m, "NetSrvInfo1005", (PyObject *)(void *)&srvsvc_NetSrvInfo1005_Type);
   61217          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1010_Type);
   61218          40 :         PyModule_AddObject(m, "NetSrvInfo1010", (PyObject *)(void *)&srvsvc_NetSrvInfo1010_Type);
   61219          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1016_Type);
   61220          40 :         PyModule_AddObject(m, "NetSrvInfo1016", (PyObject *)(void *)&srvsvc_NetSrvInfo1016_Type);
   61221          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1017_Type);
   61222          40 :         PyModule_AddObject(m, "NetSrvInfo1017", (PyObject *)(void *)&srvsvc_NetSrvInfo1017_Type);
   61223          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1018_Type);
   61224          40 :         PyModule_AddObject(m, "NetSrvInfo1018", (PyObject *)(void *)&srvsvc_NetSrvInfo1018_Type);
   61225          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1107_Type);
   61226          40 :         PyModule_AddObject(m, "NetSrvInfo1107", (PyObject *)(void *)&srvsvc_NetSrvInfo1107_Type);
   61227          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1501_Type);
   61228          40 :         PyModule_AddObject(m, "NetSrvInfo1501", (PyObject *)(void *)&srvsvc_NetSrvInfo1501_Type);
   61229          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1502_Type);
   61230          40 :         PyModule_AddObject(m, "NetSrvInfo1502", (PyObject *)(void *)&srvsvc_NetSrvInfo1502_Type);
   61231          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1503_Type);
   61232          40 :         PyModule_AddObject(m, "NetSrvInfo1503", (PyObject *)(void *)&srvsvc_NetSrvInfo1503_Type);
   61233          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1506_Type);
   61234          40 :         PyModule_AddObject(m, "NetSrvInfo1506", (PyObject *)(void *)&srvsvc_NetSrvInfo1506_Type);
   61235          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1509_Type);
   61236          40 :         PyModule_AddObject(m, "NetSrvInfo1509", (PyObject *)(void *)&srvsvc_NetSrvInfo1509_Type);
   61237          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1510_Type);
   61238          40 :         PyModule_AddObject(m, "NetSrvInfo1510", (PyObject *)(void *)&srvsvc_NetSrvInfo1510_Type);
   61239          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1511_Type);
   61240          40 :         PyModule_AddObject(m, "NetSrvInfo1511", (PyObject *)(void *)&srvsvc_NetSrvInfo1511_Type);
   61241          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1512_Type);
   61242          40 :         PyModule_AddObject(m, "NetSrvInfo1512", (PyObject *)(void *)&srvsvc_NetSrvInfo1512_Type);
   61243          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1513_Type);
   61244          40 :         PyModule_AddObject(m, "NetSrvInfo1513", (PyObject *)(void *)&srvsvc_NetSrvInfo1513_Type);
   61245          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1514_Type);
   61246          40 :         PyModule_AddObject(m, "NetSrvInfo1514", (PyObject *)(void *)&srvsvc_NetSrvInfo1514_Type);
   61247          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1515_Type);
   61248          40 :         PyModule_AddObject(m, "NetSrvInfo1515", (PyObject *)(void *)&srvsvc_NetSrvInfo1515_Type);
   61249          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1516_Type);
   61250          40 :         PyModule_AddObject(m, "NetSrvInfo1516", (PyObject *)(void *)&srvsvc_NetSrvInfo1516_Type);
   61251          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1518_Type);
   61252          40 :         PyModule_AddObject(m, "NetSrvInfo1518", (PyObject *)(void *)&srvsvc_NetSrvInfo1518_Type);
   61253          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1520_Type);
   61254          40 :         PyModule_AddObject(m, "NetSrvInfo1520", (PyObject *)(void *)&srvsvc_NetSrvInfo1520_Type);
   61255          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1521_Type);
   61256          40 :         PyModule_AddObject(m, "NetSrvInfo1521", (PyObject *)(void *)&srvsvc_NetSrvInfo1521_Type);
   61257          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1522_Type);
   61258          40 :         PyModule_AddObject(m, "NetSrvInfo1522", (PyObject *)(void *)&srvsvc_NetSrvInfo1522_Type);
   61259          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1523_Type);
   61260          40 :         PyModule_AddObject(m, "NetSrvInfo1523", (PyObject *)(void *)&srvsvc_NetSrvInfo1523_Type);
   61261          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1524_Type);
   61262          40 :         PyModule_AddObject(m, "NetSrvInfo1524", (PyObject *)(void *)&srvsvc_NetSrvInfo1524_Type);
   61263          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1525_Type);
   61264          40 :         PyModule_AddObject(m, "NetSrvInfo1525", (PyObject *)(void *)&srvsvc_NetSrvInfo1525_Type);
   61265          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1528_Type);
   61266          40 :         PyModule_AddObject(m, "NetSrvInfo1528", (PyObject *)(void *)&srvsvc_NetSrvInfo1528_Type);
   61267          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1529_Type);
   61268          40 :         PyModule_AddObject(m, "NetSrvInfo1529", (PyObject *)(void *)&srvsvc_NetSrvInfo1529_Type);
   61269          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1530_Type);
   61270          40 :         PyModule_AddObject(m, "NetSrvInfo1530", (PyObject *)(void *)&srvsvc_NetSrvInfo1530_Type);
   61271          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1533_Type);
   61272          40 :         PyModule_AddObject(m, "NetSrvInfo1533", (PyObject *)(void *)&srvsvc_NetSrvInfo1533_Type);
   61273          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1534_Type);
   61274          40 :         PyModule_AddObject(m, "NetSrvInfo1534", (PyObject *)(void *)&srvsvc_NetSrvInfo1534_Type);
   61275          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1535_Type);
   61276          40 :         PyModule_AddObject(m, "NetSrvInfo1535", (PyObject *)(void *)&srvsvc_NetSrvInfo1535_Type);
   61277          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1536_Type);
   61278          40 :         PyModule_AddObject(m, "NetSrvInfo1536", (PyObject *)(void *)&srvsvc_NetSrvInfo1536_Type);
   61279          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1537_Type);
   61280          40 :         PyModule_AddObject(m, "NetSrvInfo1537", (PyObject *)(void *)&srvsvc_NetSrvInfo1537_Type);
   61281          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1538_Type);
   61282          40 :         PyModule_AddObject(m, "NetSrvInfo1538", (PyObject *)(void *)&srvsvc_NetSrvInfo1538_Type);
   61283          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1539_Type);
   61284          40 :         PyModule_AddObject(m, "NetSrvInfo1539", (PyObject *)(void *)&srvsvc_NetSrvInfo1539_Type);
   61285          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1540_Type);
   61286          40 :         PyModule_AddObject(m, "NetSrvInfo1540", (PyObject *)(void *)&srvsvc_NetSrvInfo1540_Type);
   61287          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1541_Type);
   61288          40 :         PyModule_AddObject(m, "NetSrvInfo1541", (PyObject *)(void *)&srvsvc_NetSrvInfo1541_Type);
   61289          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1542_Type);
   61290          40 :         PyModule_AddObject(m, "NetSrvInfo1542", (PyObject *)(void *)&srvsvc_NetSrvInfo1542_Type);
   61291          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1543_Type);
   61292          40 :         PyModule_AddObject(m, "NetSrvInfo1543", (PyObject *)(void *)&srvsvc_NetSrvInfo1543_Type);
   61293          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1544_Type);
   61294          40 :         PyModule_AddObject(m, "NetSrvInfo1544", (PyObject *)(void *)&srvsvc_NetSrvInfo1544_Type);
   61295          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1545_Type);
   61296          40 :         PyModule_AddObject(m, "NetSrvInfo1545", (PyObject *)(void *)&srvsvc_NetSrvInfo1545_Type);
   61297          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1546_Type);
   61298          40 :         PyModule_AddObject(m, "NetSrvInfo1546", (PyObject *)(void *)&srvsvc_NetSrvInfo1546_Type);
   61299          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1547_Type);
   61300          40 :         PyModule_AddObject(m, "NetSrvInfo1547", (PyObject *)(void *)&srvsvc_NetSrvInfo1547_Type);
   61301          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1548_Type);
   61302          40 :         PyModule_AddObject(m, "NetSrvInfo1548", (PyObject *)(void *)&srvsvc_NetSrvInfo1548_Type);
   61303          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1549_Type);
   61304          40 :         PyModule_AddObject(m, "NetSrvInfo1549", (PyObject *)(void *)&srvsvc_NetSrvInfo1549_Type);
   61305          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1550_Type);
   61306          40 :         PyModule_AddObject(m, "NetSrvInfo1550", (PyObject *)(void *)&srvsvc_NetSrvInfo1550_Type);
   61307          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1552_Type);
   61308          40 :         PyModule_AddObject(m, "NetSrvInfo1552", (PyObject *)(void *)&srvsvc_NetSrvInfo1552_Type);
   61309          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1553_Type);
   61310          40 :         PyModule_AddObject(m, "NetSrvInfo1553", (PyObject *)(void *)&srvsvc_NetSrvInfo1553_Type);
   61311          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1554_Type);
   61312          40 :         PyModule_AddObject(m, "NetSrvInfo1554", (PyObject *)(void *)&srvsvc_NetSrvInfo1554_Type);
   61313          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1555_Type);
   61314          40 :         PyModule_AddObject(m, "NetSrvInfo1555", (PyObject *)(void *)&srvsvc_NetSrvInfo1555_Type);
   61315          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1556_Type);
   61316          40 :         PyModule_AddObject(m, "NetSrvInfo1556", (PyObject *)(void *)&srvsvc_NetSrvInfo1556_Type);
   61317          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo_Type);
   61318          40 :         PyModule_AddObject(m, "NetSrvInfo", (PyObject *)(void *)&srvsvc_NetSrvInfo_Type);
   61319          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetDiskInfo0_Type);
   61320          40 :         PyModule_AddObject(m, "NetDiskInfo0", (PyObject *)(void *)&srvsvc_NetDiskInfo0_Type);
   61321          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetDiskInfo_Type);
   61322          40 :         PyModule_AddObject(m, "NetDiskInfo", (PyObject *)(void *)&srvsvc_NetDiskInfo_Type);
   61323          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_Statistics_Type);
   61324          40 :         PyModule_AddObject(m, "Statistics", (PyObject *)(void *)&srvsvc_Statistics_Type);
   61325          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo0_Type);
   61326          40 :         PyModule_AddObject(m, "NetTransportInfo0", (PyObject *)(void *)&srvsvc_NetTransportInfo0_Type);
   61327          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr0_Type);
   61328          40 :         PyModule_AddObject(m, "NetTransportCtr0", (PyObject *)(void *)&srvsvc_NetTransportCtr0_Type);
   61329          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo1_Type);
   61330          40 :         PyModule_AddObject(m, "NetTransportInfo1", (PyObject *)(void *)&srvsvc_NetTransportInfo1_Type);
   61331          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr1_Type);
   61332          40 :         PyModule_AddObject(m, "NetTransportCtr1", (PyObject *)(void *)&srvsvc_NetTransportCtr1_Type);
   61333          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo2_Type);
   61334          40 :         PyModule_AddObject(m, "NetTransportInfo2", (PyObject *)(void *)&srvsvc_NetTransportInfo2_Type);
   61335          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr2_Type);
   61336          40 :         PyModule_AddObject(m, "NetTransportCtr2", (PyObject *)(void *)&srvsvc_NetTransportCtr2_Type);
   61337          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo3_Type);
   61338          40 :         PyModule_AddObject(m, "NetTransportInfo3", (PyObject *)(void *)&srvsvc_NetTransportInfo3_Type);
   61339          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr3_Type);
   61340          40 :         PyModule_AddObject(m, "NetTransportCtr3", (PyObject *)(void *)&srvsvc_NetTransportCtr3_Type);
   61341          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr_Type);
   61342          40 :         PyModule_AddObject(m, "NetTransportCtr", (PyObject *)(void *)&srvsvc_NetTransportCtr_Type);
   61343          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfoCtr_Type);
   61344          40 :         PyModule_AddObject(m, "NetTransportInfoCtr", (PyObject *)(void *)&srvsvc_NetTransportInfoCtr_Type);
   61345          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetRemoteTODInfo_Type);
   61346          40 :         PyModule_AddObject(m, "NetRemoteTODInfo", (PyObject *)(void *)&srvsvc_NetRemoteTODInfo_Type);
   61347          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo_Type);
   61348          40 :         PyModule_AddObject(m, "NetTransportInfo", (PyObject *)(void *)&srvsvc_NetTransportInfo_Type);
   61349          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevEnum_Type);
   61350          40 :         PyModule_AddObject(m, "NetCharDevEnum", (PyObject *)(void *)&srvsvc_NetCharDevEnum_Type);
   61351          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevGetInfo_Type);
   61352          40 :         PyModule_AddObject(m, "NetCharDevGetInfo", (PyObject *)(void *)&srvsvc_NetCharDevGetInfo_Type);
   61353          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevControl_Type);
   61354          40 :         PyModule_AddObject(m, "NetCharDevControl", (PyObject *)(void *)&srvsvc_NetCharDevControl_Type);
   61355          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQEnum_Type);
   61356          40 :         PyModule_AddObject(m, "NetCharDevQEnum", (PyObject *)(void *)&srvsvc_NetCharDevQEnum_Type);
   61357          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQGetInfo_Type);
   61358          40 :         PyModule_AddObject(m, "NetCharDevQGetInfo", (PyObject *)(void *)&srvsvc_NetCharDevQGetInfo_Type);
   61359          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQSetInfo_Type);
   61360          40 :         PyModule_AddObject(m, "NetCharDevQSetInfo", (PyObject *)(void *)&srvsvc_NetCharDevQSetInfo_Type);
   61361          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQPurge_Type);
   61362          40 :         PyModule_AddObject(m, "NetCharDevQPurge", (PyObject *)(void *)&srvsvc_NetCharDevQPurge_Type);
   61363          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQPurgeSelf_Type);
   61364          40 :         PyModule_AddObject(m, "NetCharDevQPurgeSelf", (PyObject *)(void *)&srvsvc_NetCharDevQPurgeSelf_Type);
   61365          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnEnum_Type);
   61366          40 :         PyModule_AddObject(m, "NetConnEnum", (PyObject *)(void *)&srvsvc_NetConnEnum_Type);
   61367          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileEnum_Type);
   61368          40 :         PyModule_AddObject(m, "NetFileEnum", (PyObject *)(void *)&srvsvc_NetFileEnum_Type);
   61369          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileGetInfo_Type);
   61370          40 :         PyModule_AddObject(m, "NetFileGetInfo", (PyObject *)(void *)&srvsvc_NetFileGetInfo_Type);
   61371          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileClose_Type);
   61372          40 :         PyModule_AddObject(m, "NetFileClose", (PyObject *)(void *)&srvsvc_NetFileClose_Type);
   61373          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessEnum_Type);
   61374          40 :         PyModule_AddObject(m, "NetSessEnum", (PyObject *)(void *)&srvsvc_NetSessEnum_Type);
   61375          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessDel_Type);
   61376          40 :         PyModule_AddObject(m, "NetSessDel", (PyObject *)(void *)&srvsvc_NetSessDel_Type);
   61377          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareAdd_Type);
   61378          40 :         PyModule_AddObject(m, "NetShareAdd", (PyObject *)(void *)&srvsvc_NetShareAdd_Type);
   61379          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareEnumAll_Type);
   61380          40 :         PyModule_AddObject(m, "NetShareEnumAll", (PyObject *)(void *)&srvsvc_NetShareEnumAll_Type);
   61381          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareGetInfo_Type);
   61382          40 :         PyModule_AddObject(m, "NetShareGetInfo", (PyObject *)(void *)&srvsvc_NetShareGetInfo_Type);
   61383          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareSetInfo_Type);
   61384          40 :         PyModule_AddObject(m, "NetShareSetInfo", (PyObject *)(void *)&srvsvc_NetShareSetInfo_Type);
   61385          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareDel_Type);
   61386          40 :         PyModule_AddObject(m, "NetShareDel", (PyObject *)(void *)&srvsvc_NetShareDel_Type);
   61387          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareDelSticky_Type);
   61388          40 :         PyModule_AddObject(m, "NetShareDelSticky", (PyObject *)(void *)&srvsvc_NetShareDelSticky_Type);
   61389          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCheck_Type);
   61390          40 :         PyModule_AddObject(m, "NetShareCheck", (PyObject *)(void *)&srvsvc_NetShareCheck_Type);
   61391          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvGetInfo_Type);
   61392          40 :         PyModule_AddObject(m, "NetSrvGetInfo", (PyObject *)(void *)&srvsvc_NetSrvGetInfo_Type);
   61393          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvSetInfo_Type);
   61394          40 :         PyModule_AddObject(m, "NetSrvSetInfo", (PyObject *)(void *)&srvsvc_NetSrvSetInfo_Type);
   61395          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetDiskEnum_Type);
   61396          40 :         PyModule_AddObject(m, "NetDiskEnum", (PyObject *)(void *)&srvsvc_NetDiskEnum_Type);
   61397          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetServerStatisticsGet_Type);
   61398          40 :         PyModule_AddObject(m, "NetServerStatisticsGet", (PyObject *)(void *)&srvsvc_NetServerStatisticsGet_Type);
   61399          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportAdd_Type);
   61400          40 :         PyModule_AddObject(m, "NetTransportAdd", (PyObject *)(void *)&srvsvc_NetTransportAdd_Type);
   61401          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportEnum_Type);
   61402          40 :         PyModule_AddObject(m, "NetTransportEnum", (PyObject *)(void *)&srvsvc_NetTransportEnum_Type);
   61403          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportDel_Type);
   61404          40 :         PyModule_AddObject(m, "NetTransportDel", (PyObject *)(void *)&srvsvc_NetTransportDel_Type);
   61405          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetRemoteTOD_Type);
   61406          40 :         PyModule_AddObject(m, "NetRemoteTOD", (PyObject *)(void *)&srvsvc_NetRemoteTOD_Type);
   61407          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSetServiceBits_Type);
   61408          40 :         PyModule_AddObject(m, "NetSetServiceBits", (PyObject *)(void *)&srvsvc_NetSetServiceBits_Type);
   61409          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetPathType_Type);
   61410          40 :         PyModule_AddObject(m, "NetPathType", (PyObject *)(void *)&srvsvc_NetPathType_Type);
   61411          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetPathCanonicalize_Type);
   61412          40 :         PyModule_AddObject(m, "NetPathCanonicalize", (PyObject *)(void *)&srvsvc_NetPathCanonicalize_Type);
   61413          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetPathCompare_Type);
   61414          40 :         PyModule_AddObject(m, "NetPathCompare", (PyObject *)(void *)&srvsvc_NetPathCompare_Type);
   61415          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetNameValidate_Type);
   61416          40 :         PyModule_AddObject(m, "NetNameValidate", (PyObject *)(void *)&srvsvc_NetNameValidate_Type);
   61417          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetPRNameCompare_Type);
   61418          40 :         PyModule_AddObject(m, "NetPRNameCompare", (PyObject *)(void *)&srvsvc_NetPRNameCompare_Type);
   61419          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareEnum_Type);
   61420          40 :         PyModule_AddObject(m, "NetShareEnum", (PyObject *)(void *)&srvsvc_NetShareEnum_Type);
   61421          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareDelStart_Type);
   61422          40 :         PyModule_AddObject(m, "NetShareDelStart", (PyObject *)(void *)&srvsvc_NetShareDelStart_Type);
   61423          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareDelCommit_Type);
   61424          40 :         PyModule_AddObject(m, "NetShareDelCommit", (PyObject *)(void *)&srvsvc_NetShareDelCommit_Type);
   61425          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetGetFileSecurity_Type);
   61426          40 :         PyModule_AddObject(m, "NetGetFileSecurity", (PyObject *)(void *)&srvsvc_NetGetFileSecurity_Type);
   61427          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSetFileSecurity_Type);
   61428          40 :         PyModule_AddObject(m, "NetSetFileSecurity", (PyObject *)(void *)&srvsvc_NetSetFileSecurity_Type);
   61429          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetServerTransportAddEx_Type);
   61430          40 :         PyModule_AddObject(m, "NetServerTransportAddEx", (PyObject *)(void *)&srvsvc_NetServerTransportAddEx_Type);
   61431          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetServerSetServiceBitsEx_Type);
   61432          40 :         PyModule_AddObject(m, "NetServerSetServiceBitsEx", (PyObject *)(void *)&srvsvc_NetServerSetServiceBitsEx_Type);
   61433          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_InterfaceType);
   61434          40 :         PyModule_AddObject(m, "srvsvc", (PyObject *)(void *)&srvsvc_InterfaceType);
   61435          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_SyntaxType);
   61436          40 :         PyModule_AddObject(m, "srvsvc_abstract_syntax", (PyObject *)(void *)&srvsvc_SyntaxType);
   61437          37 :         Py_INCREF((PyObject *)(void *)&srvsvc_SyntaxType);
   61438          40 :         PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&srvsvc_SyntaxType);
   61439             : #ifdef PY_MOD_SRVSVC_PATCH
   61440             :         PY_MOD_SRVSVC_PATCH(m);
   61441             : #endif
   61442          40 :         out:
   61443          40 :         Py_XDECREF(dep_samba_dcerpc_misc);
   61444          40 :         Py_XDECREF(dep_samba_dcerpc_security);
   61445          40 :         Py_XDECREF(dep_samba_dcerpc_svcctl);
   61446          40 :         Py_XDECREF(dep_talloc);
   61447          40 :         Py_XDECREF(dep_samba_dcerpc_base);
   61448          39 :         return m;
   61449             : 
   61450             : }

Generated by: LCOV version 1.14