LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - py_drsblobs.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 1752 8046 21.8 %
Date: 2021-09-23 10:06:22 Functions: 175 699 25.0 %

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