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 fix-15632 9995c5c2 Lines: 1851 8699 21.3 %
Date: 2024-04-13 12:30:31 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 "lib/replace/system/python.h"
       5             : #include "python/py3compat.h"
       6             : #include "includes.h"
       7             : #include "python/modules.h"
       8             : #include <pytalloc.h>
       9             : #include "librpc/rpc/pyrpc.h"
      10             : #include "librpc/rpc/pyrpc_util.h"
      11             : #include "bin/default/librpc/gen_ndr/ndr_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      114202 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
      33             : {
      34      114202 :         switch (var_size) {
      35         171 :         case 8:
      36         171 :                 return UINT64_MAX;
      37       26159 :         case 4:
      38       26159 :                 return UINT32_MAX;
      39           0 :         case 2:
      40           0 :                 return UINT16_MAX;
      41       87872 :         case 1:
      42       87872 :                 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    46587544 : static PyObject *py_replPropertyMetaData1_get_attid(PyObject *obj, void *closure)
     157             : {
     158    46587544 :         struct replPropertyMetaData1 *object = pytalloc_get_ptr(obj);
     159     4235897 :         PyObject *py_attid;
     160    46587544 :         py_attid = PyLong_FromUnsignedLongLong((uint32_t)(object->attid));
     161    46587544 :         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 = 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          15 :                         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        3659 : static PyObject *py_replPropertyMetaData1_get_version(PyObject *obj, void *closure)
     195             : {
     196        3659 :         struct replPropertyMetaData1 *object = pytalloc_get_ptr(obj);
     197          48 :         PyObject *py_version;
     198        3659 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
     199        3659 :         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 = 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          15 :                         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      199645 : static PyObject *py_replPropertyMetaData1_get_originating_change_time(PyObject *obj, void *closure)
     233             : {
     234      199645 :         struct replPropertyMetaData1 *object = pytalloc_get_ptr(obj);
     235         414 :         PyObject *py_originating_change_time;
     236      199645 :         py_originating_change_time = PyLong_FromUnsignedLongLong(object->originating_change_time);
     237      199645 :         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 = 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           0 :                         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    14128126 : static PyObject *py_replPropertyMetaData1_get_originating_invocation_id(PyObject *obj, void *closure)
     271             : {
     272    14128126 :         struct replPropertyMetaData1 *object = pytalloc_get_ptr(obj);
     273     1197243 :         PyObject *py_originating_invocation_id;
     274    14128126 :         py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
     275    14128126 :         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 = 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      107422 : static PyObject *py_replPropertyMetaData1_get_originating_usn(PyObject *obj, void *closure)
     295             : {
     296      107422 :         struct replPropertyMetaData1 *object = pytalloc_get_ptr(obj);
     297          48 :         PyObject *py_originating_usn;
     298      107422 :         py_originating_usn = PyLong_FromUnsignedLongLong(object->originating_usn);
     299      107422 :         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 = 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           0 :                         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     2991036 : static PyObject *py_replPropertyMetaData1_get_local_usn(PyObject *obj, void *closure)
     333             : {
     334     2991036 :         struct replPropertyMetaData1 *object = pytalloc_get_ptr(obj);
     335        3880 :         PyObject *py_local_usn;
     336     2991036 :         py_local_usn = PyLong_FromUnsignedLongLong(object->local_usn);
     337     2991036 :         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 = 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           0 :                         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          70 : static PyObject *py_replPropertyMetaData1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     411             : {
     412          70 :         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 = pytalloc_get_ptr(py_obj);
     418           0 :         PyObject *ret = NULL;
     419           0 :         DATA_BLOB blob;
     420           0 :         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          55 : static PyObject *py_replPropertyMetaData1_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
     439             : {
     440          55 :         struct replPropertyMetaData1 *object = pytalloc_get_ptr(py_obj);
     441          55 :         DATA_BLOB blob = {.data = NULL, .length = 0};
     442          55 :         Py_ssize_t blob_length = 0;
     443           0 :         enum ndr_err_code err;
     444          55 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
     445          55 :         PyObject *allow_remaining_obj = NULL;
     446          55 :         bool allow_remaining = false;
     447             : 
     448          55 :         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          55 :         blob.length = blob_length;
     455             : 
     456          55 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
     457           0 :                 allow_remaining = true;
     458             :         }
     459             : 
     460          55 :         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          55 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_replPropertyMetaData1);
     464             :         }
     465          55 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
     466           0 :                 PyErr_SetNdrError(err);
     467           0 :                 return NULL;
     468             :         }
     469             : 
     470          55 :         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 = pytalloc_get_ptr(py_obj);
     476           0 :         PyObject *ret;
     477           0 :         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 = pytalloc_get_ptr(obj);
     507           8 :         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 = 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       10103 :                         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 = pytalloc_get_ptr(obj);
     545           0 :         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 = 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           0 :                         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     2156597 : static PyObject *py_replPropertyMetaDataCtr1_get_array(PyObject *obj, void *closure)
     581             : {
     582     2156597 :         struct replPropertyMetaDataCtr1 *object = pytalloc_get_ptr(obj);
     583      182634 :         PyObject *py_array;
     584     2156597 :         py_array = PyList_New(object->count);
     585     2156597 :         if (py_array == NULL) {
     586           0 :                 return NULL;
     587             :         }
     588             :         {
     589             :                 int array_cntr_0;
     590    36517156 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
     591     2880879 :                         PyObject *py_array_0;
     592    34360559 :                         py_array_0 = pytalloc_reference_ex(&replPropertyMetaData1_Type, object->array, &(object->array)[array_cntr_0]);
     593    34360559 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
     594             :                 }
     595             :         }
     596     1973963 :         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 = 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       20202 :                 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     1154582 :                 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     2089448 : static PyObject *py_import_replPropertyMetaDataCtr(TALLOC_CTX *mem_ctx, int level, union replPropertyMetaDataCtr *in)
     666             : {
     667      162459 :         PyObject *ret;
     668             : 
     669     2089448 :         switch (level) {
     670     2089448 :                 case 1:
     671     2089448 :                         ret = pytalloc_reference_ex(&replPropertyMetaDataCtr1_Type, mem_ctx, &in->ctr1);
     672     2089448 :                         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     2089448 : static PyObject *py_replPropertyMetaDataCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     706             : {
     707     2089448 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
     708     2089448 :         PyObject *mem_ctx_obj = NULL;
     709     2089448 :         TALLOC_CTX *mem_ctx = NULL;
     710     2089448 :         int level = 0;
     711     2089448 :         PyObject *in_obj = NULL;
     712     2089448 :         union replPropertyMetaDataCtr *in = NULL;
     713             : 
     714     2089448 :         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     2089448 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
     722     2089448 :         if (mem_ctx == NULL) {
     723           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
     724           0 :                 return NULL;
     725             :         }
     726     2089448 :         in = (union replPropertyMetaDataCtr *)pytalloc_get_ptr(in_obj);
     727     2089448 :         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     2089448 :         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 = pytalloc_get_ptr(obj);
     795           4 :         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 = 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           5 :                         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 = pytalloc_get_ptr(obj);
     833           0 :         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 = 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           0 :                         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     2089448 : static PyObject *py_replPropertyMetaDataBlob_get_ctr(PyObject *obj, void *closure)
     869             : {
     870     2089448 :         struct replPropertyMetaDataBlob *object = pytalloc_get_ptr(obj);
     871      162459 :         PyObject *py_ctr;
     872     2089448 :         py_ctr = pyrpc_import_union(&replPropertyMetaDataCtr_Type, pytalloc_get_mem_ctx(obj), object->version, &object->ctr, "union replPropertyMetaDataCtr");
     873     2089448 :         if (py_ctr == NULL) {
     874           0 :                 return NULL;
     875             :         }
     876     1926989 :         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 = 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           5 :                 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     1988309 : static PyObject *py_replPropertyMetaDataBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     920             : {
     921     1988309 :         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 = pytalloc_get_ptr(py_obj);
     927       33668 :         PyObject *ret = NULL;
     928       10099 :         DATA_BLOB blob;
     929       10099 :         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     1988304 : static PyObject *py_replPropertyMetaDataBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
     948             : {
     949     1988304 :         struct replPropertyMetaDataBlob *object = pytalloc_get_ptr(py_obj);
     950     1988304 :         DATA_BLOB blob = {.data = NULL, .length = 0};
     951     1988304 :         Py_ssize_t blob_length = 0;
     952      162282 :         enum ndr_err_code err;
     953     1988304 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
     954     1988304 :         PyObject *allow_remaining_obj = NULL;
     955     1988304 :         bool allow_remaining = false;
     956             : 
     957     1988304 :         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     1988304 :         blob.length = blob_length;
     964             : 
     965     1988304 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
     966           0 :                 allow_remaining = true;
     967             :         }
     968             : 
     969     1826022 :         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     1988304 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_replPropertyMetaDataBlob);
     973             :         }
     974     1988304 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
     975           0 :                 PyErr_SetNdrError(err);
     976           0 :                 return NULL;
     977             :         }
     978             : 
     979     1988304 :         Py_RETURN_NONE;
     980             : }
     981             : 
     982         288 : static PyObject *py_replPropertyMetaDataBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
     983             : {
     984         288 :         struct replPropertyMetaDataBlob *object = pytalloc_get_ptr(py_obj);
     985           0 :         PyObject *ret;
     986           0 :         char *retstr;
     987             : 
     988         288 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_replPropertyMetaDataBlob, "replPropertyMetaDataBlob", object);
     989         288 :         ret = PyUnicode_FromString(retstr);
     990         288 :         talloc_free(retstr);
     991             : 
     992         288 :         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 = pytalloc_get_ptr(obj);
    1016           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    1054           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    1092           0 :         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           0 :                         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 = 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           0 :                 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 = pytalloc_get_ptr(obj);
    1178           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    1216           0 :         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 = 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           0 :                         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          39 : static PyObject *py_replUpToDateVectorCtr2_get_cursors(PyObject *obj, void *closure)
    1252             : {
    1253          39 :         struct replUpToDateVectorCtr2 *object = pytalloc_get_ptr(obj);
    1254           0 :         PyObject *py_cursors;
    1255          39 :         py_cursors = PyList_New(object->count);
    1256          39 :         if (py_cursors == NULL) {
    1257           0 :                 return NULL;
    1258             :         }
    1259             :         {
    1260             :                 int cursors_cntr_0;
    1261          78 :                 for (cursors_cntr_0 = 0; cursors_cntr_0 < (object->count); cursors_cntr_0++) {
    1262           0 :                         PyObject *py_cursors_0;
    1263          39 :                         py_cursors_0 = pytalloc_reference_ex(drsuapi_DsReplicaCursor2_Type, object->cursors, &(object->cursors)[cursors_cntr_0]);
    1264          39 :                         PyList_SetItem(py_cursors, cursors_cntr_0, py_cursors_0);
    1265             :                 }
    1266             :         }
    1267          39 :         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 = 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           0 :                 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         189 : static PyObject *py_import_replUpToDateVectorCtr(TALLOC_CTX *mem_ctx, int level, union replUpToDateVectorCtr *in)
    1337             : {
    1338           0 :         PyObject *ret;
    1339             : 
    1340         189 :         switch (level) {
    1341           0 :                 case 1:
    1342           0 :                         ret = pytalloc_reference_ex(&replUpToDateVectorCtr1_Type, mem_ctx, &in->ctr1);
    1343           0 :                         return ret;
    1344             : 
    1345         189 :                 case 2:
    1346         189 :                         ret = pytalloc_reference_ex(&replUpToDateVectorCtr2_Type, mem_ctx, &in->ctr2);
    1347         189 :                         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         189 : static PyObject *py_replUpToDateVectorCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1394             : {
    1395         189 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    1396         189 :         PyObject *mem_ctx_obj = NULL;
    1397         189 :         TALLOC_CTX *mem_ctx = NULL;
    1398         189 :         int level = 0;
    1399         189 :         PyObject *in_obj = NULL;
    1400         189 :         union replUpToDateVectorCtr *in = NULL;
    1401             : 
    1402         189 :         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         189 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    1410         189 :         if (mem_ctx == NULL) {
    1411           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    1412           0 :                 return NULL;
    1413             :         }
    1414         189 :         in = (union replUpToDateVectorCtr *)pytalloc_get_ptr(in_obj);
    1415         189 :         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         189 :         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          39 : static PyObject *py_replUpToDateVectorBlob_get_version(PyObject *obj, void *closure)
    1481             : {
    1482          39 :         struct replUpToDateVectorBlob *object = pytalloc_get_ptr(obj);
    1483           0 :         PyObject *py_version;
    1484          39 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
    1485          39 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    1521           0 :         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 = 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           0 :                         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         189 : static PyObject *py_replUpToDateVectorBlob_get_ctr(PyObject *obj, void *closure)
    1557             : {
    1558         189 :         struct replUpToDateVectorBlob *object = pytalloc_get_ptr(obj);
    1559           0 :         PyObject *py_ctr;
    1560         189 :         py_ctr = pyrpc_import_union(&replUpToDateVectorCtr_Type, pytalloc_get_mem_ctx(obj), object->version, &object->ctr, "union replUpToDateVectorCtr");
    1561         189 :         if (py_ctr == NULL) {
    1562           0 :                 return NULL;
    1563             :         }
    1564         189 :         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 = 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           0 :                 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         114 : static PyObject *py_replUpToDateVectorBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1608             : {
    1609         114 :         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 = pytalloc_get_ptr(py_obj);
    1615          75 :         PyObject *ret = NULL;
    1616           0 :         DATA_BLOB blob;
    1617           0 :         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          39 : static PyObject *py_replUpToDateVectorBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1636             : {
    1637          39 :         struct replUpToDateVectorBlob *object = pytalloc_get_ptr(py_obj);
    1638          39 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1639          39 :         Py_ssize_t blob_length = 0;
    1640           0 :         enum ndr_err_code err;
    1641          39 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1642          39 :         PyObject *allow_remaining_obj = NULL;
    1643          39 :         bool allow_remaining = false;
    1644             : 
    1645          39 :         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          39 :         blob.length = blob_length;
    1652             : 
    1653          39 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1654           0 :                 allow_remaining = true;
    1655             :         }
    1656             : 
    1657          39 :         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          39 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_replUpToDateVectorBlob);
    1661             :         }
    1662          39 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1663           0 :                 PyErr_SetNdrError(err);
    1664           0 :                 return NULL;
    1665             :         }
    1666             : 
    1667          39 :         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 = pytalloc_get_ptr(py_obj);
    1673           0 :         PyObject *ret;
    1674           0 :         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 = pytalloc_get_ptr(obj);
    1704           0 :         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 = 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           0 :                         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         982 : static PyObject *py_repsFromTo1OtherInfo_get_dns_name(PyObject *obj, void *closure)
    1740             : {
    1741         982 :         struct repsFromTo1OtherInfo *object = pytalloc_get_ptr(obj);
    1742          25 :         PyObject *py_dns_name;
    1743         982 :         if (object->dns_name == NULL) {
    1744           0 :                 py_dns_name = Py_None;
    1745           0 :                 Py_INCREF(py_dns_name);
    1746             :         } else {
    1747         982 :                 py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
    1748             :         }
    1749         982 :         return py_dns_name;
    1750             : }
    1751             : 
    1752         124 : static int py_repsFromTo1OtherInfo_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
    1753             : {
    1754         124 :         struct repsFromTo1OtherInfo *object = pytalloc_get_ptr(py_obj);
    1755         124 :         if (value == NULL) {
    1756           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_name");
    1757           0 :                 return -1;
    1758             :         }
    1759             :         {
    1760          35 :                 const char *test_str;
    1761          35 :                 const char *talloc_str;
    1762         124 :                 PyObject *unicode = NULL;
    1763         124 :                 if (PyUnicode_Check(value)) {
    1764         124 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    1765         124 :                         if (unicode == NULL) {
    1766           0 :                                 return -1;
    1767             :                         }
    1768         124 :                         test_str = PyBytes_AS_STRING(unicode);
    1769           0 :                 } else if (PyBytes_Check(value)) {
    1770           0 :                         test_str = PyBytes_AS_STRING(value);
    1771             :                 } else {
    1772           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    1773           0 :                         return -1;
    1774             :                 }
    1775         124 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    1776         124 :                 if (unicode != NULL) {
    1777         124 :                         Py_DECREF(unicode);
    1778             :                 }
    1779         124 :                 if (talloc_str == NULL) {
    1780           0 :                         PyErr_NoMemory();
    1781           0 :                         return -1;
    1782             :                 }
    1783         124 :                 object->dns_name = talloc_str;
    1784             :         }
    1785         124 :         return 0;
    1786             : }
    1787             : 
    1788             : static PyGetSetDef py_repsFromTo1OtherInfo_getsetters[] = {
    1789             :         {
    1790             :                 .name = discard_const_p(char, "__dns_name_size"),
    1791             :                 .get = py_repsFromTo1OtherInfo_get___dns_name_size,
    1792             :                 .set = py_repsFromTo1OtherInfo_set___dns_name_size,
    1793             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1794             :         },
    1795             :         {
    1796             :                 .name = discard_const_p(char, "dns_name"),
    1797             :                 .get = py_repsFromTo1OtherInfo_get_dns_name,
    1798             :                 .set = py_repsFromTo1OtherInfo_set_dns_name,
    1799             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    1800             :         },
    1801             :         { .name = NULL }
    1802             : };
    1803             : 
    1804         124 : static PyObject *py_repsFromTo1OtherInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1805             : {
    1806         124 :         return pytalloc_new(struct repsFromTo1OtherInfo, type);
    1807             : }
    1808             : 
    1809           0 : static PyObject *py_repsFromTo1OtherInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1810             : {
    1811           0 :         struct repsFromTo1OtherInfo *object = pytalloc_get_ptr(py_obj);
    1812           0 :         PyObject *ret = NULL;
    1813           0 :         DATA_BLOB blob;
    1814           0 :         enum ndr_err_code err;
    1815           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1816           0 :         if (tmp_ctx == NULL) {
    1817           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1818           0 :                 return NULL;
    1819             :         }
    1820           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_repsFromTo1OtherInfo);
    1821           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1822           0 :                 TALLOC_FREE(tmp_ctx);
    1823           0 :                 PyErr_SetNdrError(err);
    1824           0 :                 return NULL;
    1825             :         }
    1826             : 
    1827           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1828           0 :         TALLOC_FREE(tmp_ctx);
    1829           0 :         return ret;
    1830             : }
    1831             : 
    1832           0 : static PyObject *py_repsFromTo1OtherInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1833             : {
    1834           0 :         struct repsFromTo1OtherInfo *object = pytalloc_get_ptr(py_obj);
    1835           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1836           0 :         Py_ssize_t blob_length = 0;
    1837           0 :         enum ndr_err_code err;
    1838           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1839           0 :         PyObject *allow_remaining_obj = NULL;
    1840           0 :         bool allow_remaining = false;
    1841             : 
    1842           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1843             :                 discard_const_p(char *, kwnames),
    1844             :                 &blob.data, &blob_length,
    1845             :                 &allow_remaining_obj)) {
    1846           0 :                 return NULL;
    1847             :         }
    1848           0 :         blob.length = blob_length;
    1849             : 
    1850           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1851           0 :                 allow_remaining = true;
    1852             :         }
    1853             : 
    1854           0 :         if (allow_remaining) {
    1855           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromTo1OtherInfo);
    1856             :         } else {
    1857           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromTo1OtherInfo);
    1858             :         }
    1859           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1860           0 :                 PyErr_SetNdrError(err);
    1861           0 :                 return NULL;
    1862             :         }
    1863             : 
    1864           0 :         Py_RETURN_NONE;
    1865             : }
    1866             : 
    1867           0 : static PyObject *py_repsFromTo1OtherInfo_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1868             : {
    1869           0 :         struct repsFromTo1OtherInfo *object = pytalloc_get_ptr(py_obj);
    1870           0 :         PyObject *ret;
    1871           0 :         char *retstr;
    1872             : 
    1873           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_repsFromTo1OtherInfo, "repsFromTo1OtherInfo", object);
    1874           0 :         ret = PyUnicode_FromString(retstr);
    1875           0 :         talloc_free(retstr);
    1876             : 
    1877           0 :         return ret;
    1878             : }
    1879             : 
    1880             : static PyMethodDef py_repsFromTo1OtherInfo_methods[] = {
    1881             :         { "__ndr_pack__", (PyCFunction)py_repsFromTo1OtherInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1882             :         { "__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" },
    1883             :         { "__ndr_print__", (PyCFunction)py_repsFromTo1OtherInfo_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1884             :         { NULL, NULL, 0, NULL }
    1885             : };
    1886             : 
    1887             : 
    1888             : static PyTypeObject repsFromTo1OtherInfo_Type = {
    1889             :         PyVarObject_HEAD_INIT(NULL, 0)
    1890             :         .tp_name = "drsblobs.repsFromTo1OtherInfo",
    1891             :         .tp_getset = py_repsFromTo1OtherInfo_getsetters,
    1892             :         .tp_methods = py_repsFromTo1OtherInfo_methods,
    1893             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1894             :         .tp_new = py_repsFromTo1OtherInfo_new,
    1895             : };
    1896             : 
    1897             : 
    1898           0 : static PyObject *py_repsFromTo1_get_blobsize(PyObject *obj, void *closure)
    1899             : {
    1900           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    1901           0 :         PyObject *py_blobsize;
    1902           0 :         py_blobsize = PyLong_FromUnsignedLongLong((uint32_t)(object->blobsize));
    1903           0 :         return py_blobsize;
    1904             : }
    1905             : 
    1906           0 : static int py_repsFromTo1_set_blobsize(PyObject *py_obj, PyObject *value, void *closure)
    1907             : {
    1908           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    1909           0 :         if (value == NULL) {
    1910           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->blobsize");
    1911           0 :                 return -1;
    1912             :         }
    1913             :         {
    1914           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->blobsize));
    1915           0 :                 if (PyLong_Check(value)) {
    1916           0 :                         unsigned long long test_var;
    1917           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1918           0 :                         if (PyErr_Occurred() != NULL) {
    1919           0 :                                 return -1;
    1920             :                         }
    1921           0 :                         if (test_var > uint_max) {
    1922           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1923             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1924           0 :                                 return -1;
    1925             :                         }
    1926           0 :                         object->blobsize = test_var;
    1927             :                 } else {
    1928           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1929             :                           PyLong_Type.tp_name);
    1930           0 :                         return -1;
    1931             :                 }
    1932             :         }
    1933           0 :         return 0;
    1934             : }
    1935             : 
    1936        1058 : static PyObject *py_repsFromTo1_get_consecutive_sync_failures(PyObject *obj, void *closure)
    1937             : {
    1938        1058 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    1939          45 :         PyObject *py_consecutive_sync_failures;
    1940        1058 :         py_consecutive_sync_failures = PyLong_FromUnsignedLongLong((uint32_t)(object->consecutive_sync_failures));
    1941        1058 :         return py_consecutive_sync_failures;
    1942             : }
    1943             : 
    1944           0 : static int py_repsFromTo1_set_consecutive_sync_failures(PyObject *py_obj, PyObject *value, void *closure)
    1945             : {
    1946           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    1947           0 :         if (value == NULL) {
    1948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->consecutive_sync_failures");
    1949           0 :                 return -1;
    1950             :         }
    1951             :         {
    1952           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->consecutive_sync_failures));
    1953           0 :                 if (PyLong_Check(value)) {
    1954           0 :                         unsigned long long test_var;
    1955           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1956           0 :                         if (PyErr_Occurred() != NULL) {
    1957           0 :                                 return -1;
    1958             :                         }
    1959           0 :                         if (test_var > uint_max) {
    1960           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1961             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1962           0 :                                 return -1;
    1963             :                         }
    1964           0 :                         object->consecutive_sync_failures = test_var;
    1965             :                 } else {
    1966           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1967             :                           PyLong_Type.tp_name);
    1968           0 :                         return -1;
    1969             :                 }
    1970             :         }
    1971           0 :         return 0;
    1972             : }
    1973             : 
    1974        1058 : static PyObject *py_repsFromTo1_get_last_success(PyObject *obj, void *closure)
    1975             : {
    1976        1058 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    1977          45 :         PyObject *py_last_success;
    1978        1058 :         py_last_success = PyLong_FromUnsignedLongLong(object->last_success);
    1979        1058 :         return py_last_success;
    1980             : }
    1981             : 
    1982           0 : static int py_repsFromTo1_set_last_success(PyObject *py_obj, PyObject *value, void *closure)
    1983             : {
    1984           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    1985           0 :         if (value == NULL) {
    1986           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_success");
    1987           0 :                 return -1;
    1988             :         }
    1989             :         {
    1990           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_success));
    1991           0 :                 if (PyLong_Check(value)) {
    1992           0 :                         unsigned long long test_var;
    1993           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1994           0 :                         if (PyErr_Occurred() != NULL) {
    1995           0 :                                 return -1;
    1996             :                         }
    1997           0 :                         if (test_var > uint_max) {
    1998           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1999             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2000           0 :                                 return -1;
    2001             :                         }
    2002           0 :                         object->last_success = test_var;
    2003             :                 } else {
    2004           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2005             :                           PyLong_Type.tp_name);
    2006           0 :                         return -1;
    2007             :                 }
    2008             :         }
    2009           0 :         return 0;
    2010             : }
    2011             : 
    2012        1058 : static PyObject *py_repsFromTo1_get_last_attempt(PyObject *obj, void *closure)
    2013             : {
    2014        1058 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    2015          45 :         PyObject *py_last_attempt;
    2016        1058 :         py_last_attempt = PyLong_FromUnsignedLongLong(object->last_attempt);
    2017        1058 :         return py_last_attempt;
    2018             : }
    2019             : 
    2020           0 : static int py_repsFromTo1_set_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
    2021             : {
    2022           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2023           0 :         if (value == NULL) {
    2024           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_attempt");
    2025           0 :                 return -1;
    2026             :         }
    2027             :         {
    2028           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_attempt));
    2029           0 :                 if (PyLong_Check(value)) {
    2030           0 :                         unsigned long long test_var;
    2031           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2032           0 :                         if (PyErr_Occurred() != NULL) {
    2033           0 :                                 return -1;
    2034             :                         }
    2035           0 :                         if (test_var > uint_max) {
    2036           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2037             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2038           0 :                                 return -1;
    2039             :                         }
    2040           0 :                         object->last_attempt = test_var;
    2041             :                 } else {
    2042           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2043             :                           PyLong_Type.tp_name);
    2044           0 :                         return -1;
    2045             :                 }
    2046             :         }
    2047           0 :         return 0;
    2048             : }
    2049             : 
    2050           0 : static PyObject *py_repsFromTo1_get_result_last_attempt(PyObject *obj, void *closure)
    2051             : {
    2052           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    2053           0 :         PyObject *py_result_last_attempt;
    2054           0 :         py_result_last_attempt = PyErr_FromWERROR(object->result_last_attempt);
    2055           0 :         return py_result_last_attempt;
    2056             : }
    2057             : 
    2058           1 : static int py_repsFromTo1_set_result_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
    2059             : {
    2060           1 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2061           1 :         if (value == NULL) {
    2062           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->result_last_attempt");
    2063           0 :                 return -1;
    2064             :         }
    2065           1 :         object->result_last_attempt = W_ERROR(PyLong_AsLong(value));
    2066           1 :         return 0;
    2067             : }
    2068             : 
    2069        2088 : static PyObject *py_repsFromTo1_get_other_info(PyObject *obj, void *closure)
    2070             : {
    2071        2088 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    2072          85 :         PyObject *py_other_info;
    2073        2088 :         if (object->other_info == NULL) {
    2074           0 :                 Py_RETURN_NONE;
    2075             :         }
    2076        2088 :         if (object->other_info == NULL) {
    2077           0 :                 py_other_info = Py_None;
    2078           0 :                 Py_INCREF(py_other_info);
    2079             :         } else {
    2080        2088 :                 py_other_info = pytalloc_reference_ex(&repsFromTo1OtherInfo_Type, object->other_info, object->other_info);
    2081             :         }
    2082        2088 :         return py_other_info;
    2083             : }
    2084             : 
    2085         124 : static int py_repsFromTo1_set_other_info(PyObject *py_obj, PyObject *value, void *closure)
    2086             : {
    2087         124 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2088         124 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->other_info));
    2089         124 :         if (value == NULL) {
    2090           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->other_info");
    2091           0 :                 return -1;
    2092             :         }
    2093         124 :         if (value == Py_None) {
    2094           0 :                 object->other_info = NULL;
    2095             :         } else {
    2096         124 :                 object->other_info = NULL;
    2097         124 :                 PY_CHECK_TYPE(&repsFromTo1OtherInfo_Type, value, return -1;);
    2098         124 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2099           0 :                         PyErr_NoMemory();
    2100           0 :                         return -1;
    2101             :                 }
    2102         124 :                 object->other_info = (struct repsFromTo1OtherInfo *)pytalloc_get_ptr(value);
    2103             :         }
    2104          89 :         return 0;
    2105             : }
    2106             : 
    2107           0 : static PyObject *py_repsFromTo1_get_other_info_length(PyObject *obj, void *closure)
    2108             : {
    2109           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    2110           0 :         PyObject *py_other_info_length;
    2111           0 :         py_other_info_length = PyLong_FromUnsignedLongLong((uint32_t)(object->other_info_length));
    2112           0 :         return py_other_info_length;
    2113             : }
    2114             : 
    2115           0 : static int py_repsFromTo1_set_other_info_length(PyObject *py_obj, PyObject *value, void *closure)
    2116             : {
    2117           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2118           0 :         if (value == NULL) {
    2119           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->other_info_length");
    2120           0 :                 return -1;
    2121             :         }
    2122             :         {
    2123           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->other_info_length));
    2124           0 :                 if (PyLong_Check(value)) {
    2125           0 :                         unsigned long long test_var;
    2126           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2127           0 :                         if (PyErr_Occurred() != NULL) {
    2128           0 :                                 return -1;
    2129             :                         }
    2130           0 :                         if (test_var > uint_max) {
    2131           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2132             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2133           0 :                                 return -1;
    2134             :                         }
    2135           0 :                         object->other_info_length = test_var;
    2136             :                 } else {
    2137           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2138             :                           PyLong_Type.tp_name);
    2139           0 :                         return -1;
    2140             :                 }
    2141             :         }
    2142           0 :         return 0;
    2143             : }
    2144             : 
    2145        3696 : static PyObject *py_repsFromTo1_get_replica_flags(PyObject *obj, void *closure)
    2146             : {
    2147        3696 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    2148         390 :         PyObject *py_replica_flags;
    2149        3696 :         py_replica_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->replica_flags));
    2150        3696 :         return py_replica_flags;
    2151             : }
    2152             : 
    2153         481 : static int py_repsFromTo1_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
    2154             : {
    2155         481 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2156         481 :         if (value == NULL) {
    2157           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->replica_flags");
    2158           0 :                 return -1;
    2159             :         }
    2160             :         {
    2161         481 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->replica_flags));
    2162         481 :                 if (PyLong_Check(value)) {
    2163         135 :                         unsigned long long test_var;
    2164         481 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2165         481 :                         if (PyErr_Occurred() != NULL) {
    2166           0 :                                 return -1;
    2167             :                         }
    2168         481 :                         if (test_var > uint_max) {
    2169           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2170             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2171           0 :                                 return -1;
    2172             :                         }
    2173         481 :                         object->replica_flags = test_var;
    2174             :                 } else {
    2175           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2176             :                           PyLong_Type.tp_name);
    2177           0 :                         return -1;
    2178             :                 }
    2179             :         }
    2180         481 :         return 0;
    2181             : }
    2182             : 
    2183        1577 : static PyObject *py_repsFromTo1_get_schedule(PyObject *obj, void *closure)
    2184             : {
    2185        1577 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    2186          90 :         PyObject *py_schedule;
    2187        1577 :         py_schedule = PyList_New(84);
    2188        1577 :         if (py_schedule == NULL) {
    2189           0 :                 return NULL;
    2190             :         }
    2191             :         {
    2192             :                 int schedule_cntr_0;
    2193      134045 :                 for (schedule_cntr_0 = 0; schedule_cntr_0 < (84); schedule_cntr_0++) {
    2194        7560 :                         PyObject *py_schedule_0;
    2195      132468 :                         py_schedule_0 = PyLong_FromLong((uint16_t)((object->schedule)[schedule_cntr_0]));
    2196      132468 :                         PyList_SetItem(py_schedule, schedule_cntr_0, py_schedule_0);
    2197             :                 }
    2198             :         }
    2199        1487 :         return py_schedule;
    2200             : }
    2201             : 
    2202         138 : static int py_repsFromTo1_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
    2203             : {
    2204         138 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2205         138 :         if (value == NULL) {
    2206           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->schedule");
    2207           0 :                 return -1;
    2208             :         }
    2209         138 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2210             :         {
    2211          35 :                 int schedule_cntr_0;
    2212         138 :                 if (ARRAY_SIZE(object->schedule) != PyList_GET_SIZE(value)) {
    2213           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));
    2214           0 :                         return -1;
    2215             :                 }
    2216       11730 :                 for (schedule_cntr_0 = 0; schedule_cntr_0 < PyList_GET_SIZE(value); schedule_cntr_0++) {
    2217       11592 :                         if (PyList_GET_ITEM(value, schedule_cntr_0) == NULL) {
    2218           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->schedule)[schedule_cntr_0]");
    2219           0 :                                 return -1;
    2220             :                         }
    2221             :                         {
    2222       11592 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->schedule)[schedule_cntr_0]));
    2223       11592 :                                 if (PyLong_Check(PyList_GET_ITEM(value, schedule_cntr_0))) {
    2224        2940 :                                         unsigned long long test_var;
    2225       11592 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, schedule_cntr_0));
    2226       11592 :                                         if (PyErr_Occurred() != NULL) {
    2227           0 :                                                 return -1;
    2228             :                                         }
    2229       11592 :                                         if (test_var > uint_max) {
    2230           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2231             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    2232           0 :                                                 return -1;
    2233             :                                         }
    2234       11592 :                                         (object->schedule)[schedule_cntr_0] = test_var;
    2235             :                                 } else {
    2236           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2237             :                                           PyLong_Type.tp_name);
    2238           0 :                                         return -1;
    2239             :                                 }
    2240             :                         }
    2241             :                 }
    2242             :         }
    2243         103 :         return 0;
    2244             : }
    2245             : 
    2246           0 : static PyObject *py_repsFromTo1_get_reserved(PyObject *obj, void *closure)
    2247             : {
    2248           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    2249           0 :         PyObject *py_reserved;
    2250           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
    2251           0 :         return py_reserved;
    2252             : }
    2253             : 
    2254           0 : static int py_repsFromTo1_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
    2255             : {
    2256           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2257           0 :         if (value == NULL) {
    2258           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
    2259           0 :                 return -1;
    2260             :         }
    2261             :         {
    2262           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
    2263           0 :                 if (PyLong_Check(value)) {
    2264           0 :                         unsigned long long test_var;
    2265           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2266           0 :                         if (PyErr_Occurred() != NULL) {
    2267           0 :                                 return -1;
    2268             :                         }
    2269           0 :                         if (test_var > uint_max) {
    2270           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2271             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2272           0 :                                 return -1;
    2273             :                         }
    2274           0 :                         object->reserved = test_var;
    2275             :                 } else {
    2276           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2277             :                           PyLong_Type.tp_name);
    2278           0 :                         return -1;
    2279             :                 }
    2280             :         }
    2281           0 :         return 0;
    2282             : }
    2283             : 
    2284          85 : static PyObject *py_repsFromTo1_get_highwatermark(PyObject *obj, void *closure)
    2285             : {
    2286          85 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    2287           0 :         PyObject *py_highwatermark;
    2288          85 :         py_highwatermark = pytalloc_reference_ex(drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->highwatermark);
    2289          85 :         return py_highwatermark;
    2290             : }
    2291             : 
    2292           0 : static int py_repsFromTo1_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
    2293             : {
    2294           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2295           0 :         if (value == NULL) {
    2296           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highwatermark");
    2297           0 :                 return -1;
    2298             :         }
    2299           0 :         PY_CHECK_TYPE(drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
    2300           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2301           0 :                 PyErr_NoMemory();
    2302           0 :                 return -1;
    2303             :         }
    2304           0 :         object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
    2305           0 :         return 0;
    2306             : }
    2307             : 
    2308        3012 : static PyObject *py_repsFromTo1_get_source_dsa_obj_guid(PyObject *obj, void *closure)
    2309             : {
    2310        3012 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    2311         199 :         PyObject *py_source_dsa_obj_guid;
    2312        3012 :         py_source_dsa_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_obj_guid);
    2313        3012 :         return py_source_dsa_obj_guid;
    2314             : }
    2315             : 
    2316         124 : static int py_repsFromTo1_set_source_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
    2317             : {
    2318         124 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2319         124 :         if (value == NULL) {
    2320           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_obj_guid");
    2321           0 :                 return -1;
    2322             :         }
    2323         124 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    2324         124 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2325           0 :                 PyErr_NoMemory();
    2326           0 :                 return -1;
    2327             :         }
    2328         124 :         object->source_dsa_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
    2329         124 :         return 0;
    2330             : }
    2331             : 
    2332        1146 : static PyObject *py_repsFromTo1_get_source_dsa_invocation_id(PyObject *obj, void *closure)
    2333             : {
    2334        1146 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    2335          45 :         PyObject *py_source_dsa_invocation_id;
    2336        1146 :         py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
    2337        1146 :         return py_source_dsa_invocation_id;
    2338             : }
    2339             : 
    2340           0 : static int py_repsFromTo1_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
    2341             : {
    2342           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2343           0 :         if (value == NULL) {
    2344           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
    2345           0 :                 return -1;
    2346             :         }
    2347           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    2348           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2349           0 :                 PyErr_NoMemory();
    2350           0 :                 return -1;
    2351             :         }
    2352           0 :         object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
    2353           0 :         return 0;
    2354             : }
    2355             : 
    2356        1058 : static PyObject *py_repsFromTo1_get_transport_guid(PyObject *obj, void *closure)
    2357             : {
    2358        1058 :         struct repsFromTo1 *object = pytalloc_get_ptr(obj);
    2359          45 :         PyObject *py_transport_guid;
    2360        1058 :         py_transport_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->transport_guid);
    2361        1058 :         return py_transport_guid;
    2362             : }
    2363             : 
    2364         519 : static int py_repsFromTo1_set_transport_guid(PyObject *py_obj, PyObject *value, void *closure)
    2365             : {
    2366         519 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2367         519 :         if (value == NULL) {
    2368           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transport_guid");
    2369           0 :                 return -1;
    2370             :         }
    2371         519 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    2372         519 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2373           0 :                 PyErr_NoMemory();
    2374           0 :                 return -1;
    2375             :         }
    2376         519 :         object->transport_guid = *(struct GUID *)pytalloc_get_ptr(value);
    2377         519 :         return 0;
    2378             : }
    2379             : 
    2380             : static PyGetSetDef py_repsFromTo1_getsetters[] = {
    2381             :         {
    2382             :                 .name = discard_const_p(char, "blobsize"),
    2383             :                 .get = py_repsFromTo1_get_blobsize,
    2384             :                 .set = py_repsFromTo1_set_blobsize,
    2385             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2386             :         },
    2387             :         {
    2388             :                 .name = discard_const_p(char, "consecutive_sync_failures"),
    2389             :                 .get = py_repsFromTo1_get_consecutive_sync_failures,
    2390             :                 .set = py_repsFromTo1_set_consecutive_sync_failures,
    2391             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2392             :         },
    2393             :         {
    2394             :                 .name = discard_const_p(char, "last_success"),
    2395             :                 .get = py_repsFromTo1_get_last_success,
    2396             :                 .set = py_repsFromTo1_set_last_success,
    2397             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME_1sec")
    2398             :         },
    2399             :         {
    2400             :                 .name = discard_const_p(char, "last_attempt"),
    2401             :                 .get = py_repsFromTo1_get_last_attempt,
    2402             :                 .set = py_repsFromTo1_set_last_attempt,
    2403             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME_1sec")
    2404             :         },
    2405             :         {
    2406             :                 .name = discard_const_p(char, "result_last_attempt"),
    2407             :                 .get = py_repsFromTo1_get_result_last_attempt,
    2408             :                 .set = py_repsFromTo1_set_result_last_attempt,
    2409             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
    2410             :         },
    2411             :         {
    2412             :                 .name = discard_const_p(char, "other_info"),
    2413             :                 .get = py_repsFromTo1_get_other_info,
    2414             :                 .set = py_repsFromTo1_set_other_info,
    2415             :                 .doc = discard_const_p(char, "PIDL-generated element of base type repsFromTo1OtherInfo")
    2416             :         },
    2417             :         {
    2418             :                 .name = discard_const_p(char, "other_info_length"),
    2419             :                 .get = py_repsFromTo1_get_other_info_length,
    2420             :                 .set = py_repsFromTo1_set_other_info_length,
    2421             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2422             :         },
    2423             :         {
    2424             :                 .name = discard_const_p(char, "replica_flags"),
    2425             :                 .get = py_repsFromTo1_get_replica_flags,
    2426             :                 .set = py_repsFromTo1_set_replica_flags,
    2427             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
    2428             :         },
    2429             :         {
    2430             :                 .name = discard_const_p(char, "schedule"),
    2431             :                 .get = py_repsFromTo1_get_schedule,
    2432             :                 .set = py_repsFromTo1_set_schedule,
    2433             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2434             :         },
    2435             :         {
    2436             :                 .name = discard_const_p(char, "reserved"),
    2437             :                 .get = py_repsFromTo1_get_reserved,
    2438             :                 .set = py_repsFromTo1_set_reserved,
    2439             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2440             :         },
    2441             :         {
    2442             :                 .name = discard_const_p(char, "highwatermark"),
    2443             :                 .get = py_repsFromTo1_get_highwatermark,
    2444             :                 .set = py_repsFromTo1_set_highwatermark,
    2445             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
    2446             :         },
    2447             :         {
    2448             :                 .name = discard_const_p(char, "source_dsa_obj_guid"),
    2449             :                 .get = py_repsFromTo1_get_source_dsa_obj_guid,
    2450             :                 .set = py_repsFromTo1_set_source_dsa_obj_guid,
    2451             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    2452             :         },
    2453             :         {
    2454             :                 .name = discard_const_p(char, "source_dsa_invocation_id"),
    2455             :                 .get = py_repsFromTo1_get_source_dsa_invocation_id,
    2456             :                 .set = py_repsFromTo1_set_source_dsa_invocation_id,
    2457             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    2458             :         },
    2459             :         {
    2460             :                 .name = discard_const_p(char, "transport_guid"),
    2461             :                 .get = py_repsFromTo1_get_transport_guid,
    2462             :                 .set = py_repsFromTo1_set_transport_guid,
    2463             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    2464             :         },
    2465             :         { .name = NULL }
    2466             : };
    2467             : 
    2468           0 : static PyObject *py_repsFromTo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2469             : {
    2470           0 :         return pytalloc_new(struct repsFromTo1, type);
    2471             : }
    2472             : 
    2473           0 : static PyObject *py_repsFromTo1_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2474             : {
    2475           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2476           0 :         PyObject *ret = NULL;
    2477           0 :         DATA_BLOB blob;
    2478           0 :         enum ndr_err_code err;
    2479           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2480           0 :         if (tmp_ctx == NULL) {
    2481           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2482           0 :                 return NULL;
    2483             :         }
    2484           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_repsFromTo1);
    2485           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2486           0 :                 TALLOC_FREE(tmp_ctx);
    2487           0 :                 PyErr_SetNdrError(err);
    2488           0 :                 return NULL;
    2489             :         }
    2490             : 
    2491           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2492           0 :         TALLOC_FREE(tmp_ctx);
    2493           0 :         return ret;
    2494             : }
    2495             : 
    2496           0 : static PyObject *py_repsFromTo1_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2497             : {
    2498           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2499           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2500           0 :         Py_ssize_t blob_length = 0;
    2501           0 :         enum ndr_err_code err;
    2502           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2503           0 :         PyObject *allow_remaining_obj = NULL;
    2504           0 :         bool allow_remaining = false;
    2505             : 
    2506           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2507             :                 discard_const_p(char *, kwnames),
    2508             :                 &blob.data, &blob_length,
    2509             :                 &allow_remaining_obj)) {
    2510           0 :                 return NULL;
    2511             :         }
    2512           0 :         blob.length = blob_length;
    2513             : 
    2514           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2515           0 :                 allow_remaining = true;
    2516             :         }
    2517             : 
    2518           0 :         if (allow_remaining) {
    2519           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromTo1);
    2520             :         } else {
    2521           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromTo1);
    2522             :         }
    2523           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2524           0 :                 PyErr_SetNdrError(err);
    2525           0 :                 return NULL;
    2526             :         }
    2527             : 
    2528           0 :         Py_RETURN_NONE;
    2529             : }
    2530             : 
    2531           0 : static PyObject *py_repsFromTo1_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2532             : {
    2533           0 :         struct repsFromTo1 *object = pytalloc_get_ptr(py_obj);
    2534           0 :         PyObject *ret;
    2535           0 :         char *retstr;
    2536             : 
    2537           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_repsFromTo1, "repsFromTo1", object);
    2538           0 :         ret = PyUnicode_FromString(retstr);
    2539           0 :         talloc_free(retstr);
    2540             : 
    2541           0 :         return ret;
    2542             : }
    2543             : 
    2544             : static PyMethodDef py_repsFromTo1_methods[] = {
    2545             :         { "__ndr_pack__", (PyCFunction)py_repsFromTo1_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2546             :         { "__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" },
    2547             :         { "__ndr_print__", (PyCFunction)py_repsFromTo1_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2548             :         { NULL, NULL, 0, NULL }
    2549             : };
    2550             : 
    2551             : 
    2552             : static PyTypeObject repsFromTo1_Type = {
    2553             :         PyVarObject_HEAD_INIT(NULL, 0)
    2554             :         .tp_name = "drsblobs.repsFromTo1",
    2555             :         .tp_getset = py_repsFromTo1_getsetters,
    2556             :         .tp_methods = py_repsFromTo1_methods,
    2557             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2558             :         .tp_new = py_repsFromTo1_new,
    2559             : };
    2560             : 
    2561             : 
    2562           0 : static PyObject *py_repsFromTo2OtherInfo_get___ndr_size(PyObject *obj, void *closure)
    2563             : {
    2564           0 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(obj);
    2565           0 :         PyObject *py___ndr_size;
    2566           0 :         py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size));
    2567           0 :         return py___ndr_size;
    2568             : }
    2569             : 
    2570           0 : static int py_repsFromTo2OtherInfo_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
    2571             : {
    2572           0 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(py_obj);
    2573           0 :         if (value == NULL) {
    2574           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
    2575           0 :                 return -1;
    2576             :         }
    2577             :         {
    2578           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
    2579           0 :                 if (PyLong_Check(value)) {
    2580           0 :                         unsigned long long test_var;
    2581           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2582           0 :                         if (PyErr_Occurred() != NULL) {
    2583           0 :                                 return -1;
    2584             :                         }
    2585           0 :                         if (test_var > uint_max) {
    2586           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2587             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2588           0 :                                 return -1;
    2589             :                         }
    2590           0 :                         object->__ndr_size = test_var;
    2591             :                 } else {
    2592           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2593             :                           PyLong_Type.tp_name);
    2594           0 :                         return -1;
    2595             :                 }
    2596             :         }
    2597           0 :         return 0;
    2598             : }
    2599             : 
    2600          12 : static PyObject *py_repsFromTo2OtherInfo_get_dns_name1(PyObject *obj, void *closure)
    2601             : {
    2602          12 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(obj);
    2603          12 :         PyObject *py_dns_name1;
    2604          12 :         if (object->dns_name1 == NULL) {
    2605           1 :                 Py_RETURN_NONE;
    2606             :         }
    2607          11 :         if (object->dns_name1 == NULL) {
    2608           0 :                 py_dns_name1 = Py_None;
    2609           0 :                 Py_INCREF(py_dns_name1);
    2610             :         } else {
    2611          11 :                 py_dns_name1 = PyString_FromStringOrNULL(object->dns_name1);
    2612             :         }
    2613          11 :         return py_dns_name1;
    2614             : }
    2615             : 
    2616          10 : static int py_repsFromTo2OtherInfo_set_dns_name1(PyObject *py_obj, PyObject *value, void *closure)
    2617             : {
    2618          10 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(py_obj);
    2619          10 :         if (value == NULL) {
    2620           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_name1");
    2621           0 :                 return -1;
    2622             :         }
    2623          10 :         if (value == Py_None) {
    2624           1 :                 object->dns_name1 = NULL;
    2625             :         } else {
    2626           9 :                 object->dns_name1 = NULL;
    2627             :                 {
    2628           9 :                         const char *test_str;
    2629           9 :                         const char *talloc_str;
    2630           9 :                         PyObject *unicode = NULL;
    2631           9 :                         if (PyUnicode_Check(value)) {
    2632           9 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2633           9 :                                 if (unicode == NULL) {
    2634           0 :                                         return -1;
    2635             :                                 }
    2636           9 :                                 test_str = PyBytes_AS_STRING(unicode);
    2637           0 :                         } else if (PyBytes_Check(value)) {
    2638           0 :                                 test_str = PyBytes_AS_STRING(value);
    2639             :                         } else {
    2640           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2641           0 :                                 return -1;
    2642             :                         }
    2643           9 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2644           9 :                         if (unicode != NULL) {
    2645           9 :                                 Py_DECREF(unicode);
    2646             :                         }
    2647           9 :                         if (talloc_str == NULL) {
    2648           0 :                                 PyErr_NoMemory();
    2649           0 :                                 return -1;
    2650             :                         }
    2651           9 :                         object->dns_name1 = talloc_str;
    2652             :                 }
    2653             :         }
    2654           0 :         return 0;
    2655             : }
    2656             : 
    2657           0 : static PyObject *py_repsFromTo2OtherInfo_get_unknown1(PyObject *obj, void *closure)
    2658             : {
    2659           0 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(obj);
    2660           0 :         PyObject *py_unknown1;
    2661           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown1));
    2662           0 :         return py_unknown1;
    2663             : }
    2664             : 
    2665           0 : static int py_repsFromTo2OtherInfo_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
    2666             : {
    2667           0 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(py_obj);
    2668           0 :         if (value == NULL) {
    2669           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
    2670           0 :                 return -1;
    2671             :         }
    2672             :         {
    2673           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
    2674           0 :                 if (PyLong_Check(value)) {
    2675           0 :                         unsigned long long test_var;
    2676           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2677           0 :                         if (PyErr_Occurred() != NULL) {
    2678           0 :                                 return -1;
    2679             :                         }
    2680           0 :                         if (test_var > uint_max) {
    2681           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2682             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2683           0 :                                 return -1;
    2684             :                         }
    2685           0 :                         object->unknown1 = test_var;
    2686             :                 } else {
    2687           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2688             :                           PyLong_Type.tp_name);
    2689           0 :                         return -1;
    2690             :                 }
    2691             :         }
    2692           0 :         return 0;
    2693             : }
    2694             : 
    2695          12 : static PyObject *py_repsFromTo2OtherInfo_get_dns_name2(PyObject *obj, void *closure)
    2696             : {
    2697          12 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(obj);
    2698          12 :         PyObject *py_dns_name2;
    2699          12 :         if (object->dns_name2 == NULL) {
    2700           2 :                 Py_RETURN_NONE;
    2701             :         }
    2702          10 :         if (object->dns_name2 == NULL) {
    2703           0 :                 py_dns_name2 = Py_None;
    2704           0 :                 Py_INCREF(py_dns_name2);
    2705             :         } else {
    2706          10 :                 py_dns_name2 = PyString_FromStringOrNULL(object->dns_name2);
    2707             :         }
    2708          10 :         return py_dns_name2;
    2709             : }
    2710             : 
    2711          12 : static int py_repsFromTo2OtherInfo_set_dns_name2(PyObject *py_obj, PyObject *value, void *closure)
    2712             : {
    2713          12 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(py_obj);
    2714          12 :         if (value == NULL) {
    2715           1 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_name2");
    2716           1 :                 return -1;
    2717             :         }
    2718          11 :         if (value == Py_None) {
    2719           2 :                 object->dns_name2 = NULL;
    2720             :         } else {
    2721           9 :                 object->dns_name2 = NULL;
    2722             :                 {
    2723           9 :                         const char *test_str;
    2724           9 :                         const char *talloc_str;
    2725           9 :                         PyObject *unicode = NULL;
    2726           9 :                         if (PyUnicode_Check(value)) {
    2727           9 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2728           9 :                                 if (unicode == NULL) {
    2729           0 :                                         return -1;
    2730             :                                 }
    2731           9 :                                 test_str = PyBytes_AS_STRING(unicode);
    2732           0 :                         } else if (PyBytes_Check(value)) {
    2733           0 :                                 test_str = PyBytes_AS_STRING(value);
    2734             :                         } else {
    2735           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2736           0 :                                 return -1;
    2737             :                         }
    2738           9 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2739           9 :                         if (unicode != NULL) {
    2740           9 :                                 Py_DECREF(unicode);
    2741             :                         }
    2742           9 :                         if (talloc_str == NULL) {
    2743           0 :                                 PyErr_NoMemory();
    2744           0 :                                 return -1;
    2745             :                         }
    2746           9 :                         object->dns_name2 = talloc_str;
    2747             :                 }
    2748             :         }
    2749           0 :         return 0;
    2750             : }
    2751             : 
    2752           0 : static PyObject *py_repsFromTo2OtherInfo_get_unknown2(PyObject *obj, void *closure)
    2753             : {
    2754           0 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(obj);
    2755           0 :         PyObject *py_unknown2;
    2756           0 :         py_unknown2 = PyLong_FromUnsignedLongLong(object->unknown2);
    2757           0 :         return py_unknown2;
    2758             : }
    2759             : 
    2760           0 : static int py_repsFromTo2OtherInfo_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    2761             : {
    2762           0 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(py_obj);
    2763           0 :         if (value == NULL) {
    2764           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    2765           0 :                 return -1;
    2766             :         }
    2767             :         {
    2768           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
    2769           0 :                 if (PyLong_Check(value)) {
    2770           0 :                         unsigned long long test_var;
    2771           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2772           0 :                         if (PyErr_Occurred() != NULL) {
    2773           0 :                                 return -1;
    2774             :                         }
    2775           0 :                         if (test_var > uint_max) {
    2776           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2777             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2778           0 :                                 return -1;
    2779             :                         }
    2780           0 :                         object->unknown2 = test_var;
    2781             :                 } else {
    2782           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2783             :                           PyLong_Type.tp_name);
    2784           0 :                         return -1;
    2785             :                 }
    2786             :         }
    2787           0 :         return 0;
    2788             : }
    2789             : 
    2790             : static PyGetSetDef py_repsFromTo2OtherInfo_getsetters[] = {
    2791             :         {
    2792             :                 .name = discard_const_p(char, "__ndr_size"),
    2793             :                 .get = py_repsFromTo2OtherInfo_get___ndr_size,
    2794             :                 .set = py_repsFromTo2OtherInfo_set___ndr_size,
    2795             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2796             :         },
    2797             :         {
    2798             :                 .name = discard_const_p(char, "dns_name1"),
    2799             :                 .get = py_repsFromTo2OtherInfo_get_dns_name1,
    2800             :                 .set = py_repsFromTo2OtherInfo_set_dns_name1,
    2801             :                 .doc = discard_const_p(char, "PIDL-generated element of base type string")
    2802             :         },
    2803             :         {
    2804             :                 .name = discard_const_p(char, "unknown1"),
    2805             :                 .get = py_repsFromTo2OtherInfo_get_unknown1,
    2806             :                 .set = py_repsFromTo2OtherInfo_set_unknown1,
    2807             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2808             :         },
    2809             :         {
    2810             :                 .name = discard_const_p(char, "dns_name2"),
    2811             :                 .get = py_repsFromTo2OtherInfo_get_dns_name2,
    2812             :                 .set = py_repsFromTo2OtherInfo_set_dns_name2,
    2813             :                 .doc = discard_const_p(char, "PIDL-generated element of base type string")
    2814             :         },
    2815             :         {
    2816             :                 .name = discard_const_p(char, "unknown2"),
    2817             :                 .get = py_repsFromTo2OtherInfo_get_unknown2,
    2818             :                 .set = py_repsFromTo2OtherInfo_set_unknown2,
    2819             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    2820             :         },
    2821             :         { .name = NULL }
    2822             : };
    2823             : 
    2824           7 : static PyObject *py_repsFromTo2OtherInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2825             : {
    2826           7 :         return pytalloc_new(struct repsFromTo2OtherInfo, type);
    2827             : }
    2828             : 
    2829           1 : static PyObject *py_repsFromTo2OtherInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2830             : {
    2831           1 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(py_obj);
    2832           1 :         PyObject *ret = NULL;
    2833           1 :         DATA_BLOB blob;
    2834           1 :         enum ndr_err_code err;
    2835           1 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2836           1 :         if (tmp_ctx == NULL) {
    2837           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2838           0 :                 return NULL;
    2839             :         }
    2840           1 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_repsFromTo2OtherInfo);
    2841           1 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2842           0 :                 TALLOC_FREE(tmp_ctx);
    2843           0 :                 PyErr_SetNdrError(err);
    2844           0 :                 return NULL;
    2845             :         }
    2846             : 
    2847           1 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2848           1 :         TALLOC_FREE(tmp_ctx);
    2849           1 :         return ret;
    2850             : }
    2851             : 
    2852           1 : static PyObject *py_repsFromTo2OtherInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2853             : {
    2854           1 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(py_obj);
    2855           1 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2856           1 :         Py_ssize_t blob_length = 0;
    2857           1 :         enum ndr_err_code err;
    2858           1 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2859           1 :         PyObject *allow_remaining_obj = NULL;
    2860           1 :         bool allow_remaining = false;
    2861             : 
    2862           1 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2863             :                 discard_const_p(char *, kwnames),
    2864             :                 &blob.data, &blob_length,
    2865             :                 &allow_remaining_obj)) {
    2866           0 :                 return NULL;
    2867             :         }
    2868           1 :         blob.length = blob_length;
    2869             : 
    2870           1 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2871           0 :                 allow_remaining = true;
    2872             :         }
    2873             : 
    2874           0 :         if (allow_remaining) {
    2875           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromTo2OtherInfo);
    2876             :         } else {
    2877           1 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromTo2OtherInfo);
    2878             :         }
    2879           1 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2880           0 :                 PyErr_SetNdrError(err);
    2881           0 :                 return NULL;
    2882             :         }
    2883             : 
    2884           1 :         Py_RETURN_NONE;
    2885             : }
    2886             : 
    2887           0 : static PyObject *py_repsFromTo2OtherInfo_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2888             : {
    2889           0 :         struct repsFromTo2OtherInfo *object = pytalloc_get_ptr(py_obj);
    2890           0 :         PyObject *ret;
    2891           0 :         char *retstr;
    2892             : 
    2893           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_repsFromTo2OtherInfo, "repsFromTo2OtherInfo", object);
    2894           0 :         ret = PyUnicode_FromString(retstr);
    2895           0 :         talloc_free(retstr);
    2896             : 
    2897           0 :         return ret;
    2898             : }
    2899             : 
    2900             : static PyMethodDef py_repsFromTo2OtherInfo_methods[] = {
    2901             :         { "__ndr_pack__", (PyCFunction)py_repsFromTo2OtherInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2902             :         { "__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" },
    2903             :         { "__ndr_print__", (PyCFunction)py_repsFromTo2OtherInfo_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2904             :         { NULL, NULL, 0, NULL }
    2905             : };
    2906             : 
    2907             : 
    2908             : static PyTypeObject repsFromTo2OtherInfo_Type = {
    2909             :         PyVarObject_HEAD_INIT(NULL, 0)
    2910             :         .tp_name = "drsblobs.repsFromTo2OtherInfo",
    2911             :         .tp_getset = py_repsFromTo2OtherInfo_getsetters,
    2912             :         .tp_methods = py_repsFromTo2OtherInfo_methods,
    2913             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2914             :         .tp_new = py_repsFromTo2OtherInfo_new,
    2915             : };
    2916             : 
    2917             : 
    2918           0 : static PyObject *py_repsFromTo2_get_blobsize(PyObject *obj, void *closure)
    2919             : {
    2920           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    2921           0 :         PyObject *py_blobsize;
    2922           0 :         py_blobsize = PyLong_FromUnsignedLongLong((uint32_t)(object->blobsize));
    2923           0 :         return py_blobsize;
    2924             : }
    2925             : 
    2926           0 : static int py_repsFromTo2_set_blobsize(PyObject *py_obj, PyObject *value, void *closure)
    2927             : {
    2928           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    2929           0 :         if (value == NULL) {
    2930           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->blobsize");
    2931           0 :                 return -1;
    2932             :         }
    2933             :         {
    2934           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->blobsize));
    2935           0 :                 if (PyLong_Check(value)) {
    2936           0 :                         unsigned long long test_var;
    2937           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2938           0 :                         if (PyErr_Occurred() != NULL) {
    2939           0 :                                 return -1;
    2940             :                         }
    2941           0 :                         if (test_var > uint_max) {
    2942           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2943             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2944           0 :                                 return -1;
    2945             :                         }
    2946           0 :                         object->blobsize = test_var;
    2947             :                 } else {
    2948           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2949             :                           PyLong_Type.tp_name);
    2950           0 :                         return -1;
    2951             :                 }
    2952             :         }
    2953           0 :         return 0;
    2954             : }
    2955             : 
    2956           0 : static PyObject *py_repsFromTo2_get_consecutive_sync_failures(PyObject *obj, void *closure)
    2957             : {
    2958           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    2959           0 :         PyObject *py_consecutive_sync_failures;
    2960           0 :         py_consecutive_sync_failures = PyLong_FromUnsignedLongLong((uint32_t)(object->consecutive_sync_failures));
    2961           0 :         return py_consecutive_sync_failures;
    2962             : }
    2963             : 
    2964           0 : static int py_repsFromTo2_set_consecutive_sync_failures(PyObject *py_obj, PyObject *value, void *closure)
    2965             : {
    2966           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    2967           0 :         if (value == NULL) {
    2968           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->consecutive_sync_failures");
    2969           0 :                 return -1;
    2970             :         }
    2971             :         {
    2972           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->consecutive_sync_failures));
    2973           0 :                 if (PyLong_Check(value)) {
    2974           0 :                         unsigned long long test_var;
    2975           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2976           0 :                         if (PyErr_Occurred() != NULL) {
    2977           0 :                                 return -1;
    2978             :                         }
    2979           0 :                         if (test_var > uint_max) {
    2980           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2981             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2982           0 :                                 return -1;
    2983             :                         }
    2984           0 :                         object->consecutive_sync_failures = test_var;
    2985             :                 } else {
    2986           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2987             :                           PyLong_Type.tp_name);
    2988           0 :                         return -1;
    2989             :                 }
    2990             :         }
    2991           0 :         return 0;
    2992             : }
    2993             : 
    2994           0 : static PyObject *py_repsFromTo2_get_last_success(PyObject *obj, void *closure)
    2995             : {
    2996           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    2997           0 :         PyObject *py_last_success;
    2998           0 :         py_last_success = PyLong_FromUnsignedLongLong(object->last_success);
    2999           0 :         return py_last_success;
    3000             : }
    3001             : 
    3002           0 : static int py_repsFromTo2_set_last_success(PyObject *py_obj, PyObject *value, void *closure)
    3003             : {
    3004           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3005           0 :         if (value == NULL) {
    3006           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_success");
    3007           0 :                 return -1;
    3008             :         }
    3009             :         {
    3010           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_success));
    3011           0 :                 if (PyLong_Check(value)) {
    3012           0 :                         unsigned long long test_var;
    3013           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3014           0 :                         if (PyErr_Occurred() != NULL) {
    3015           0 :                                 return -1;
    3016             :                         }
    3017           0 :                         if (test_var > uint_max) {
    3018           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3019             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3020           0 :                                 return -1;
    3021             :                         }
    3022           0 :                         object->last_success = test_var;
    3023             :                 } else {
    3024           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3025             :                           PyLong_Type.tp_name);
    3026           0 :                         return -1;
    3027             :                 }
    3028             :         }
    3029           0 :         return 0;
    3030             : }
    3031             : 
    3032           0 : static PyObject *py_repsFromTo2_get_last_attempt(PyObject *obj, void *closure)
    3033             : {
    3034           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    3035           0 :         PyObject *py_last_attempt;
    3036           0 :         py_last_attempt = PyLong_FromUnsignedLongLong(object->last_attempt);
    3037           0 :         return py_last_attempt;
    3038             : }
    3039             : 
    3040           0 : static int py_repsFromTo2_set_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
    3041             : {
    3042           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3043           0 :         if (value == NULL) {
    3044           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_attempt");
    3045           0 :                 return -1;
    3046             :         }
    3047             :         {
    3048           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_attempt));
    3049           0 :                 if (PyLong_Check(value)) {
    3050           0 :                         unsigned long long test_var;
    3051           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3052           0 :                         if (PyErr_Occurred() != NULL) {
    3053           0 :                                 return -1;
    3054             :                         }
    3055           0 :                         if (test_var > uint_max) {
    3056           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3057             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3058           0 :                                 return -1;
    3059             :                         }
    3060           0 :                         object->last_attempt = test_var;
    3061             :                 } else {
    3062           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3063             :                           PyLong_Type.tp_name);
    3064           0 :                         return -1;
    3065             :                 }
    3066             :         }
    3067           0 :         return 0;
    3068             : }
    3069             : 
    3070           0 : static PyObject *py_repsFromTo2_get_result_last_attempt(PyObject *obj, void *closure)
    3071             : {
    3072           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    3073           0 :         PyObject *py_result_last_attempt;
    3074           0 :         py_result_last_attempt = PyErr_FromWERROR(object->result_last_attempt);
    3075           0 :         return py_result_last_attempt;
    3076             : }
    3077             : 
    3078           0 : static int py_repsFromTo2_set_result_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
    3079             : {
    3080           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3081           0 :         if (value == NULL) {
    3082           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->result_last_attempt");
    3083           0 :                 return -1;
    3084             :         }
    3085           0 :         object->result_last_attempt = W_ERROR(PyLong_AsLong(value));
    3086           0 :         return 0;
    3087             : }
    3088             : 
    3089           0 : static PyObject *py_repsFromTo2_get_other_info(PyObject *obj, void *closure)
    3090             : {
    3091           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    3092           0 :         PyObject *py_other_info;
    3093           0 :         if (object->other_info == NULL) {
    3094           0 :                 Py_RETURN_NONE;
    3095             :         }
    3096           0 :         if (object->other_info == NULL) {
    3097           0 :                 py_other_info = Py_None;
    3098           0 :                 Py_INCREF(py_other_info);
    3099             :         } else {
    3100           0 :                 py_other_info = pytalloc_reference_ex(&repsFromTo2OtherInfo_Type, object->other_info, object->other_info);
    3101             :         }
    3102           0 :         return py_other_info;
    3103             : }
    3104             : 
    3105           0 : static int py_repsFromTo2_set_other_info(PyObject *py_obj, PyObject *value, void *closure)
    3106             : {
    3107           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3108           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->other_info));
    3109           0 :         if (value == NULL) {
    3110           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->other_info");
    3111           0 :                 return -1;
    3112             :         }
    3113           0 :         if (value == Py_None) {
    3114           0 :                 object->other_info = NULL;
    3115             :         } else {
    3116           0 :                 object->other_info = NULL;
    3117           0 :                 PY_CHECK_TYPE(&repsFromTo2OtherInfo_Type, value, return -1;);
    3118           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3119           0 :                         PyErr_NoMemory();
    3120           0 :                         return -1;
    3121             :                 }
    3122           0 :                 object->other_info = (struct repsFromTo2OtherInfo *)pytalloc_get_ptr(value);
    3123             :         }
    3124           0 :         return 0;
    3125             : }
    3126             : 
    3127           0 : static PyObject *py_repsFromTo2_get_other_info_length(PyObject *obj, void *closure)
    3128             : {
    3129           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    3130           0 :         PyObject *py_other_info_length;
    3131           0 :         py_other_info_length = PyLong_FromUnsignedLongLong((uint32_t)(object->other_info_length));
    3132           0 :         return py_other_info_length;
    3133             : }
    3134             : 
    3135           0 : static int py_repsFromTo2_set_other_info_length(PyObject *py_obj, PyObject *value, void *closure)
    3136             : {
    3137           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3138           0 :         if (value == NULL) {
    3139           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->other_info_length");
    3140           0 :                 return -1;
    3141             :         }
    3142             :         {
    3143           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->other_info_length));
    3144           0 :                 if (PyLong_Check(value)) {
    3145           0 :                         unsigned long long test_var;
    3146           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3147           0 :                         if (PyErr_Occurred() != NULL) {
    3148           0 :                                 return -1;
    3149             :                         }
    3150           0 :                         if (test_var > uint_max) {
    3151           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3152             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3153           0 :                                 return -1;
    3154             :                         }
    3155           0 :                         object->other_info_length = test_var;
    3156             :                 } else {
    3157           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3158             :                           PyLong_Type.tp_name);
    3159           0 :                         return -1;
    3160             :                 }
    3161             :         }
    3162           0 :         return 0;
    3163             : }
    3164             : 
    3165           0 : static PyObject *py_repsFromTo2_get_replica_flags(PyObject *obj, void *closure)
    3166             : {
    3167           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    3168           0 :         PyObject *py_replica_flags;
    3169           0 :         py_replica_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->replica_flags));
    3170           0 :         return py_replica_flags;
    3171             : }
    3172             : 
    3173           0 : static int py_repsFromTo2_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
    3174             : {
    3175           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3176           0 :         if (value == NULL) {
    3177           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->replica_flags");
    3178           0 :                 return -1;
    3179             :         }
    3180             :         {
    3181           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->replica_flags));
    3182           0 :                 if (PyLong_Check(value)) {
    3183           0 :                         unsigned long long test_var;
    3184           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3185           0 :                         if (PyErr_Occurred() != NULL) {
    3186           0 :                                 return -1;
    3187             :                         }
    3188           0 :                         if (test_var > uint_max) {
    3189           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3190             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3191           0 :                                 return -1;
    3192             :                         }
    3193           0 :                         object->replica_flags = test_var;
    3194             :                 } else {
    3195           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3196             :                           PyLong_Type.tp_name);
    3197           0 :                         return -1;
    3198             :                 }
    3199             :         }
    3200           0 :         return 0;
    3201             : }
    3202             : 
    3203           0 : static PyObject *py_repsFromTo2_get_schedule(PyObject *obj, void *closure)
    3204             : {
    3205           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    3206           0 :         PyObject *py_schedule;
    3207           0 :         py_schedule = PyList_New(84);
    3208           0 :         if (py_schedule == NULL) {
    3209           0 :                 return NULL;
    3210             :         }
    3211             :         {
    3212             :                 int schedule_cntr_0;
    3213           0 :                 for (schedule_cntr_0 = 0; schedule_cntr_0 < (84); schedule_cntr_0++) {
    3214           0 :                         PyObject *py_schedule_0;
    3215           0 :                         py_schedule_0 = PyLong_FromLong((uint16_t)((object->schedule)[schedule_cntr_0]));
    3216           0 :                         PyList_SetItem(py_schedule, schedule_cntr_0, py_schedule_0);
    3217             :                 }
    3218             :         }
    3219           0 :         return py_schedule;
    3220             : }
    3221             : 
    3222           0 : static int py_repsFromTo2_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
    3223             : {
    3224           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3225           0 :         if (value == NULL) {
    3226           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->schedule");
    3227           0 :                 return -1;
    3228             :         }
    3229           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    3230             :         {
    3231           0 :                 int schedule_cntr_0;
    3232           0 :                 if (ARRAY_SIZE(object->schedule) != PyList_GET_SIZE(value)) {
    3233           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));
    3234           0 :                         return -1;
    3235             :                 }
    3236           0 :                 for (schedule_cntr_0 = 0; schedule_cntr_0 < PyList_GET_SIZE(value); schedule_cntr_0++) {
    3237           0 :                         if (PyList_GET_ITEM(value, schedule_cntr_0) == NULL) {
    3238           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->schedule)[schedule_cntr_0]");
    3239           0 :                                 return -1;
    3240             :                         }
    3241             :                         {
    3242           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->schedule)[schedule_cntr_0]));
    3243           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, schedule_cntr_0))) {
    3244           0 :                                         unsigned long long test_var;
    3245           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, schedule_cntr_0));
    3246           0 :                                         if (PyErr_Occurred() != NULL) {
    3247           0 :                                                 return -1;
    3248             :                                         }
    3249           0 :                                         if (test_var > uint_max) {
    3250           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3251             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    3252           0 :                                                 return -1;
    3253             :                                         }
    3254           0 :                                         (object->schedule)[schedule_cntr_0] = test_var;
    3255             :                                 } else {
    3256           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3257             :                                           PyLong_Type.tp_name);
    3258           0 :                                         return -1;
    3259             :                                 }
    3260             :                         }
    3261             :                 }
    3262             :         }
    3263           0 :         return 0;
    3264             : }
    3265             : 
    3266           0 : static PyObject *py_repsFromTo2_get_reserved(PyObject *obj, void *closure)
    3267             : {
    3268           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    3269           0 :         PyObject *py_reserved;
    3270           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
    3271           0 :         return py_reserved;
    3272             : }
    3273             : 
    3274           0 : static int py_repsFromTo2_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
    3275             : {
    3276           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3277           0 :         if (value == NULL) {
    3278           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
    3279           0 :                 return -1;
    3280             :         }
    3281             :         {
    3282           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
    3283           0 :                 if (PyLong_Check(value)) {
    3284           0 :                         unsigned long long test_var;
    3285           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3286           0 :                         if (PyErr_Occurred() != NULL) {
    3287           0 :                                 return -1;
    3288             :                         }
    3289           0 :                         if (test_var > uint_max) {
    3290           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3291             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3292           0 :                                 return -1;
    3293             :                         }
    3294           0 :                         object->reserved = test_var;
    3295             :                 } else {
    3296           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3297             :                           PyLong_Type.tp_name);
    3298           0 :                         return -1;
    3299             :                 }
    3300             :         }
    3301           0 :         return 0;
    3302             : }
    3303             : 
    3304           0 : static PyObject *py_repsFromTo2_get_highwatermark(PyObject *obj, void *closure)
    3305             : {
    3306           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    3307           0 :         PyObject *py_highwatermark;
    3308           0 :         py_highwatermark = pytalloc_reference_ex(drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->highwatermark);
    3309           0 :         return py_highwatermark;
    3310             : }
    3311             : 
    3312           0 : static int py_repsFromTo2_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
    3313             : {
    3314           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3315           0 :         if (value == NULL) {
    3316           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highwatermark");
    3317           0 :                 return -1;
    3318             :         }
    3319           0 :         PY_CHECK_TYPE(drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
    3320           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3321           0 :                 PyErr_NoMemory();
    3322           0 :                 return -1;
    3323             :         }
    3324           0 :         object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
    3325           0 :         return 0;
    3326             : }
    3327             : 
    3328           0 : static PyObject *py_repsFromTo2_get_source_dsa_obj_guid(PyObject *obj, void *closure)
    3329             : {
    3330           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    3331           0 :         PyObject *py_source_dsa_obj_guid;
    3332           0 :         py_source_dsa_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_obj_guid);
    3333           0 :         return py_source_dsa_obj_guid;
    3334             : }
    3335             : 
    3336           0 : static int py_repsFromTo2_set_source_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
    3337             : {
    3338           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3339           0 :         if (value == NULL) {
    3340           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_obj_guid");
    3341           0 :                 return -1;
    3342             :         }
    3343           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    3344           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3345           0 :                 PyErr_NoMemory();
    3346           0 :                 return -1;
    3347             :         }
    3348           0 :         object->source_dsa_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
    3349           0 :         return 0;
    3350             : }
    3351             : 
    3352           0 : static PyObject *py_repsFromTo2_get_source_dsa_invocation_id(PyObject *obj, void *closure)
    3353             : {
    3354           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    3355           0 :         PyObject *py_source_dsa_invocation_id;
    3356           0 :         py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
    3357           0 :         return py_source_dsa_invocation_id;
    3358             : }
    3359             : 
    3360           0 : static int py_repsFromTo2_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
    3361             : {
    3362           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3363           0 :         if (value == NULL) {
    3364           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
    3365           0 :                 return -1;
    3366             :         }
    3367           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    3368           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3369           0 :                 PyErr_NoMemory();
    3370           0 :                 return -1;
    3371             :         }
    3372           0 :         object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
    3373           0 :         return 0;
    3374             : }
    3375             : 
    3376           0 : static PyObject *py_repsFromTo2_get_transport_guid(PyObject *obj, void *closure)
    3377             : {
    3378           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    3379           0 :         PyObject *py_transport_guid;
    3380           0 :         py_transport_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->transport_guid);
    3381           0 :         return py_transport_guid;
    3382             : }
    3383             : 
    3384           0 : static int py_repsFromTo2_set_transport_guid(PyObject *py_obj, PyObject *value, void *closure)
    3385             : {
    3386           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3387           0 :         if (value == NULL) {
    3388           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transport_guid");
    3389           0 :                 return -1;
    3390             :         }
    3391           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    3392           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3393           0 :                 PyErr_NoMemory();
    3394           0 :                 return -1;
    3395             :         }
    3396           0 :         object->transport_guid = *(struct GUID *)pytalloc_get_ptr(value);
    3397           0 :         return 0;
    3398             : }
    3399             : 
    3400           0 : static PyObject *py_repsFromTo2_get_unknown1(PyObject *obj, void *closure)
    3401             : {
    3402           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(obj);
    3403           0 :         PyObject *py_unknown1;
    3404           0 :         py_unknown1 = PyLong_FromUnsignedLongLong(object->unknown1);
    3405           0 :         return py_unknown1;
    3406             : }
    3407             : 
    3408           0 : static int py_repsFromTo2_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
    3409             : {
    3410           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3411           0 :         if (value == NULL) {
    3412           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
    3413           0 :                 return -1;
    3414             :         }
    3415             :         {
    3416           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
    3417           0 :                 if (PyLong_Check(value)) {
    3418           0 :                         unsigned long long test_var;
    3419           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3420           0 :                         if (PyErr_Occurred() != NULL) {
    3421           0 :                                 return -1;
    3422             :                         }
    3423           0 :                         if (test_var > uint_max) {
    3424           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3425             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3426           0 :                                 return -1;
    3427             :                         }
    3428           0 :                         object->unknown1 = test_var;
    3429             :                 } else {
    3430           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3431             :                           PyLong_Type.tp_name);
    3432           0 :                         return -1;
    3433             :                 }
    3434             :         }
    3435           0 :         return 0;
    3436             : }
    3437             : 
    3438             : static PyGetSetDef py_repsFromTo2_getsetters[] = {
    3439             :         {
    3440             :                 .name = discard_const_p(char, "blobsize"),
    3441             :                 .get = py_repsFromTo2_get_blobsize,
    3442             :                 .set = py_repsFromTo2_set_blobsize,
    3443             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3444             :         },
    3445             :         {
    3446             :                 .name = discard_const_p(char, "consecutive_sync_failures"),
    3447             :                 .get = py_repsFromTo2_get_consecutive_sync_failures,
    3448             :                 .set = py_repsFromTo2_set_consecutive_sync_failures,
    3449             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3450             :         },
    3451             :         {
    3452             :                 .name = discard_const_p(char, "last_success"),
    3453             :                 .get = py_repsFromTo2_get_last_success,
    3454             :                 .set = py_repsFromTo2_set_last_success,
    3455             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME_1sec")
    3456             :         },
    3457             :         {
    3458             :                 .name = discard_const_p(char, "last_attempt"),
    3459             :                 .get = py_repsFromTo2_get_last_attempt,
    3460             :                 .set = py_repsFromTo2_set_last_attempt,
    3461             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME_1sec")
    3462             :         },
    3463             :         {
    3464             :                 .name = discard_const_p(char, "result_last_attempt"),
    3465             :                 .get = py_repsFromTo2_get_result_last_attempt,
    3466             :                 .set = py_repsFromTo2_set_result_last_attempt,
    3467             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
    3468             :         },
    3469             :         {
    3470             :                 .name = discard_const_p(char, "other_info"),
    3471             :                 .get = py_repsFromTo2_get_other_info,
    3472             :                 .set = py_repsFromTo2_set_other_info,
    3473             :                 .doc = discard_const_p(char, "PIDL-generated element of base type repsFromTo2OtherInfo")
    3474             :         },
    3475             :         {
    3476             :                 .name = discard_const_p(char, "other_info_length"),
    3477             :                 .get = py_repsFromTo2_get_other_info_length,
    3478             :                 .set = py_repsFromTo2_set_other_info_length,
    3479             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3480             :         },
    3481             :         {
    3482             :                 .name = discard_const_p(char, "replica_flags"),
    3483             :                 .get = py_repsFromTo2_get_replica_flags,
    3484             :                 .set = py_repsFromTo2_set_replica_flags,
    3485             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
    3486             :         },
    3487             :         {
    3488             :                 .name = discard_const_p(char, "schedule"),
    3489             :                 .get = py_repsFromTo2_get_schedule,
    3490             :                 .set = py_repsFromTo2_set_schedule,
    3491             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    3492             :         },
    3493             :         {
    3494             :                 .name = discard_const_p(char, "reserved"),
    3495             :                 .get = py_repsFromTo2_get_reserved,
    3496             :                 .set = py_repsFromTo2_set_reserved,
    3497             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3498             :         },
    3499             :         {
    3500             :                 .name = discard_const_p(char, "highwatermark"),
    3501             :                 .get = py_repsFromTo2_get_highwatermark,
    3502             :                 .set = py_repsFromTo2_set_highwatermark,
    3503             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
    3504             :         },
    3505             :         {
    3506             :                 .name = discard_const_p(char, "source_dsa_obj_guid"),
    3507             :                 .get = py_repsFromTo2_get_source_dsa_obj_guid,
    3508             :                 .set = py_repsFromTo2_set_source_dsa_obj_guid,
    3509             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    3510             :         },
    3511             :         {
    3512             :                 .name = discard_const_p(char, "source_dsa_invocation_id"),
    3513             :                 .get = py_repsFromTo2_get_source_dsa_invocation_id,
    3514             :                 .set = py_repsFromTo2_set_source_dsa_invocation_id,
    3515             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    3516             :         },
    3517             :         {
    3518             :                 .name = discard_const_p(char, "transport_guid"),
    3519             :                 .get = py_repsFromTo2_get_transport_guid,
    3520             :                 .set = py_repsFromTo2_set_transport_guid,
    3521             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    3522             :         },
    3523             :         {
    3524             :                 .name = discard_const_p(char, "unknown1"),
    3525             :                 .get = py_repsFromTo2_get_unknown1,
    3526             :                 .set = py_repsFromTo2_set_unknown1,
    3527             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    3528             :         },
    3529             :         { .name = NULL }
    3530             : };
    3531             : 
    3532           0 : static PyObject *py_repsFromTo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3533             : {
    3534           0 :         return pytalloc_new(struct repsFromTo2, type);
    3535             : }
    3536             : 
    3537           0 : static PyObject *py_repsFromTo2_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    3538             : {
    3539           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3540           0 :         PyObject *ret = NULL;
    3541           0 :         DATA_BLOB blob;
    3542           0 :         enum ndr_err_code err;
    3543           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    3544           0 :         if (tmp_ctx == NULL) {
    3545           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3546           0 :                 return NULL;
    3547             :         }
    3548           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_repsFromTo2);
    3549           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3550           0 :                 TALLOC_FREE(tmp_ctx);
    3551           0 :                 PyErr_SetNdrError(err);
    3552           0 :                 return NULL;
    3553             :         }
    3554             : 
    3555           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3556           0 :         TALLOC_FREE(tmp_ctx);
    3557           0 :         return ret;
    3558             : }
    3559             : 
    3560           0 : static PyObject *py_repsFromTo2_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3561             : {
    3562           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3563           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    3564           0 :         Py_ssize_t blob_length = 0;
    3565           0 :         enum ndr_err_code err;
    3566           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    3567           0 :         PyObject *allow_remaining_obj = NULL;
    3568           0 :         bool allow_remaining = false;
    3569             : 
    3570           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    3571             :                 discard_const_p(char *, kwnames),
    3572             :                 &blob.data, &blob_length,
    3573             :                 &allow_remaining_obj)) {
    3574           0 :                 return NULL;
    3575             :         }
    3576           0 :         blob.length = blob_length;
    3577             : 
    3578           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3579           0 :                 allow_remaining = true;
    3580             :         }
    3581             : 
    3582           0 :         if (allow_remaining) {
    3583           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromTo2);
    3584             :         } else {
    3585           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromTo2);
    3586             :         }
    3587           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3588           0 :                 PyErr_SetNdrError(err);
    3589           0 :                 return NULL;
    3590             :         }
    3591             : 
    3592           0 :         Py_RETURN_NONE;
    3593             : }
    3594             : 
    3595           0 : static PyObject *py_repsFromTo2_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3596             : {
    3597           0 :         struct repsFromTo2 *object = pytalloc_get_ptr(py_obj);
    3598           0 :         PyObject *ret;
    3599           0 :         char *retstr;
    3600             : 
    3601           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_repsFromTo2, "repsFromTo2", object);
    3602           0 :         ret = PyUnicode_FromString(retstr);
    3603           0 :         talloc_free(retstr);
    3604             : 
    3605           0 :         return ret;
    3606             : }
    3607             : 
    3608             : static PyMethodDef py_repsFromTo2_methods[] = {
    3609             :         { "__ndr_pack__", (PyCFunction)py_repsFromTo2_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    3610             :         { "__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" },
    3611             :         { "__ndr_print__", (PyCFunction)py_repsFromTo2_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    3612             :         { NULL, NULL, 0, NULL }
    3613             : };
    3614             : 
    3615             : 
    3616             : static PyTypeObject repsFromTo2_Type = {
    3617             :         PyVarObject_HEAD_INIT(NULL, 0)
    3618             :         .tp_name = "drsblobs.repsFromTo2",
    3619             :         .tp_getset = py_repsFromTo2_getsetters,
    3620             :         .tp_methods = py_repsFromTo2_methods,
    3621             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3622             :         .tp_new = py_repsFromTo2_new,
    3623             : };
    3624             : 
    3625       17223 : static PyObject *py_import_repsFromTo(TALLOC_CTX *mem_ctx, int level, union repsFromTo *in)
    3626             : {
    3627        1274 :         PyObject *ret;
    3628             : 
    3629       17223 :         switch (level) {
    3630       17223 :                 case 1:
    3631       17223 :                         ret = pytalloc_reference_ex(&repsFromTo1_Type, mem_ctx, &in->ctr1);
    3632       17223 :                         return ret;
    3633             : 
    3634           0 :                 case 2:
    3635           0 :                         ret = pytalloc_reference_ex(&repsFromTo2_Type, mem_ctx, &in->ctr2);
    3636           0 :                         return ret;
    3637             : 
    3638             :         }
    3639           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    3640           0 :         return NULL;
    3641             : }
    3642             : 
    3643           0 : static union repsFromTo *py_export_repsFromTo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    3644             : {
    3645           0 :         union repsFromTo *ret = talloc_zero(mem_ctx, union repsFromTo);
    3646           0 :         switch (level) {
    3647           0 :                 case 1:
    3648           0 :                         if (in == NULL) {
    3649           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
    3650           0 :                                 talloc_free(ret); return NULL;
    3651             :                         }
    3652           0 :                         PY_CHECK_TYPE(&repsFromTo1_Type, in, talloc_free(ret); return NULL;);
    3653           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    3654           0 :                                 PyErr_NoMemory();
    3655           0 :                                 talloc_free(ret); return NULL;
    3656             :                         }
    3657           0 :                         ret->ctr1 = *(struct repsFromTo1 *)pytalloc_get_ptr(in);
    3658           0 :                         break;
    3659             : 
    3660           0 :                 case 2:
    3661           0 :                         if (in == NULL) {
    3662           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
    3663           0 :                                 talloc_free(ret); return NULL;
    3664             :                         }
    3665           0 :                         PY_CHECK_TYPE(&repsFromTo2_Type, in, talloc_free(ret); return NULL;);
    3666           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    3667           0 :                                 PyErr_NoMemory();
    3668           0 :                                 talloc_free(ret); return NULL;
    3669             :                         }
    3670           0 :                         ret->ctr2 = *(struct repsFromTo2 *)pytalloc_get_ptr(in);
    3671           0 :                         break;
    3672             : 
    3673           0 :                 default:
    3674           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
    3675           0 :                         talloc_free(ret);
    3676           0 :                         ret = NULL;
    3677             :         }
    3678             : 
    3679           0 :         return ret;
    3680             : }
    3681             : 
    3682       17223 : static PyObject *py_repsFromTo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3683             : {
    3684       17223 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    3685       17223 :         PyObject *mem_ctx_obj = NULL;
    3686       17223 :         TALLOC_CTX *mem_ctx = NULL;
    3687       17223 :         int level = 0;
    3688       17223 :         PyObject *in_obj = NULL;
    3689       17223 :         union repsFromTo *in = NULL;
    3690             : 
    3691       17223 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    3692             :                 discard_const_p(char *, kwnames),
    3693             :                 &mem_ctx_obj,
    3694             :                 &level,
    3695             :                 &in_obj)) {
    3696           0 :                 return NULL;
    3697             :         }
    3698       17223 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    3699       17223 :         if (mem_ctx == NULL) {
    3700           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    3701           0 :                 return NULL;
    3702             :         }
    3703       17223 :         in = (union repsFromTo *)pytalloc_get_ptr(in_obj);
    3704       17223 :         if (in == NULL) {
    3705           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union repsFromTo!");
    3706           0 :                 return NULL;
    3707             :         }
    3708             : 
    3709       17223 :         return py_import_repsFromTo(mem_ctx, level, in);
    3710             : }
    3711             : 
    3712           0 : static PyObject *py_repsFromTo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3713             : {
    3714           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    3715           0 :         PyObject *mem_ctx_obj = NULL;
    3716           0 :         TALLOC_CTX *mem_ctx = NULL;
    3717           0 :         int level = 0;
    3718           0 :         PyObject *in = NULL;
    3719           0 :         union repsFromTo *out = NULL;
    3720             : 
    3721           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    3722             :                 discard_const_p(char *, kwnames),
    3723             :                 &mem_ctx_obj,
    3724             :                 &level,
    3725             :                 &in)) {
    3726           0 :                 return NULL;
    3727             :         }
    3728           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    3729           0 :         if (mem_ctx == NULL) {
    3730           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    3731           0 :                 return NULL;
    3732             :         }
    3733             : 
    3734           0 :         out = py_export_repsFromTo(mem_ctx, level, in);
    3735           0 :         if (out == NULL) {
    3736           0 :                 return NULL;
    3737             :         }
    3738             : 
    3739           0 :         return pytalloc_GenericObject_reference(out);
    3740             : }
    3741             : 
    3742             : static PyMethodDef py_repsFromTo_methods[] = {
    3743             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_repsFromTo_import),
    3744             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    3745             :                 "T.__import__(mem_ctx, level, in) => ret." },
    3746             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_repsFromTo_export),
    3747             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    3748             :                 "T.__export__(mem_ctx, level, in) => ret." },
    3749             :         { NULL, NULL, 0, NULL }
    3750             : };
    3751             : 
    3752           0 : static PyObject *py_repsFromTo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3753             : {
    3754           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    3755           0 :         return NULL;
    3756             : }
    3757             : 
    3758             : 
    3759             : static PyTypeObject repsFromTo_Type = {
    3760             :         PyVarObject_HEAD_INIT(NULL, 0)
    3761             :         .tp_name = "drsblobs.repsFromTo",
    3762             :         .tp_getset = NULL,
    3763             :         .tp_methods = py_repsFromTo_methods,
    3764             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3765             :         .tp_new = py_repsFromTo_new,
    3766             : };
    3767             : 
    3768             : 
    3769        2683 : static PyObject *py_repsFromToBlob_get_version(PyObject *obj, void *closure)
    3770             : {
    3771        2683 :         struct repsFromToBlob *object = pytalloc_get_ptr(obj);
    3772         150 :         PyObject *py_version;
    3773        2683 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
    3774        2683 :         return py_version;
    3775             : }
    3776             : 
    3777         124 : static int py_repsFromToBlob_set_version(PyObject *py_obj, PyObject *value, void *closure)
    3778             : {
    3779         124 :         struct repsFromToBlob *object = pytalloc_get_ptr(py_obj);
    3780         124 :         if (value == NULL) {
    3781           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    3782           0 :                 return -1;
    3783             :         }
    3784             :         {
    3785         124 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    3786         124 :                 if (PyLong_Check(value)) {
    3787          35 :                         unsigned long long test_var;
    3788         124 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3789         124 :                         if (PyErr_Occurred() != NULL) {
    3790           0 :                                 return -1;
    3791             :                         }
    3792         124 :                         if (test_var > uint_max) {
    3793           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3794             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3795           0 :                                 return -1;
    3796             :                         }
    3797         124 :                         object->version = test_var;
    3798             :                 } else {
    3799           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3800             :                           PyLong_Type.tp_name);
    3801           0 :                         return -1;
    3802             :                 }
    3803             :         }
    3804         124 :         return 0;
    3805             : }
    3806             : 
    3807           0 : static PyObject *py_repsFromToBlob_get_reserved(PyObject *obj, void *closure)
    3808             : {
    3809           0 :         struct repsFromToBlob *object = pytalloc_get_ptr(obj);
    3810           0 :         PyObject *py_reserved;
    3811           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
    3812           0 :         return py_reserved;
    3813             : }
    3814             : 
    3815           0 : static int py_repsFromToBlob_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
    3816             : {
    3817           0 :         struct repsFromToBlob *object = pytalloc_get_ptr(py_obj);
    3818           0 :         if (value == NULL) {
    3819           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
    3820           0 :                 return -1;
    3821             :         }
    3822             :         {
    3823           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
    3824           0 :                 if (PyLong_Check(value)) {
    3825           0 :                         unsigned long long test_var;
    3826           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3827           0 :                         if (PyErr_Occurred() != NULL) {
    3828           0 :                                 return -1;
    3829             :                         }
    3830           0 :                         if (test_var > uint_max) {
    3831           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3832             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3833           0 :                                 return -1;
    3834             :                         }
    3835           0 :                         object->reserved = test_var;
    3836             :                 } else {
    3837           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3838             :                           PyLong_Type.tp_name);
    3839           0 :                         return -1;
    3840             :                 }
    3841             :         }
    3842           0 :         return 0;
    3843             : }
    3844             : 
    3845       17223 : static PyObject *py_repsFromToBlob_get_ctr(PyObject *obj, void *closure)
    3846             : {
    3847       17223 :         struct repsFromToBlob *object = pytalloc_get_ptr(obj);
    3848        1274 :         PyObject *py_ctr;
    3849       17223 :         py_ctr = pyrpc_import_union(&repsFromTo_Type, pytalloc_get_mem_ctx(obj), object->version, &object->ctr, "union repsFromTo");
    3850       17223 :         if (py_ctr == NULL) {
    3851           0 :                 return NULL;
    3852             :         }
    3853       15949 :         return py_ctr;
    3854             : }
    3855             : 
    3856           0 : static int py_repsFromToBlob_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    3857             : {
    3858           0 :         struct repsFromToBlob *object = pytalloc_get_ptr(py_obj);
    3859           0 :         if (value == NULL) {
    3860           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
    3861           0 :                 return -1;
    3862             :         }
    3863             :         {
    3864           0 :                 union repsFromTo *ctr_switch_0;
    3865           0 :                 ctr_switch_0 = (union repsFromTo *)pyrpc_export_union(&repsFromTo_Type, pytalloc_get_mem_ctx(py_obj), object->version, value, "union repsFromTo");
    3866           0 :                 if (ctr_switch_0 == NULL) {
    3867           0 :                         return -1;
    3868             :                 }
    3869           0 :                 object->ctr = *ctr_switch_0;
    3870             :         }
    3871           0 :         return 0;
    3872             : }
    3873             : 
    3874             : static PyGetSetDef py_repsFromToBlob_getsetters[] = {
    3875             :         {
    3876             :                 .name = discard_const_p(char, "version"),
    3877             :                 .get = py_repsFromToBlob_get_version,
    3878             :                 .set = py_repsFromToBlob_set_version,
    3879             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3880             :         },
    3881             :         {
    3882             :                 .name = discard_const_p(char, "reserved"),
    3883             :                 .get = py_repsFromToBlob_get_reserved,
    3884             :                 .set = py_repsFromToBlob_set_reserved,
    3885             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3886             :         },
    3887             :         {
    3888             :                 .name = discard_const_p(char, "ctr"),
    3889             :                 .get = py_repsFromToBlob_get_ctr,
    3890             :                 .set = py_repsFromToBlob_set_ctr,
    3891             :                 .doc = discard_const_p(char, "PIDL-generated element of base type repsFromTo")
    3892             :         },
    3893             :         { .name = NULL }
    3894             : };
    3895             : 
    3896        1195 : static PyObject *py_repsFromToBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3897             : {
    3898        1195 :         return pytalloc_new(struct repsFromToBlob, type);
    3899             : }
    3900             : 
    3901         943 : static PyObject *py_repsFromToBlob_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    3902             : {
    3903         943 :         struct repsFromToBlob *object = pytalloc_get_ptr(py_obj);
    3904         943 :         PyObject *ret = NULL;
    3905          50 :         DATA_BLOB blob;
    3906          50 :         enum ndr_err_code err;
    3907         943 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    3908         943 :         if (tmp_ctx == NULL) {
    3909           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3910           0 :                 return NULL;
    3911             :         }
    3912         943 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_repsFromToBlob);
    3913         943 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3914           0 :                 TALLOC_FREE(tmp_ctx);
    3915           0 :                 PyErr_SetNdrError(err);
    3916           0 :                 return NULL;
    3917             :         }
    3918             : 
    3919         943 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3920         943 :         TALLOC_FREE(tmp_ctx);
    3921         943 :         return ret;
    3922             : }
    3923             : 
    3924        1071 : static PyObject *py_repsFromToBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3925             : {
    3926        1071 :         struct repsFromToBlob *object = pytalloc_get_ptr(py_obj);
    3927        1071 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    3928        1071 :         Py_ssize_t blob_length = 0;
    3929          25 :         enum ndr_err_code err;
    3930        1071 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    3931        1071 :         PyObject *allow_remaining_obj = NULL;
    3932        1071 :         bool allow_remaining = false;
    3933             : 
    3934        1071 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    3935             :                 discard_const_p(char *, kwnames),
    3936             :                 &blob.data, &blob_length,
    3937             :                 &allow_remaining_obj)) {
    3938           0 :                 return NULL;
    3939             :         }
    3940        1071 :         blob.length = blob_length;
    3941             : 
    3942        1071 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3943           1 :                 allow_remaining = true;
    3944             :         }
    3945             : 
    3946        1046 :         if (allow_remaining) {
    3947           1 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromToBlob);
    3948             :         } else {
    3949        1070 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_repsFromToBlob);
    3950             :         }
    3951        1071 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3952           0 :                 PyErr_SetNdrError(err);
    3953           0 :                 return NULL;
    3954             :         }
    3955             : 
    3956        1071 :         Py_RETURN_NONE;
    3957             : }
    3958             : 
    3959           0 : static PyObject *py_repsFromToBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3960             : {
    3961           0 :         struct repsFromToBlob *object = pytalloc_get_ptr(py_obj);
    3962           0 :         PyObject *ret;
    3963           0 :         char *retstr;
    3964             : 
    3965           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_repsFromToBlob, "repsFromToBlob", object);
    3966           0 :         ret = PyUnicode_FromString(retstr);
    3967           0 :         talloc_free(retstr);
    3968             : 
    3969           0 :         return ret;
    3970             : }
    3971             : 
    3972             : static PyMethodDef py_repsFromToBlob_methods[] = {
    3973             :         { "__ndr_pack__", (PyCFunction)py_repsFromToBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    3974             :         { "__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" },
    3975             :         { "__ndr_print__", (PyCFunction)py_repsFromToBlob_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    3976             :         { NULL, NULL, 0, NULL }
    3977             : };
    3978             : 
    3979             : 
    3980             : static PyTypeObject repsFromToBlob_Type = {
    3981             :         PyVarObject_HEAD_INIT(NULL, 0)
    3982             :         .tp_name = "drsblobs.repsFromToBlob",
    3983             :         .tp_getset = py_repsFromToBlob_getsetters,
    3984             :         .tp_methods = py_repsFromToBlob_methods,
    3985             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3986             :         .tp_new = py_repsFromToBlob_new,
    3987             : };
    3988             : 
    3989             : 
    3990         336 : static PyObject *py_scheduleHeader_get_type(PyObject *obj, void *closure)
    3991             : {
    3992         336 :         struct scheduleHeader *object = pytalloc_get_ptr(obj);
    3993          68 :         PyObject *py_type;
    3994         336 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)(object->type));
    3995         336 :         return py_type;
    3996             : }
    3997             : 
    3998         382 : static int py_scheduleHeader_set_type(PyObject *py_obj, PyObject *value, void *closure)
    3999             : {
    4000         382 :         struct scheduleHeader *object = pytalloc_get_ptr(py_obj);
    4001         382 :         if (value == NULL) {
    4002           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
    4003           0 :                 return -1;
    4004             :         }
    4005             :         {
    4006         382 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
    4007         382 :                 if (PyLong_Check(value)) {
    4008          11 :                         unsigned long long test_var;
    4009         382 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4010         382 :                         if (PyErr_Occurred() != NULL) {
    4011           0 :                                 return -1;
    4012             :                         }
    4013         382 :                         if (test_var > uint_max) {
    4014           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4015             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4016           0 :                                 return -1;
    4017             :                         }
    4018         382 :                         object->type = test_var;
    4019             :                 } else {
    4020           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4021             :                           PyLong_Type.tp_name);
    4022           0 :                         return -1;
    4023             :                 }
    4024             :         }
    4025         382 :         return 0;
    4026             : }
    4027             : 
    4028         336 : static PyObject *py_scheduleHeader_get_offset(PyObject *obj, void *closure)
    4029             : {
    4030         336 :         struct scheduleHeader *object = pytalloc_get_ptr(obj);
    4031          68 :         PyObject *py_offset;
    4032         336 :         py_offset = PyLong_FromUnsignedLongLong((uint32_t)(object->offset));
    4033         336 :         return py_offset;
    4034             : }
    4035             : 
    4036         382 : static int py_scheduleHeader_set_offset(PyObject *py_obj, PyObject *value, void *closure)
    4037             : {
    4038         382 :         struct scheduleHeader *object = pytalloc_get_ptr(py_obj);
    4039         382 :         if (value == NULL) {
    4040           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->offset");
    4041           0 :                 return -1;
    4042             :         }
    4043             :         {
    4044         382 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->offset));
    4045         382 :                 if (PyLong_Check(value)) {
    4046          11 :                         unsigned long long test_var;
    4047         382 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4048         382 :                         if (PyErr_Occurred() != NULL) {
    4049           0 :                                 return -1;
    4050             :                         }
    4051         382 :                         if (test_var > uint_max) {
    4052           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4053             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4054           0 :                                 return -1;
    4055             :                         }
    4056         382 :                         object->offset = test_var;
    4057             :                 } else {
    4058           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4059             :                           PyLong_Type.tp_name);
    4060           0 :                         return -1;
    4061             :                 }
    4062             :         }
    4063         382 :         return 0;
    4064             : }
    4065             : 
    4066             : static PyGetSetDef py_scheduleHeader_getsetters[] = {
    4067             :         {
    4068             :                 .name = discard_const_p(char, "type"),
    4069             :                 .get = py_scheduleHeader_get_type,
    4070             :                 .set = py_scheduleHeader_set_type,
    4071             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4072             :         },
    4073             :         {
    4074             :                 .name = discard_const_p(char, "offset"),
    4075             :                 .get = py_scheduleHeader_get_offset,
    4076             :                 .set = py_scheduleHeader_set_offset,
    4077             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4078             :         },
    4079             :         { .name = NULL }
    4080             : };
    4081             : 
    4082         382 : static PyObject *py_scheduleHeader_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4083             : {
    4084         382 :         return pytalloc_new(struct scheduleHeader, type);
    4085             : }
    4086             : 
    4087           0 : static PyObject *py_scheduleHeader_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4088             : {
    4089           0 :         struct scheduleHeader *object = pytalloc_get_ptr(py_obj);
    4090           0 :         PyObject *ret = NULL;
    4091           0 :         DATA_BLOB blob;
    4092           0 :         enum ndr_err_code err;
    4093           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4094           0 :         if (tmp_ctx == NULL) {
    4095           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4096           0 :                 return NULL;
    4097             :         }
    4098           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_scheduleHeader);
    4099           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4100           0 :                 TALLOC_FREE(tmp_ctx);
    4101           0 :                 PyErr_SetNdrError(err);
    4102           0 :                 return NULL;
    4103             :         }
    4104             : 
    4105           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4106           0 :         TALLOC_FREE(tmp_ctx);
    4107           0 :         return ret;
    4108             : }
    4109             : 
    4110           0 : static PyObject *py_scheduleHeader_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4111             : {
    4112           0 :         struct scheduleHeader *object = pytalloc_get_ptr(py_obj);
    4113           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4114           0 :         Py_ssize_t blob_length = 0;
    4115           0 :         enum ndr_err_code err;
    4116           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4117           0 :         PyObject *allow_remaining_obj = NULL;
    4118           0 :         bool allow_remaining = false;
    4119             : 
    4120           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4121             :                 discard_const_p(char *, kwnames),
    4122             :                 &blob.data, &blob_length,
    4123             :                 &allow_remaining_obj)) {
    4124           0 :                 return NULL;
    4125             :         }
    4126           0 :         blob.length = blob_length;
    4127             : 
    4128           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4129           0 :                 allow_remaining = true;
    4130             :         }
    4131             : 
    4132           0 :         if (allow_remaining) {
    4133           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_scheduleHeader);
    4134             :         } else {
    4135           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_scheduleHeader);
    4136             :         }
    4137           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4138           0 :                 PyErr_SetNdrError(err);
    4139           0 :                 return NULL;
    4140             :         }
    4141             : 
    4142           0 :         Py_RETURN_NONE;
    4143             : }
    4144             : 
    4145           0 : static PyObject *py_scheduleHeader_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4146             : {
    4147           0 :         struct scheduleHeader *object = pytalloc_get_ptr(py_obj);
    4148           0 :         PyObject *ret;
    4149           0 :         char *retstr;
    4150             : 
    4151           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_scheduleHeader, "scheduleHeader", object);
    4152           0 :         ret = PyUnicode_FromString(retstr);
    4153           0 :         talloc_free(retstr);
    4154             : 
    4155           0 :         return ret;
    4156             : }
    4157             : 
    4158             : static PyMethodDef py_scheduleHeader_methods[] = {
    4159             :         { "__ndr_pack__", (PyCFunction)py_scheduleHeader_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4160             :         { "__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" },
    4161             :         { "__ndr_print__", (PyCFunction)py_scheduleHeader_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4162             :         { NULL, NULL, 0, NULL }
    4163             : };
    4164             : 
    4165             : 
    4166             : static PyTypeObject scheduleHeader_Type = {
    4167             :         PyVarObject_HEAD_INIT(NULL, 0)
    4168             :         .tp_name = "drsblobs.scheduleHeader",
    4169             :         .tp_getset = py_scheduleHeader_getsetters,
    4170             :         .tp_methods = py_scheduleHeader_methods,
    4171             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4172             :         .tp_new = py_scheduleHeader_new,
    4173             : };
    4174             : 
    4175             : 
    4176        2294 : static PyObject *py_scheduleSlots_get_slots(PyObject *obj, void *closure)
    4177             : {
    4178        2294 :         struct scheduleSlots *object = pytalloc_get_ptr(obj);
    4179         187 :         PyObject *py_slots;
    4180        2294 :         py_slots = PyList_New(168);
    4181        2294 :         if (py_slots == NULL) {
    4182           0 :                 return NULL;
    4183             :         }
    4184             :         {
    4185             :                 int slots_cntr_0;
    4186      387686 :                 for (slots_cntr_0 = 0; slots_cntr_0 < (168); slots_cntr_0++) {
    4187       31416 :                         PyObject *py_slots_0;
    4188      385392 :                         py_slots_0 = PyLong_FromLong((uint16_t)((object->slots)[slots_cntr_0]));
    4189      385392 :                         PyList_SetItem(py_slots, slots_cntr_0, py_slots_0);
    4190             :                 }
    4191             :         }
    4192        2107 :         return py_slots;
    4193             : }
    4194             : 
    4195         382 : static int py_scheduleSlots_set_slots(PyObject *py_obj, PyObject *value, void *closure)
    4196             : {
    4197         382 :         struct scheduleSlots *object = pytalloc_get_ptr(py_obj);
    4198         382 :         if (value == NULL) {
    4199           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->slots");
    4200           0 :                 return -1;
    4201             :         }
    4202         382 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4203             :         {
    4204          11 :                 int slots_cntr_0;
    4205         382 :                 if (ARRAY_SIZE(object->slots) != PyList_GET_SIZE(value)) {
    4206           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));
    4207           0 :                         return -1;
    4208             :                 }
    4209       64558 :                 for (slots_cntr_0 = 0; slots_cntr_0 < PyList_GET_SIZE(value); slots_cntr_0++) {
    4210       64176 :                         if (PyList_GET_ITEM(value, slots_cntr_0) == NULL) {
    4211           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->slots)[slots_cntr_0]");
    4212           0 :                                 return -1;
    4213             :                         }
    4214             :                         {
    4215       64176 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->slots)[slots_cntr_0]));
    4216       64176 :                                 if (PyLong_Check(PyList_GET_ITEM(value, slots_cntr_0))) {
    4217        1848 :                                         unsigned long long test_var;
    4218       64176 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, slots_cntr_0));
    4219       64176 :                                         if (PyErr_Occurred() != NULL) {
    4220           0 :                                                 return -1;
    4221             :                                         }
    4222       64176 :                                         if (test_var > uint_max) {
    4223           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4224             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    4225           0 :                                                 return -1;
    4226             :                                         }
    4227       64176 :                                         (object->slots)[slots_cntr_0] = test_var;
    4228             :                                 } else {
    4229           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4230             :                                           PyLong_Type.tp_name);
    4231           0 :                                         return -1;
    4232             :                                 }
    4233             :                         }
    4234             :                 }
    4235             :         }
    4236         371 :         return 0;
    4237             : }
    4238             : 
    4239             : static PyGetSetDef py_scheduleSlots_getsetters[] = {
    4240             :         {
    4241             :                 .name = discard_const_p(char, "slots"),
    4242             :                 .get = py_scheduleSlots_get_slots,
    4243             :                 .set = py_scheduleSlots_set_slots,
    4244             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    4245             :         },
    4246             :         { .name = NULL }
    4247             : };
    4248             : 
    4249         382 : static PyObject *py_scheduleSlots_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4250             : {
    4251         382 :         return pytalloc_new(struct scheduleSlots, type);
    4252             : }
    4253             : 
    4254           0 : static PyObject *py_scheduleSlots_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4255             : {
    4256           0 :         struct scheduleSlots *object = pytalloc_get_ptr(py_obj);
    4257           0 :         PyObject *ret = NULL;
    4258           0 :         DATA_BLOB blob;
    4259           0 :         enum ndr_err_code err;
    4260           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4261           0 :         if (tmp_ctx == NULL) {
    4262           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4263           0 :                 return NULL;
    4264             :         }
    4265           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_scheduleSlots);
    4266           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4267           0 :                 TALLOC_FREE(tmp_ctx);
    4268           0 :                 PyErr_SetNdrError(err);
    4269           0 :                 return NULL;
    4270             :         }
    4271             : 
    4272           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4273           0 :         TALLOC_FREE(tmp_ctx);
    4274           0 :         return ret;
    4275             : }
    4276             : 
    4277           0 : static PyObject *py_scheduleSlots_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4278             : {
    4279           0 :         struct scheduleSlots *object = pytalloc_get_ptr(py_obj);
    4280           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4281           0 :         Py_ssize_t blob_length = 0;
    4282           0 :         enum ndr_err_code err;
    4283           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4284           0 :         PyObject *allow_remaining_obj = NULL;
    4285           0 :         bool allow_remaining = false;
    4286             : 
    4287           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4288             :                 discard_const_p(char *, kwnames),
    4289             :                 &blob.data, &blob_length,
    4290             :                 &allow_remaining_obj)) {
    4291           0 :                 return NULL;
    4292             :         }
    4293           0 :         blob.length = blob_length;
    4294             : 
    4295           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4296           0 :                 allow_remaining = true;
    4297             :         }
    4298             : 
    4299           0 :         if (allow_remaining) {
    4300           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_scheduleSlots);
    4301             :         } else {
    4302           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_scheduleSlots);
    4303             :         }
    4304           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4305           0 :                 PyErr_SetNdrError(err);
    4306           0 :                 return NULL;
    4307             :         }
    4308             : 
    4309           0 :         Py_RETURN_NONE;
    4310             : }
    4311             : 
    4312           0 : static PyObject *py_scheduleSlots_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4313             : {
    4314           0 :         struct scheduleSlots *object = pytalloc_get_ptr(py_obj);
    4315           0 :         PyObject *ret;
    4316           0 :         char *retstr;
    4317             : 
    4318           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_scheduleSlots, "scheduleSlots", object);
    4319           0 :         ret = PyUnicode_FromString(retstr);
    4320           0 :         talloc_free(retstr);
    4321             : 
    4322           0 :         return ret;
    4323             : }
    4324             : 
    4325             : static PyMethodDef py_scheduleSlots_methods[] = {
    4326             :         { "__ndr_pack__", (PyCFunction)py_scheduleSlots_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4327             :         { "__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" },
    4328             :         { "__ndr_print__", (PyCFunction)py_scheduleSlots_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4329             :         { NULL, NULL, 0, NULL }
    4330             : };
    4331             : 
    4332             : 
    4333             : static PyTypeObject scheduleSlots_Type = {
    4334             :         PyVarObject_HEAD_INIT(NULL, 0)
    4335             :         .tp_name = "drsblobs.scheduleSlots",
    4336             :         .tp_getset = py_scheduleSlots_getsetters,
    4337             :         .tp_methods = py_scheduleSlots_methods,
    4338             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4339             :         .tp_new = py_scheduleSlots_new,
    4340             : };
    4341             : 
    4342             : 
    4343         337 : static PyObject *py_schedule_get_size(PyObject *obj, void *closure)
    4344             : {
    4345         337 :         struct schedule *object = pytalloc_get_ptr(obj);
    4346          68 :         PyObject *py_size;
    4347         337 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
    4348         337 :         return py_size;
    4349             : }
    4350             : 
    4351         382 : static int py_schedule_set_size(PyObject *py_obj, PyObject *value, void *closure)
    4352             : {
    4353         382 :         struct schedule *object = pytalloc_get_ptr(py_obj);
    4354         382 :         if (value == NULL) {
    4355           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
    4356           0 :                 return -1;
    4357             :         }
    4358             :         {
    4359         382 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
    4360         382 :                 if (PyLong_Check(value)) {
    4361          11 :                         unsigned long long test_var;
    4362         382 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4363         382 :                         if (PyErr_Occurred() != NULL) {
    4364           0 :                                 return -1;
    4365             :                         }
    4366         382 :                         if (test_var > uint_max) {
    4367           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4368             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4369           0 :                                 return -1;
    4370             :                         }
    4371         382 :                         object->size = test_var;
    4372             :                 } else {
    4373           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4374             :                           PyLong_Type.tp_name);
    4375           0 :                         return -1;
    4376             :                 }
    4377             :         }
    4378         382 :         return 0;
    4379             : }
    4380             : 
    4381         336 : static PyObject *py_schedule_get_bandwidth(PyObject *obj, void *closure)
    4382             : {
    4383         336 :         struct schedule *object = pytalloc_get_ptr(obj);
    4384          68 :         PyObject *py_bandwidth;
    4385         336 :         py_bandwidth = PyLong_FromUnsignedLongLong((uint32_t)(object->bandwidth));
    4386         336 :         return py_bandwidth;
    4387             : }
    4388             : 
    4389         382 : static int py_schedule_set_bandwidth(PyObject *py_obj, PyObject *value, void *closure)
    4390             : {
    4391         382 :         struct schedule *object = pytalloc_get_ptr(py_obj);
    4392         382 :         if (value == NULL) {
    4393           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bandwidth");
    4394           0 :                 return -1;
    4395             :         }
    4396             :         {
    4397         382 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bandwidth));
    4398         382 :                 if (PyLong_Check(value)) {
    4399          11 :                         unsigned long long test_var;
    4400         382 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4401         382 :                         if (PyErr_Occurred() != NULL) {
    4402           0 :                                 return -1;
    4403             :                         }
    4404         382 :                         if (test_var > uint_max) {
    4405           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4406             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4407           0 :                                 return -1;
    4408             :                         }
    4409         382 :                         object->bandwidth = test_var;
    4410             :                 } else {
    4411           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4412             :                           PyLong_Type.tp_name);
    4413           0 :                         return -1;
    4414             :                 }
    4415             :         }
    4416         382 :         return 0;
    4417             : }
    4418             : 
    4419         336 : static PyObject *py_schedule_get_numberOfSchedules(PyObject *obj, void *closure)
    4420             : {
    4421         336 :         struct schedule *object = pytalloc_get_ptr(obj);
    4422          68 :         PyObject *py_numberOfSchedules;
    4423         336 :         py_numberOfSchedules = PyLong_FromUnsignedLongLong((uint32_t)(object->numberOfSchedules));
    4424         336 :         return py_numberOfSchedules;
    4425             : }
    4426             : 
    4427         382 : static int py_schedule_set_numberOfSchedules(PyObject *py_obj, PyObject *value, void *closure)
    4428             : {
    4429         382 :         struct schedule *object = pytalloc_get_ptr(py_obj);
    4430         382 :         if (value == NULL) {
    4431           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numberOfSchedules");
    4432           0 :                 return -1;
    4433             :         }
    4434             :         {
    4435         382 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numberOfSchedules));
    4436         382 :                 if (PyLong_Check(value)) {
    4437          11 :                         unsigned long long test_var;
    4438         382 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4439         382 :                         if (PyErr_Occurred() != NULL) {
    4440           0 :                                 return -1;
    4441             :                         }
    4442         382 :                         if (test_var > uint_max) {
    4443           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4444             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4445           0 :                                 return -1;
    4446             :                         }
    4447         382 :                         object->numberOfSchedules = test_var;
    4448             :                 } else {
    4449           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4450             :                           PyLong_Type.tp_name);
    4451           0 :                         return -1;
    4452             :                 }
    4453             :         }
    4454         382 :         return 0;
    4455             : }
    4456             : 
    4457         426 : static PyObject *py_schedule_get_headerArray(PyObject *obj, void *closure)
    4458             : {
    4459         426 :         struct schedule *object = pytalloc_get_ptr(obj);
    4460         158 :         PyObject *py_headerArray;
    4461         426 :         py_headerArray = PyList_New(object->numberOfSchedules);
    4462         426 :         if (py_headerArray == NULL) {
    4463           0 :                 return NULL;
    4464             :         }
    4465             :         {
    4466             :                 int headerArray_cntr_0;
    4467         852 :                 for (headerArray_cntr_0 = 0; headerArray_cntr_0 < (object->numberOfSchedules); headerArray_cntr_0++) {
    4468         158 :                         PyObject *py_headerArray_0;
    4469         426 :                         py_headerArray_0 = pytalloc_reference_ex(&scheduleHeader_Type, object->headerArray, &(object->headerArray)[headerArray_cntr_0]);
    4470         426 :                         PyList_SetItem(py_headerArray, headerArray_cntr_0, py_headerArray_0);
    4471             :                 }
    4472             :         }
    4473         268 :         return py_headerArray;
    4474             : }
    4475             : 
    4476         382 : static int py_schedule_set_headerArray(PyObject *py_obj, PyObject *value, void *closure)
    4477             : {
    4478         382 :         struct schedule *object = pytalloc_get_ptr(py_obj);
    4479         382 :         if (value == NULL) {
    4480           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->headerArray");
    4481           0 :                 return -1;
    4482             :         }
    4483         382 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4484             :         {
    4485          11 :                 int headerArray_cntr_0;
    4486         382 :                 object->headerArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->headerArray, PyList_GET_SIZE(value));
    4487         382 :                 if (!object->headerArray) { return -1; }
    4488         382 :                 talloc_set_name_const(object->headerArray, "ARRAY: object->headerArray");
    4489         775 :                 for (headerArray_cntr_0 = 0; headerArray_cntr_0 < PyList_GET_SIZE(value); headerArray_cntr_0++) {
    4490         382 :                         if (PyList_GET_ITEM(value, headerArray_cntr_0) == NULL) {
    4491           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->headerArray)[headerArray_cntr_0]");
    4492           0 :                                 return -1;
    4493             :                         }
    4494         382 :                         PY_CHECK_TYPE(&scheduleHeader_Type, PyList_GET_ITEM(value, headerArray_cntr_0), return -1;);
    4495         382 :                         if (talloc_reference(object->headerArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, headerArray_cntr_0))) == NULL) {
    4496           0 :                                 PyErr_NoMemory();
    4497           0 :                                 return -1;
    4498             :                         }
    4499         382 :                         (object->headerArray)[headerArray_cntr_0] = *(struct scheduleHeader *)pytalloc_get_ptr(PyList_GET_ITEM(value, headerArray_cntr_0));
    4500             :                 }
    4501             :         }
    4502         371 :         return 0;
    4503             : }
    4504             : 
    4505        4251 : static PyObject *py_schedule_get_dataArray(PyObject *obj, void *closure)
    4506             : {
    4507        4251 :         struct schedule *object = pytalloc_get_ptr(obj);
    4508         306 :         PyObject *py_dataArray;
    4509        4251 :         py_dataArray = PyList_New(object->numberOfSchedules);
    4510        4251 :         if (py_dataArray == NULL) {
    4511           0 :                 return NULL;
    4512             :         }
    4513             :         {
    4514             :                 int dataArray_cntr_0;
    4515        8502 :                 for (dataArray_cntr_0 = 0; dataArray_cntr_0 < (object->numberOfSchedules); dataArray_cntr_0++) {
    4516         306 :                         PyObject *py_dataArray_0;
    4517        4251 :                         py_dataArray_0 = pytalloc_reference_ex(&scheduleSlots_Type, object->dataArray, &(object->dataArray)[dataArray_cntr_0]);
    4518        4251 :                         PyList_SetItem(py_dataArray, dataArray_cntr_0, py_dataArray_0);
    4519             :                 }
    4520             :         }
    4521        3945 :         return py_dataArray;
    4522             : }
    4523             : 
    4524         382 : static int py_schedule_set_dataArray(PyObject *py_obj, PyObject *value, void *closure)
    4525             : {
    4526         382 :         struct schedule *object = pytalloc_get_ptr(py_obj);
    4527         382 :         if (value == NULL) {
    4528           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dataArray");
    4529           0 :                 return -1;
    4530             :         }
    4531         382 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4532             :         {
    4533          11 :                 int dataArray_cntr_0;
    4534         382 :                 object->dataArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->dataArray, PyList_GET_SIZE(value));
    4535         382 :                 if (!object->dataArray) { return -1; }
    4536         382 :                 talloc_set_name_const(object->dataArray, "ARRAY: object->dataArray");
    4537         775 :                 for (dataArray_cntr_0 = 0; dataArray_cntr_0 < PyList_GET_SIZE(value); dataArray_cntr_0++) {
    4538         382 :                         if (PyList_GET_ITEM(value, dataArray_cntr_0) == NULL) {
    4539           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->dataArray)[dataArray_cntr_0]");
    4540           0 :                                 return -1;
    4541             :                         }
    4542         382 :                         PY_CHECK_TYPE(&scheduleSlots_Type, PyList_GET_ITEM(value, dataArray_cntr_0), return -1;);
    4543         382 :                         if (talloc_reference(object->dataArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, dataArray_cntr_0))) == NULL) {
    4544           0 :                                 PyErr_NoMemory();
    4545           0 :                                 return -1;
    4546             :                         }
    4547         382 :                         (object->dataArray)[dataArray_cntr_0] = *(struct scheduleSlots *)pytalloc_get_ptr(PyList_GET_ITEM(value, dataArray_cntr_0));
    4548             :                 }
    4549             :         }
    4550         371 :         return 0;
    4551             : }
    4552             : 
    4553             : static PyGetSetDef py_schedule_getsetters[] = {
    4554             :         {
    4555             :                 .name = discard_const_p(char, "size"),
    4556             :                 .get = py_schedule_get_size,
    4557             :                 .set = py_schedule_set_size,
    4558             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4559             :         },
    4560             :         {
    4561             :                 .name = discard_const_p(char, "bandwidth"),
    4562             :                 .get = py_schedule_get_bandwidth,
    4563             :                 .set = py_schedule_set_bandwidth,
    4564             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4565             :         },
    4566             :         {
    4567             :                 .name = discard_const_p(char, "numberOfSchedules"),
    4568             :                 .get = py_schedule_get_numberOfSchedules,
    4569             :                 .set = py_schedule_set_numberOfSchedules,
    4570             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4571             :         },
    4572             :         {
    4573             :                 .name = discard_const_p(char, "headerArray"),
    4574             :                 .get = py_schedule_get_headerArray,
    4575             :                 .set = py_schedule_set_headerArray,
    4576             :                 .doc = discard_const_p(char, "PIDL-generated element of base type scheduleHeader")
    4577             :         },
    4578             :         {
    4579             :                 .name = discard_const_p(char, "dataArray"),
    4580             :                 .get = py_schedule_get_dataArray,
    4581             :                 .set = py_schedule_set_dataArray,
    4582             :                 .doc = discard_const_p(char, "PIDL-generated element of base type scheduleSlots")
    4583             :         },
    4584             :         { .name = NULL }
    4585             : };
    4586             : 
    4587        2158 : static PyObject *py_schedule_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4588             : {
    4589        2158 :         return pytalloc_new(struct schedule, type);
    4590             : }
    4591             : 
    4592          18 : static PyObject *py_schedule_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4593             : {
    4594          18 :         struct schedule *object = pytalloc_get_ptr(py_obj);
    4595          18 :         PyObject *ret = NULL;
    4596           7 :         DATA_BLOB blob;
    4597           7 :         enum ndr_err_code err;
    4598          18 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4599          18 :         if (tmp_ctx == NULL) {
    4600           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4601           0 :                 return NULL;
    4602             :         }
    4603          18 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_schedule);
    4604          18 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4605           0 :                 TALLOC_FREE(tmp_ctx);
    4606           0 :                 PyErr_SetNdrError(err);
    4607           0 :                 return NULL;
    4608             :         }
    4609             : 
    4610          18 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4611          18 :         TALLOC_FREE(tmp_ctx);
    4612          18 :         return ret;
    4613             : }
    4614             : 
    4615        1776 : static PyObject *py_schedule_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4616             : {
    4617        1776 :         struct schedule *object = pytalloc_get_ptr(py_obj);
    4618        1776 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4619        1776 :         Py_ssize_t blob_length = 0;
    4620          72 :         enum ndr_err_code err;
    4621        1776 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4622        1776 :         PyObject *allow_remaining_obj = NULL;
    4623        1776 :         bool allow_remaining = false;
    4624             : 
    4625        1776 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4626             :                 discard_const_p(char *, kwnames),
    4627             :                 &blob.data, &blob_length,
    4628             :                 &allow_remaining_obj)) {
    4629           0 :                 return NULL;
    4630             :         }
    4631        1776 :         blob.length = blob_length;
    4632             : 
    4633        1776 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4634           0 :                 allow_remaining = true;
    4635             :         }
    4636             : 
    4637        1704 :         if (allow_remaining) {
    4638           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_schedule);
    4639             :         } else {
    4640        1776 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_schedule);
    4641             :         }
    4642        1776 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4643           0 :                 PyErr_SetNdrError(err);
    4644           0 :                 return NULL;
    4645             :         }
    4646             : 
    4647        1776 :         Py_RETURN_NONE;
    4648             : }
    4649             : 
    4650           0 : static PyObject *py_schedule_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4651             : {
    4652           0 :         struct schedule *object = pytalloc_get_ptr(py_obj);
    4653           0 :         PyObject *ret;
    4654           0 :         char *retstr;
    4655             : 
    4656           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_schedule, "schedule", object);
    4657           0 :         ret = PyUnicode_FromString(retstr);
    4658           0 :         talloc_free(retstr);
    4659             : 
    4660           0 :         return ret;
    4661             : }
    4662             : 
    4663             : static PyMethodDef py_schedule_methods[] = {
    4664             :         { "__ndr_pack__", (PyCFunction)py_schedule_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4665             :         { "__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" },
    4666             :         { "__ndr_print__", (PyCFunction)py_schedule_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4667             :         { NULL, NULL, 0, NULL }
    4668             : };
    4669             : 
    4670             : 
    4671             : static PyTypeObject schedule_Type = {
    4672             :         PyVarObject_HEAD_INIT(NULL, 0)
    4673             :         .tp_name = "drsblobs.schedule",
    4674             :         .tp_getset = py_schedule_getsetters,
    4675             :         .tp_methods = py_schedule_methods,
    4676             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4677             :         .tp_new = py_schedule_new,
    4678             : };
    4679             : 
    4680             : 
    4681           0 : static PyObject *py_partialAttributeSetCtr1_get_count(PyObject *obj, void *closure)
    4682             : {
    4683           0 :         struct partialAttributeSetCtr1 *object = pytalloc_get_ptr(obj);
    4684           0 :         PyObject *py_count;
    4685           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    4686           0 :         return py_count;
    4687             : }
    4688             : 
    4689           0 : static int py_partialAttributeSetCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
    4690             : {
    4691           0 :         struct partialAttributeSetCtr1 *object = pytalloc_get_ptr(py_obj);
    4692           0 :         if (value == NULL) {
    4693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    4694           0 :                 return -1;
    4695             :         }
    4696             :         {
    4697           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    4698           0 :                 if (PyLong_Check(value)) {
    4699           0 :                         unsigned long long test_var;
    4700           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4701           0 :                         if (PyErr_Occurred() != NULL) {
    4702           0 :                                 return -1;
    4703             :                         }
    4704           0 :                         if (test_var > uint_max) {
    4705           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4706             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4707           0 :                                 return -1;
    4708             :                         }
    4709           0 :                         object->count = test_var;
    4710             :                 } else {
    4711           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4712             :                           PyLong_Type.tp_name);
    4713           0 :                         return -1;
    4714             :                 }
    4715             :         }
    4716           0 :         return 0;
    4717             : }
    4718             : 
    4719           0 : static PyObject *py_partialAttributeSetCtr1_get_array(PyObject *obj, void *closure)
    4720             : {
    4721           0 :         struct partialAttributeSetCtr1 *object = pytalloc_get_ptr(obj);
    4722           0 :         PyObject *py_array;
    4723           0 :         py_array = PyList_New(object->count);
    4724           0 :         if (py_array == NULL) {
    4725           0 :                 return NULL;
    4726             :         }
    4727             :         {
    4728             :                 int array_cntr_0;
    4729           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
    4730           0 :                         PyObject *py_array_0;
    4731           0 :                         py_array_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->array)[array_cntr_0]));
    4732           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
    4733             :                 }
    4734             :         }
    4735           0 :         return py_array;
    4736             : }
    4737             : 
    4738           0 : static int py_partialAttributeSetCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
    4739             : {
    4740           0 :         struct partialAttributeSetCtr1 *object = pytalloc_get_ptr(py_obj);
    4741           0 :         if (value == NULL) {
    4742           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    4743           0 :                 return -1;
    4744             :         }
    4745           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4746             :         {
    4747           0 :                 int array_cntr_0;
    4748           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    4749           0 :                 if (!object->array) { return -1; }
    4750           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
    4751           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
    4752           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
    4753           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
    4754           0 :                                 return -1;
    4755             :                         }
    4756             :                         {
    4757           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->array)[array_cntr_0]));
    4758           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, array_cntr_0))) {
    4759           0 :                                         unsigned long long test_var;
    4760           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, array_cntr_0));
    4761           0 :                                         if (PyErr_Occurred() != NULL) {
    4762           0 :                                                 return -1;
    4763             :                                         }
    4764           0 :                                         if (test_var > uint_max) {
    4765           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4766             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    4767           0 :                                                 return -1;
    4768             :                                         }
    4769           0 :                                         (object->array)[array_cntr_0] = test_var;
    4770             :                                 } else {
    4771           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4772             :                                           PyLong_Type.tp_name);
    4773           0 :                                         return -1;
    4774             :                                 }
    4775             :                         }
    4776             :                 }
    4777             :         }
    4778           0 :         return 0;
    4779             : }
    4780             : 
    4781             : static PyGetSetDef py_partialAttributeSetCtr1_getsetters[] = {
    4782             :         {
    4783             :                 .name = discard_const_p(char, "count"),
    4784             :                 .get = py_partialAttributeSetCtr1_get_count,
    4785             :                 .set = py_partialAttributeSetCtr1_set_count,
    4786             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4787             :         },
    4788             :         {
    4789             :                 .name = discard_const_p(char, "array"),
    4790             :                 .get = py_partialAttributeSetCtr1_get_array,
    4791             :                 .set = py_partialAttributeSetCtr1_set_array,
    4792             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeId")
    4793             :         },
    4794             :         { .name = NULL }
    4795             : };
    4796             : 
    4797           0 : static PyObject *py_partialAttributeSetCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4798             : {
    4799           0 :         return pytalloc_new(struct partialAttributeSetCtr1, type);
    4800             : }
    4801             : 
    4802             : 
    4803             : static PyTypeObject partialAttributeSetCtr1_Type = {
    4804             :         PyVarObject_HEAD_INIT(NULL, 0)
    4805             :         .tp_name = "drsblobs.partialAttributeSetCtr1",
    4806             :         .tp_getset = py_partialAttributeSetCtr1_getsetters,
    4807             :         .tp_methods = NULL,
    4808             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4809             :         .tp_new = py_partialAttributeSetCtr1_new,
    4810             : };
    4811             : 
    4812           0 : static PyObject *py_import_partialAttributeSetCtr(TALLOC_CTX *mem_ctx, int level, union partialAttributeSetCtr *in)
    4813             : {
    4814           0 :         PyObject *ret;
    4815             : 
    4816           0 :         switch (level) {
    4817           0 :                 case 1:
    4818           0 :                         ret = pytalloc_reference_ex(&partialAttributeSetCtr1_Type, mem_ctx, &in->ctr1);
    4819           0 :                         return ret;
    4820             : 
    4821             :         }
    4822           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    4823           0 :         return NULL;
    4824             : }
    4825             : 
    4826           0 : static union partialAttributeSetCtr *py_export_partialAttributeSetCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    4827             : {
    4828           0 :         union partialAttributeSetCtr *ret = talloc_zero(mem_ctx, union partialAttributeSetCtr);
    4829           0 :         switch (level) {
    4830           0 :                 case 1:
    4831           0 :                         if (in == NULL) {
    4832           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
    4833           0 :                                 talloc_free(ret); return NULL;
    4834             :                         }
    4835           0 :                         PY_CHECK_TYPE(&partialAttributeSetCtr1_Type, in, talloc_free(ret); return NULL;);
    4836           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    4837           0 :                                 PyErr_NoMemory();
    4838           0 :                                 talloc_free(ret); return NULL;
    4839             :                         }
    4840           0 :                         ret->ctr1 = *(struct partialAttributeSetCtr1 *)pytalloc_get_ptr(in);
    4841           0 :                         break;
    4842             : 
    4843           0 :                 default:
    4844           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
    4845           0 :                         talloc_free(ret);
    4846           0 :                         ret = NULL;
    4847             :         }
    4848             : 
    4849           0 :         return ret;
    4850             : }
    4851             : 
    4852           0 : static PyObject *py_partialAttributeSetCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4853             : {
    4854           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    4855           0 :         PyObject *mem_ctx_obj = NULL;
    4856           0 :         TALLOC_CTX *mem_ctx = NULL;
    4857           0 :         int level = 0;
    4858           0 :         PyObject *in_obj = NULL;
    4859           0 :         union partialAttributeSetCtr *in = NULL;
    4860             : 
    4861           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    4862             :                 discard_const_p(char *, kwnames),
    4863             :                 &mem_ctx_obj,
    4864             :                 &level,
    4865             :                 &in_obj)) {
    4866           0 :                 return NULL;
    4867             :         }
    4868           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    4869           0 :         if (mem_ctx == NULL) {
    4870           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    4871           0 :                 return NULL;
    4872             :         }
    4873           0 :         in = (union partialAttributeSetCtr *)pytalloc_get_ptr(in_obj);
    4874           0 :         if (in == NULL) {
    4875           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union partialAttributeSetCtr!");
    4876           0 :                 return NULL;
    4877             :         }
    4878             : 
    4879           0 :         return py_import_partialAttributeSetCtr(mem_ctx, level, in);
    4880             : }
    4881             : 
    4882           0 : static PyObject *py_partialAttributeSetCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4883             : {
    4884           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    4885           0 :         PyObject *mem_ctx_obj = NULL;
    4886           0 :         TALLOC_CTX *mem_ctx = NULL;
    4887           0 :         int level = 0;
    4888           0 :         PyObject *in = NULL;
    4889           0 :         union partialAttributeSetCtr *out = NULL;
    4890             : 
    4891           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    4892             :                 discard_const_p(char *, kwnames),
    4893             :                 &mem_ctx_obj,
    4894             :                 &level,
    4895             :                 &in)) {
    4896           0 :                 return NULL;
    4897             :         }
    4898           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    4899           0 :         if (mem_ctx == NULL) {
    4900           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    4901           0 :                 return NULL;
    4902             :         }
    4903             : 
    4904           0 :         out = py_export_partialAttributeSetCtr(mem_ctx, level, in);
    4905           0 :         if (out == NULL) {
    4906           0 :                 return NULL;
    4907             :         }
    4908             : 
    4909           0 :         return pytalloc_GenericObject_reference(out);
    4910             : }
    4911             : 
    4912             : static PyMethodDef py_partialAttributeSetCtr_methods[] = {
    4913             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_partialAttributeSetCtr_import),
    4914             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    4915             :                 "T.__import__(mem_ctx, level, in) => ret." },
    4916             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_partialAttributeSetCtr_export),
    4917             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    4918             :                 "T.__export__(mem_ctx, level, in) => ret." },
    4919             :         { NULL, NULL, 0, NULL }
    4920             : };
    4921             : 
    4922           0 : static PyObject *py_partialAttributeSetCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4923             : {
    4924           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    4925           0 :         return NULL;
    4926             : }
    4927             : 
    4928             : 
    4929             : static PyTypeObject partialAttributeSetCtr_Type = {
    4930             :         PyVarObject_HEAD_INIT(NULL, 0)
    4931             :         .tp_name = "drsblobs.partialAttributeSetCtr",
    4932             :         .tp_getset = NULL,
    4933             :         .tp_methods = py_partialAttributeSetCtr_methods,
    4934             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4935             :         .tp_new = py_partialAttributeSetCtr_new,
    4936             : };
    4937             : 
    4938             : 
    4939           0 : static PyObject *py_partialAttributeSetBlob_get_version(PyObject *obj, void *closure)
    4940             : {
    4941           0 :         struct partialAttributeSetBlob *object = pytalloc_get_ptr(obj);
    4942           0 :         PyObject *py_version;
    4943           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
    4944           0 :         return py_version;
    4945             : }
    4946             : 
    4947           0 : static int py_partialAttributeSetBlob_set_version(PyObject *py_obj, PyObject *value, void *closure)
    4948             : {
    4949           0 :         struct partialAttributeSetBlob *object = pytalloc_get_ptr(py_obj);
    4950           0 :         if (value == NULL) {
    4951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    4952           0 :                 return -1;
    4953             :         }
    4954             :         {
    4955           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    4956           0 :                 if (PyLong_Check(value)) {
    4957           0 :                         unsigned long long test_var;
    4958           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4959           0 :                         if (PyErr_Occurred() != NULL) {
    4960           0 :                                 return -1;
    4961             :                         }
    4962           0 :                         if (test_var > uint_max) {
    4963           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4964             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4965           0 :                                 return -1;
    4966             :                         }
    4967           0 :                         object->version = test_var;
    4968             :                 } else {
    4969           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4970             :                           PyLong_Type.tp_name);
    4971           0 :                         return -1;
    4972             :                 }
    4973             :         }
    4974           0 :         return 0;
    4975             : }
    4976             : 
    4977           0 : static PyObject *py_partialAttributeSetBlob_get_reserved(PyObject *obj, void *closure)
    4978             : {
    4979           0 :         struct partialAttributeSetBlob *object = pytalloc_get_ptr(obj);
    4980           0 :         PyObject *py_reserved;
    4981           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
    4982           0 :         return py_reserved;
    4983             : }
    4984             : 
    4985           0 : static int py_partialAttributeSetBlob_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
    4986             : {
    4987           0 :         struct partialAttributeSetBlob *object = pytalloc_get_ptr(py_obj);
    4988           0 :         if (value == NULL) {
    4989           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
    4990           0 :                 return -1;
    4991             :         }
    4992             :         {
    4993           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
    4994           0 :                 if (PyLong_Check(value)) {
    4995           0 :                         unsigned long long test_var;
    4996           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4997           0 :                         if (PyErr_Occurred() != NULL) {
    4998           0 :                                 return -1;
    4999             :                         }
    5000           0 :                         if (test_var > uint_max) {
    5001           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5002             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5003           0 :                                 return -1;
    5004             :                         }
    5005           0 :                         object->reserved = test_var;
    5006             :                 } else {
    5007           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5008             :                           PyLong_Type.tp_name);
    5009           0 :                         return -1;
    5010             :                 }
    5011             :         }
    5012           0 :         return 0;
    5013             : }
    5014             : 
    5015           0 : static PyObject *py_partialAttributeSetBlob_get_ctr(PyObject *obj, void *closure)
    5016             : {
    5017           0 :         struct partialAttributeSetBlob *object = pytalloc_get_ptr(obj);
    5018           0 :         PyObject *py_ctr;
    5019           0 :         py_ctr = pyrpc_import_union(&partialAttributeSetCtr_Type, pytalloc_get_mem_ctx(obj), object->version, &object->ctr, "union partialAttributeSetCtr");
    5020           0 :         if (py_ctr == NULL) {
    5021           0 :                 return NULL;
    5022             :         }
    5023           0 :         return py_ctr;
    5024             : }
    5025             : 
    5026           0 : static int py_partialAttributeSetBlob_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    5027             : {
    5028           0 :         struct partialAttributeSetBlob *object = pytalloc_get_ptr(py_obj);
    5029           0 :         if (value == NULL) {
    5030           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
    5031           0 :                 return -1;
    5032             :         }
    5033             :         {
    5034           0 :                 union partialAttributeSetCtr *ctr_switch_0;
    5035           0 :                 ctr_switch_0 = (union partialAttributeSetCtr *)pyrpc_export_union(&partialAttributeSetCtr_Type, pytalloc_get_mem_ctx(py_obj), object->version, value, "union partialAttributeSetCtr");
    5036           0 :                 if (ctr_switch_0 == NULL) {
    5037           0 :                         return -1;
    5038             :                 }
    5039           0 :                 object->ctr = *ctr_switch_0;
    5040             :         }
    5041           0 :         return 0;
    5042             : }
    5043             : 
    5044             : static PyGetSetDef py_partialAttributeSetBlob_getsetters[] = {
    5045             :         {
    5046             :                 .name = discard_const_p(char, "version"),
    5047             :                 .get = py_partialAttributeSetBlob_get_version,
    5048             :                 .set = py_partialAttributeSetBlob_set_version,
    5049             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5050             :         },
    5051             :         {
    5052             :                 .name = discard_const_p(char, "reserved"),
    5053             :                 .get = py_partialAttributeSetBlob_get_reserved,
    5054             :                 .set = py_partialAttributeSetBlob_set_reserved,
    5055             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5056             :         },
    5057             :         {
    5058             :                 .name = discard_const_p(char, "ctr"),
    5059             :                 .get = py_partialAttributeSetBlob_get_ctr,
    5060             :                 .set = py_partialAttributeSetBlob_set_ctr,
    5061             :                 .doc = discard_const_p(char, "PIDL-generated element of base type partialAttributeSetCtr")
    5062             :         },
    5063             :         { .name = NULL }
    5064             : };
    5065             : 
    5066           0 : static PyObject *py_partialAttributeSetBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5067             : {
    5068           0 :         return pytalloc_new(struct partialAttributeSetBlob, type);
    5069             : }
    5070             : 
    5071           0 : static PyObject *py_partialAttributeSetBlob_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5072             : {
    5073           0 :         struct partialAttributeSetBlob *object = pytalloc_get_ptr(py_obj);
    5074           0 :         PyObject *ret = NULL;
    5075           0 :         DATA_BLOB blob;
    5076           0 :         enum ndr_err_code err;
    5077           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5078           0 :         if (tmp_ctx == NULL) {
    5079           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5080           0 :                 return NULL;
    5081             :         }
    5082           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_partialAttributeSetBlob);
    5083           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5084           0 :                 TALLOC_FREE(tmp_ctx);
    5085           0 :                 PyErr_SetNdrError(err);
    5086           0 :                 return NULL;
    5087             :         }
    5088             : 
    5089           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5090           0 :         TALLOC_FREE(tmp_ctx);
    5091           0 :         return ret;
    5092             : }
    5093             : 
    5094           0 : static PyObject *py_partialAttributeSetBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5095             : {
    5096           0 :         struct partialAttributeSetBlob *object = pytalloc_get_ptr(py_obj);
    5097           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5098           0 :         Py_ssize_t blob_length = 0;
    5099           0 :         enum ndr_err_code err;
    5100           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5101           0 :         PyObject *allow_remaining_obj = NULL;
    5102           0 :         bool allow_remaining = false;
    5103             : 
    5104           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5105             :                 discard_const_p(char *, kwnames),
    5106             :                 &blob.data, &blob_length,
    5107             :                 &allow_remaining_obj)) {
    5108           0 :                 return NULL;
    5109             :         }
    5110           0 :         blob.length = blob_length;
    5111             : 
    5112           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5113           0 :                 allow_remaining = true;
    5114             :         }
    5115             : 
    5116           0 :         if (allow_remaining) {
    5117           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_partialAttributeSetBlob);
    5118             :         } else {
    5119           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_partialAttributeSetBlob);
    5120             :         }
    5121           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5122           0 :                 PyErr_SetNdrError(err);
    5123           0 :                 return NULL;
    5124             :         }
    5125             : 
    5126           0 :         Py_RETURN_NONE;
    5127             : }
    5128             : 
    5129           0 : static PyObject *py_partialAttributeSetBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5130             : {
    5131           0 :         struct partialAttributeSetBlob *object = pytalloc_get_ptr(py_obj);
    5132           0 :         PyObject *ret;
    5133           0 :         char *retstr;
    5134             : 
    5135           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_partialAttributeSetBlob, "partialAttributeSetBlob", object);
    5136           0 :         ret = PyUnicode_FromString(retstr);
    5137           0 :         talloc_free(retstr);
    5138             : 
    5139           0 :         return ret;
    5140             : }
    5141             : 
    5142             : static PyMethodDef py_partialAttributeSetBlob_methods[] = {
    5143             :         { "__ndr_pack__", (PyCFunction)py_partialAttributeSetBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5144             :         { "__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" },
    5145             :         { "__ndr_print__", (PyCFunction)py_partialAttributeSetBlob_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5146             :         { NULL, NULL, 0, NULL }
    5147             : };
    5148             : 
    5149             : 
    5150             : static PyTypeObject partialAttributeSetBlob_Type = {
    5151             :         PyVarObject_HEAD_INIT(NULL, 0)
    5152             :         .tp_name = "drsblobs.partialAttributeSetBlob",
    5153             :         .tp_getset = py_partialAttributeSetBlob_getsetters,
    5154             :         .tp_methods = py_partialAttributeSetBlob_methods,
    5155             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5156             :         .tp_new = py_partialAttributeSetBlob_new,
    5157             : };
    5158             : 
    5159             : 
    5160          17 : static PyObject *py_schemaInfoBlob_get_marker(PyObject *obj, void *closure)
    5161             : {
    5162          17 :         struct schemaInfoBlob *object = pytalloc_get_ptr(obj);
    5163           0 :         PyObject *py_marker;
    5164          17 :         py_marker = PyLong_FromLong((uint16_t)(object->marker));
    5165          17 :         return py_marker;
    5166             : }
    5167             : 
    5168          12 : static int py_schemaInfoBlob_set_marker(PyObject *py_obj, PyObject *value, void *closure)
    5169             : {
    5170          12 :         struct schemaInfoBlob *object = pytalloc_get_ptr(py_obj);
    5171          12 :         if (value == NULL) {
    5172           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->marker");
    5173           0 :                 return -1;
    5174             :         }
    5175             :         {
    5176          12 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->marker));
    5177          12 :                 if (PyLong_Check(value)) {
    5178           0 :                         unsigned long long test_var;
    5179          12 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5180          12 :                         if (PyErr_Occurred() != NULL) {
    5181           0 :                                 return -1;
    5182             :                         }
    5183          12 :                         if (test_var > uint_max) {
    5184           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5185             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5186           0 :                                 return -1;
    5187             :                         }
    5188          12 :                         object->marker = test_var;
    5189             :                 } else {
    5190           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5191             :                           PyLong_Type.tp_name);
    5192           0 :                         return -1;
    5193             :                 }
    5194             :         }
    5195          12 :         return 0;
    5196             : }
    5197             : 
    5198          24 : static PyObject *py_schemaInfoBlob_get_revision(PyObject *obj, void *closure)
    5199             : {
    5200          24 :         struct schemaInfoBlob *object = pytalloc_get_ptr(obj);
    5201           0 :         PyObject *py_revision;
    5202          24 :         py_revision = PyLong_FromUnsignedLongLong((uint32_t)(object->revision));
    5203          24 :         return py_revision;
    5204             : }
    5205             : 
    5206          13 : static int py_schemaInfoBlob_set_revision(PyObject *py_obj, PyObject *value, void *closure)
    5207             : {
    5208          13 :         struct schemaInfoBlob *object = pytalloc_get_ptr(py_obj);
    5209          13 :         if (value == NULL) {
    5210           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->revision");
    5211           0 :                 return -1;
    5212             :         }
    5213             :         {
    5214          13 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->revision));
    5215          13 :                 if (PyLong_Check(value)) {
    5216           0 :                         unsigned long long test_var;
    5217          13 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5218          13 :                         if (PyErr_Occurred() != NULL) {
    5219           0 :                                 return -1;
    5220             :                         }
    5221          13 :                         if (test_var > uint_max) {
    5222           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5223             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5224           0 :                                 return -1;
    5225             :                         }
    5226          13 :                         object->revision = test_var;
    5227             :                 } else {
    5228           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5229             :                           PyLong_Type.tp_name);
    5230           0 :                         return -1;
    5231             :                 }
    5232             :         }
    5233          13 :         return 0;
    5234             : }
    5235             : 
    5236          36 : static PyObject *py_schemaInfoBlob_get_invocation_id(PyObject *obj, void *closure)
    5237             : {
    5238          36 :         struct schemaInfoBlob *object = pytalloc_get_ptr(obj);
    5239           0 :         PyObject *py_invocation_id;
    5240          36 :         py_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->invocation_id);
    5241          36 :         return py_invocation_id;
    5242             : }
    5243             : 
    5244          13 : static int py_schemaInfoBlob_set_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
    5245             : {
    5246          13 :         struct schemaInfoBlob *object = pytalloc_get_ptr(py_obj);
    5247          13 :         if (value == NULL) {
    5248           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->invocation_id");
    5249           0 :                 return -1;
    5250             :         }
    5251          13 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    5252          13 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5253           0 :                 PyErr_NoMemory();
    5254           0 :                 return -1;
    5255             :         }
    5256          13 :         object->invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
    5257          13 :         return 0;
    5258             : }
    5259             : 
    5260             : static PyGetSetDef py_schemaInfoBlob_getsetters[] = {
    5261             :         {
    5262             :                 .name = discard_const_p(char, "marker"),
    5263             :                 .get = py_schemaInfoBlob_get_marker,
    5264             :                 .set = py_schemaInfoBlob_set_marker,
    5265             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5266             :         },
    5267             :         {
    5268             :                 .name = discard_const_p(char, "revision"),
    5269             :                 .get = py_schemaInfoBlob_get_revision,
    5270             :                 .set = py_schemaInfoBlob_set_revision,
    5271             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5272             :         },
    5273             :         {
    5274             :                 .name = discard_const_p(char, "invocation_id"),
    5275             :                 .get = py_schemaInfoBlob_get_invocation_id,
    5276             :                 .set = py_schemaInfoBlob_set_invocation_id,
    5277             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    5278             :         },
    5279             :         { .name = NULL }
    5280             : };
    5281             : 
    5282          30 : static PyObject *py_schemaInfoBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5283             : {
    5284          30 :         return pytalloc_new(struct schemaInfoBlob, type);
    5285             : }
    5286             : 
    5287          12 : static PyObject *py_schemaInfoBlob_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5288             : {
    5289          12 :         struct schemaInfoBlob *object = pytalloc_get_ptr(py_obj);
    5290          12 :         PyObject *ret = NULL;
    5291           0 :         DATA_BLOB blob;
    5292           0 :         enum ndr_err_code err;
    5293          12 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5294          12 :         if (tmp_ctx == NULL) {
    5295           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5296           0 :                 return NULL;
    5297             :         }
    5298          12 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_schemaInfoBlob);
    5299          12 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5300           0 :                 TALLOC_FREE(tmp_ctx);
    5301           0 :                 PyErr_SetNdrError(err);
    5302           0 :                 return NULL;
    5303             :         }
    5304             : 
    5305          12 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5306          12 :         TALLOC_FREE(tmp_ctx);
    5307          12 :         return ret;
    5308             : }
    5309             : 
    5310          17 : static PyObject *py_schemaInfoBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5311             : {
    5312          17 :         struct schemaInfoBlob *object = pytalloc_get_ptr(py_obj);
    5313          17 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5314          17 :         Py_ssize_t blob_length = 0;
    5315           0 :         enum ndr_err_code err;
    5316          17 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5317          17 :         PyObject *allow_remaining_obj = NULL;
    5318          17 :         bool allow_remaining = false;
    5319             : 
    5320          17 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5321             :                 discard_const_p(char *, kwnames),
    5322             :                 &blob.data, &blob_length,
    5323             :                 &allow_remaining_obj)) {
    5324           0 :                 return NULL;
    5325             :         }
    5326          17 :         blob.length = blob_length;
    5327             : 
    5328          17 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5329           0 :                 allow_remaining = true;
    5330             :         }
    5331             : 
    5332          17 :         if (allow_remaining) {
    5333           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_schemaInfoBlob);
    5334             :         } else {
    5335          17 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_schemaInfoBlob);
    5336             :         }
    5337          17 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5338           0 :                 PyErr_SetNdrError(err);
    5339           0 :                 return NULL;
    5340             :         }
    5341             : 
    5342          17 :         Py_RETURN_NONE;
    5343             : }
    5344             : 
    5345           0 : static PyObject *py_schemaInfoBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5346             : {
    5347           0 :         struct schemaInfoBlob *object = pytalloc_get_ptr(py_obj);
    5348           0 :         PyObject *ret;
    5349           0 :         char *retstr;
    5350             : 
    5351           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_schemaInfoBlob, "schemaInfoBlob", object);
    5352           0 :         ret = PyUnicode_FromString(retstr);
    5353           0 :         talloc_free(retstr);
    5354             : 
    5355           0 :         return ret;
    5356             : }
    5357             : 
    5358             : static PyMethodDef py_schemaInfoBlob_methods[] = {
    5359             :         { "__ndr_pack__", (PyCFunction)py_schemaInfoBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5360             :         { "__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" },
    5361             :         { "__ndr_print__", (PyCFunction)py_schemaInfoBlob_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5362             :         { NULL, NULL, 0, NULL }
    5363             : };
    5364             : 
    5365             : 
    5366             : static PyTypeObject schemaInfoBlob_Type = {
    5367             :         PyVarObject_HEAD_INIT(NULL, 0)
    5368             :         .tp_name = "drsblobs.schemaInfoBlob",
    5369             :         .tp_getset = py_schemaInfoBlob_getsetters,
    5370             :         .tp_methods = py_schemaInfoBlob_methods,
    5371             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5372             :         .tp_new = py_schemaInfoBlob_new,
    5373             : };
    5374             : 
    5375             : 
    5376           0 : static PyObject *py_drsuapi_MSPrefixMap_Entry_get_entryID(PyObject *obj, void *closure)
    5377             : {
    5378           0 :         struct drsuapi_MSPrefixMap_Entry *object = pytalloc_get_ptr(obj);
    5379           0 :         PyObject *py_entryID;
    5380           0 :         py_entryID = PyLong_FromLong((uint16_t)(object->entryID));
    5381           0 :         return py_entryID;
    5382             : }
    5383             : 
    5384           0 : static int py_drsuapi_MSPrefixMap_Entry_set_entryID(PyObject *py_obj, PyObject *value, void *closure)
    5385             : {
    5386           0 :         struct drsuapi_MSPrefixMap_Entry *object = pytalloc_get_ptr(py_obj);
    5387           0 :         if (value == NULL) {
    5388           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->entryID");
    5389           0 :                 return -1;
    5390             :         }
    5391             :         {
    5392           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->entryID));
    5393           0 :                 if (PyLong_Check(value)) {
    5394           0 :                         unsigned long long test_var;
    5395           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5396           0 :                         if (PyErr_Occurred() != NULL) {
    5397           0 :                                 return -1;
    5398             :                         }
    5399           0 :                         if (test_var > uint_max) {
    5400           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5401             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5402           0 :                                 return -1;
    5403             :                         }
    5404           0 :                         object->entryID = test_var;
    5405             :                 } else {
    5406           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5407             :                           PyLong_Type.tp_name);
    5408           0 :                         return -1;
    5409             :                 }
    5410             :         }
    5411           0 :         return 0;
    5412             : }
    5413             : 
    5414           0 : static PyObject *py_drsuapi_MSPrefixMap_Entry_get_length(PyObject *obj, void *closure)
    5415             : {
    5416           0 :         struct drsuapi_MSPrefixMap_Entry *object = pytalloc_get_ptr(obj);
    5417           0 :         PyObject *py_length;
    5418           0 :         py_length = PyLong_FromLong((uint16_t)(object->length));
    5419           0 :         return py_length;
    5420             : }
    5421             : 
    5422           0 : static int py_drsuapi_MSPrefixMap_Entry_set_length(PyObject *py_obj, PyObject *value, void *closure)
    5423             : {
    5424           0 :         struct drsuapi_MSPrefixMap_Entry *object = pytalloc_get_ptr(py_obj);
    5425           0 :         if (value == NULL) {
    5426           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    5427           0 :                 return -1;
    5428             :         }
    5429             :         {
    5430           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    5431           0 :                 if (PyLong_Check(value)) {
    5432           0 :                         unsigned long long test_var;
    5433           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5434           0 :                         if (PyErr_Occurred() != NULL) {
    5435           0 :                                 return -1;
    5436             :                         }
    5437           0 :                         if (test_var > uint_max) {
    5438           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5439             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5440           0 :                                 return -1;
    5441             :                         }
    5442           0 :                         object->length = test_var;
    5443             :                 } else {
    5444           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5445             :                           PyLong_Type.tp_name);
    5446           0 :                         return -1;
    5447             :                 }
    5448             :         }
    5449           0 :         return 0;
    5450             : }
    5451             : 
    5452           0 : static PyObject *py_drsuapi_MSPrefixMap_Entry_get_binary_oid(PyObject *obj, void *closure)
    5453             : {
    5454           0 :         struct drsuapi_MSPrefixMap_Entry *object = pytalloc_get_ptr(obj);
    5455           0 :         PyObject *py_binary_oid;
    5456           0 :         py_binary_oid = PyList_New(object->length);
    5457           0 :         if (py_binary_oid == NULL) {
    5458           0 :                 return NULL;
    5459             :         }
    5460             :         {
    5461             :                 int binary_oid_cntr_0;
    5462           0 :                 for (binary_oid_cntr_0 = 0; binary_oid_cntr_0 < (object->length); binary_oid_cntr_0++) {
    5463           0 :                         PyObject *py_binary_oid_0;
    5464           0 :                         py_binary_oid_0 = PyLong_FromLong((uint16_t)((object->binary_oid)[binary_oid_cntr_0]));
    5465           0 :                         PyList_SetItem(py_binary_oid, binary_oid_cntr_0, py_binary_oid_0);
    5466             :                 }
    5467             :         }
    5468           0 :         return py_binary_oid;
    5469             : }
    5470             : 
    5471           0 : static int py_drsuapi_MSPrefixMap_Entry_set_binary_oid(PyObject *py_obj, PyObject *value, void *closure)
    5472             : {
    5473           0 :         struct drsuapi_MSPrefixMap_Entry *object = pytalloc_get_ptr(py_obj);
    5474           0 :         if (value == NULL) {
    5475           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->binary_oid");
    5476           0 :                 return -1;
    5477             :         }
    5478           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5479             :         {
    5480           0 :                 int binary_oid_cntr_0;
    5481           0 :                 object->binary_oid = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->binary_oid, PyList_GET_SIZE(value));
    5482           0 :                 if (!object->binary_oid) { return -1; }
    5483           0 :                 talloc_set_name_const(object->binary_oid, "ARRAY: object->binary_oid");
    5484           0 :                 for (binary_oid_cntr_0 = 0; binary_oid_cntr_0 < PyList_GET_SIZE(value); binary_oid_cntr_0++) {
    5485           0 :                         if (PyList_GET_ITEM(value, binary_oid_cntr_0) == NULL) {
    5486           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->binary_oid)[binary_oid_cntr_0]");
    5487           0 :                                 return -1;
    5488             :                         }
    5489             :                         {
    5490           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->binary_oid)[binary_oid_cntr_0]));
    5491           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, binary_oid_cntr_0))) {
    5492           0 :                                         unsigned long long test_var;
    5493           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, binary_oid_cntr_0));
    5494           0 :                                         if (PyErr_Occurred() != NULL) {
    5495           0 :                                                 return -1;
    5496             :                                         }
    5497           0 :                                         if (test_var > uint_max) {
    5498           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5499             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    5500           0 :                                                 return -1;
    5501             :                                         }
    5502           0 :                                         (object->binary_oid)[binary_oid_cntr_0] = test_var;
    5503             :                                 } else {
    5504           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5505             :                                           PyLong_Type.tp_name);
    5506           0 :                                         return -1;
    5507             :                                 }
    5508             :                         }
    5509             :                 }
    5510             :         }
    5511           0 :         return 0;
    5512             : }
    5513             : 
    5514             : static PyGetSetDef py_drsuapi_MSPrefixMap_Entry_getsetters[] = {
    5515             :         {
    5516             :                 .name = discard_const_p(char, "entryID"),
    5517             :                 .get = py_drsuapi_MSPrefixMap_Entry_get_entryID,
    5518             :                 .set = py_drsuapi_MSPrefixMap_Entry_set_entryID,
    5519             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    5520             :         },
    5521             :         {
    5522             :                 .name = discard_const_p(char, "length"),
    5523             :                 .get = py_drsuapi_MSPrefixMap_Entry_get_length,
    5524             :                 .set = py_drsuapi_MSPrefixMap_Entry_set_length,
    5525             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    5526             :         },
    5527             :         {
    5528             :                 .name = discard_const_p(char, "binary_oid"),
    5529             :                 .get = py_drsuapi_MSPrefixMap_Entry_get_binary_oid,
    5530             :                 .set = py_drsuapi_MSPrefixMap_Entry_set_binary_oid,
    5531             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5532             :         },
    5533             :         { .name = NULL }
    5534             : };
    5535             : 
    5536           0 : static PyObject *py_drsuapi_MSPrefixMap_Entry_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5537             : {
    5538           0 :         return pytalloc_new(struct drsuapi_MSPrefixMap_Entry, type);
    5539             : }
    5540             : 
    5541             : 
    5542             : static PyTypeObject drsuapi_MSPrefixMap_Entry_Type = {
    5543             :         PyVarObject_HEAD_INIT(NULL, 0)
    5544             :         .tp_name = "drsblobs.drsuapi_MSPrefixMap_Entry",
    5545             :         .tp_getset = py_drsuapi_MSPrefixMap_Entry_getsetters,
    5546             :         .tp_methods = NULL,
    5547             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5548             :         .tp_new = py_drsuapi_MSPrefixMap_Entry_new,
    5549             : };
    5550             : 
    5551             : 
    5552           0 : static PyObject *py_drsuapi_MSPrefixMap_Ctr_get_num_entries(PyObject *obj, void *closure)
    5553             : {
    5554           0 :         struct drsuapi_MSPrefixMap_Ctr *object = pytalloc_get_ptr(obj);
    5555           0 :         PyObject *py_num_entries;
    5556           0 :         py_num_entries = PyLong_FromUnsignedLongLong((uint32_t)(object->num_entries));
    5557           0 :         return py_num_entries;
    5558             : }
    5559             : 
    5560           0 : static int py_drsuapi_MSPrefixMap_Ctr_set_num_entries(PyObject *py_obj, PyObject *value, void *closure)
    5561             : {
    5562           0 :         struct drsuapi_MSPrefixMap_Ctr *object = pytalloc_get_ptr(py_obj);
    5563           0 :         if (value == NULL) {
    5564           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_entries");
    5565           0 :                 return -1;
    5566             :         }
    5567             :         {
    5568           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_entries));
    5569           0 :                 if (PyLong_Check(value)) {
    5570           0 :                         unsigned long long test_var;
    5571           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5572           0 :                         if (PyErr_Occurred() != NULL) {
    5573           0 :                                 return -1;
    5574             :                         }
    5575           0 :                         if (test_var > uint_max) {
    5576           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5577             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5578           0 :                                 return -1;
    5579             :                         }
    5580           0 :                         object->num_entries = test_var;
    5581             :                 } else {
    5582           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5583             :                           PyLong_Type.tp_name);
    5584           0 :                         return -1;
    5585             :                 }
    5586             :         }
    5587           0 :         return 0;
    5588             : }
    5589             : 
    5590           0 : static PyObject *py_drsuapi_MSPrefixMap_Ctr_get___ndr_size(PyObject *obj, void *closure)
    5591             : {
    5592           0 :         struct drsuapi_MSPrefixMap_Ctr *object = pytalloc_get_ptr(obj);
    5593           0 :         PyObject *py___ndr_size;
    5594           0 :         py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size));
    5595           0 :         return py___ndr_size;
    5596             : }
    5597             : 
    5598           0 : static int py_drsuapi_MSPrefixMap_Ctr_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
    5599             : {
    5600           0 :         struct drsuapi_MSPrefixMap_Ctr *object = pytalloc_get_ptr(py_obj);
    5601           0 :         if (value == NULL) {
    5602           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
    5603           0 :                 return -1;
    5604             :         }
    5605             :         {
    5606           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
    5607           0 :                 if (PyLong_Check(value)) {
    5608           0 :                         unsigned long long test_var;
    5609           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5610           0 :                         if (PyErr_Occurred() != NULL) {
    5611           0 :                                 return -1;
    5612             :                         }
    5613           0 :                         if (test_var > uint_max) {
    5614           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5615             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5616           0 :                                 return -1;
    5617             :                         }
    5618           0 :                         object->__ndr_size = test_var;
    5619             :                 } else {
    5620           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5621             :                           PyLong_Type.tp_name);
    5622           0 :                         return -1;
    5623             :                 }
    5624             :         }
    5625           0 :         return 0;
    5626             : }
    5627             : 
    5628           0 : static PyObject *py_drsuapi_MSPrefixMap_Ctr_get_entries(PyObject *obj, void *closure)
    5629             : {
    5630           0 :         struct drsuapi_MSPrefixMap_Ctr *object = pytalloc_get_ptr(obj);
    5631           0 :         PyObject *py_entries;
    5632           0 :         py_entries = PyList_New(object->num_entries);
    5633           0 :         if (py_entries == NULL) {
    5634           0 :                 return NULL;
    5635             :         }
    5636             :         {
    5637             :                 int entries_cntr_0;
    5638           0 :                 for (entries_cntr_0 = 0; entries_cntr_0 < (object->num_entries); entries_cntr_0++) {
    5639           0 :                         PyObject *py_entries_0;
    5640           0 :                         py_entries_0 = pytalloc_reference_ex(&drsuapi_MSPrefixMap_Entry_Type, object->entries, &(object->entries)[entries_cntr_0]);
    5641           0 :                         PyList_SetItem(py_entries, entries_cntr_0, py_entries_0);
    5642             :                 }
    5643             :         }
    5644           0 :         return py_entries;
    5645             : }
    5646             : 
    5647           0 : static int py_drsuapi_MSPrefixMap_Ctr_set_entries(PyObject *py_obj, PyObject *value, void *closure)
    5648             : {
    5649           0 :         struct drsuapi_MSPrefixMap_Ctr *object = pytalloc_get_ptr(py_obj);
    5650           0 :         if (value == NULL) {
    5651           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->entries");
    5652           0 :                 return -1;
    5653             :         }
    5654           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5655             :         {
    5656           0 :                 int entries_cntr_0;
    5657           0 :                 object->entries = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->entries, PyList_GET_SIZE(value));
    5658           0 :                 if (!object->entries) { return -1; }
    5659           0 :                 talloc_set_name_const(object->entries, "ARRAY: object->entries");
    5660           0 :                 for (entries_cntr_0 = 0; entries_cntr_0 < PyList_GET_SIZE(value); entries_cntr_0++) {
    5661           0 :                         if (PyList_GET_ITEM(value, entries_cntr_0) == NULL) {
    5662           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->entries)[entries_cntr_0]");
    5663           0 :                                 return -1;
    5664             :                         }
    5665           0 :                         PY_CHECK_TYPE(&drsuapi_MSPrefixMap_Entry_Type, PyList_GET_ITEM(value, entries_cntr_0), return -1;);
    5666           0 :                         if (talloc_reference(object->entries, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, entries_cntr_0))) == NULL) {
    5667           0 :                                 PyErr_NoMemory();
    5668           0 :                                 return -1;
    5669             :                         }
    5670           0 :                         (object->entries)[entries_cntr_0] = *(struct drsuapi_MSPrefixMap_Entry *)pytalloc_get_ptr(PyList_GET_ITEM(value, entries_cntr_0));
    5671             :                 }
    5672             :         }
    5673           0 :         return 0;
    5674             : }
    5675             : 
    5676             : static PyGetSetDef py_drsuapi_MSPrefixMap_Ctr_getsetters[] = {
    5677             :         {
    5678             :                 .name = discard_const_p(char, "num_entries"),
    5679             :                 .get = py_drsuapi_MSPrefixMap_Ctr_get_num_entries,
    5680             :                 .set = py_drsuapi_MSPrefixMap_Ctr_set_num_entries,
    5681             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5682             :         },
    5683             :         {
    5684             :                 .name = discard_const_p(char, "__ndr_size"),
    5685             :                 .get = py_drsuapi_MSPrefixMap_Ctr_get___ndr_size,
    5686             :                 .set = py_drsuapi_MSPrefixMap_Ctr_set___ndr_size,
    5687             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5688             :         },
    5689             :         {
    5690             :                 .name = discard_const_p(char, "entries"),
    5691             :                 .get = py_drsuapi_MSPrefixMap_Ctr_get_entries,
    5692             :                 .set = py_drsuapi_MSPrefixMap_Ctr_set_entries,
    5693             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_MSPrefixMap_Entry")
    5694             :         },
    5695             :         { .name = NULL }
    5696             : };
    5697             : 
    5698           0 : static PyObject *py_drsuapi_MSPrefixMap_Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5699             : {
    5700           0 :         return pytalloc_new(struct drsuapi_MSPrefixMap_Ctr, type);
    5701             : }
    5702             : 
    5703           0 : static PyObject *py_drsuapi_MSPrefixMap_Ctr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5704             : {
    5705           0 :         struct drsuapi_MSPrefixMap_Ctr *object = pytalloc_get_ptr(py_obj);
    5706           0 :         PyObject *ret = NULL;
    5707           0 :         DATA_BLOB blob;
    5708           0 :         enum ndr_err_code err;
    5709           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5710           0 :         if (tmp_ctx == NULL) {
    5711           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5712           0 :                 return NULL;
    5713             :         }
    5714           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_MSPrefixMap_Ctr);
    5715           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5716           0 :                 TALLOC_FREE(tmp_ctx);
    5717           0 :                 PyErr_SetNdrError(err);
    5718           0 :                 return NULL;
    5719             :         }
    5720             : 
    5721           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5722           0 :         TALLOC_FREE(tmp_ctx);
    5723           0 :         return ret;
    5724             : }
    5725             : 
    5726           0 : static PyObject *py_drsuapi_MSPrefixMap_Ctr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5727             : {
    5728           0 :         struct drsuapi_MSPrefixMap_Ctr *object = pytalloc_get_ptr(py_obj);
    5729           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5730           0 :         Py_ssize_t blob_length = 0;
    5731           0 :         enum ndr_err_code err;
    5732           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5733           0 :         PyObject *allow_remaining_obj = NULL;
    5734           0 :         bool allow_remaining = false;
    5735             : 
    5736           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5737             :                 discard_const_p(char *, kwnames),
    5738             :                 &blob.data, &blob_length,
    5739             :                 &allow_remaining_obj)) {
    5740           0 :                 return NULL;
    5741             :         }
    5742           0 :         blob.length = blob_length;
    5743             : 
    5744           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5745           0 :                 allow_remaining = true;
    5746             :         }
    5747             : 
    5748           0 :         if (allow_remaining) {
    5749           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_MSPrefixMap_Ctr);
    5750             :         } else {
    5751           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);
    5752             :         }
    5753           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5754           0 :                 PyErr_SetNdrError(err);
    5755           0 :                 return NULL;
    5756             :         }
    5757             : 
    5758           0 :         Py_RETURN_NONE;
    5759             : }
    5760             : 
    5761           0 : static PyObject *py_drsuapi_MSPrefixMap_Ctr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5762             : {
    5763           0 :         struct drsuapi_MSPrefixMap_Ctr *object = pytalloc_get_ptr(py_obj);
    5764           0 :         PyObject *ret;
    5765           0 :         char *retstr;
    5766             : 
    5767           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);
    5768           0 :         ret = PyUnicode_FromString(retstr);
    5769           0 :         talloc_free(retstr);
    5770             : 
    5771           0 :         return ret;
    5772             : }
    5773             : 
    5774             : static PyMethodDef py_drsuapi_MSPrefixMap_Ctr_methods[] = {
    5775             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_MSPrefixMap_Ctr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5776             :         { "__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" },
    5777             :         { "__ndr_print__", (PyCFunction)py_drsuapi_MSPrefixMap_Ctr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5778             :         { NULL, NULL, 0, NULL }
    5779             : };
    5780             : 
    5781             : 
    5782             : static PyTypeObject drsuapi_MSPrefixMap_Ctr_Type = {
    5783             :         PyVarObject_HEAD_INIT(NULL, 0)
    5784             :         .tp_name = "drsblobs.drsuapi_MSPrefixMap_Ctr",
    5785             :         .tp_getset = py_drsuapi_MSPrefixMap_Ctr_getsetters,
    5786             :         .tp_methods = py_drsuapi_MSPrefixMap_Ctr_methods,
    5787             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5788             :         .tp_new = py_drsuapi_MSPrefixMap_Ctr_new,
    5789             : };
    5790             : 
    5791          48 : static PyObject *py_import_prefixMapCtr(TALLOC_CTX *mem_ctx, int level, union prefixMapCtr *in)
    5792             : {
    5793           0 :         PyObject *ret;
    5794             : 
    5795          48 :         switch (level) {
    5796          48 :                 case PREFIX_MAP_VERSION_DSDB:
    5797          48 :                         ret = pytalloc_reference_ex(drsuapi_DsReplicaOIDMapping_Ctr_Type, mem_ctx, &in->dsdb);
    5798          48 :                         return ret;
    5799             : 
    5800             :         }
    5801           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    5802           0 :         return NULL;
    5803             : }
    5804             : 
    5805           0 : static union prefixMapCtr *py_export_prefixMapCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    5806             : {
    5807           0 :         union prefixMapCtr *ret = talloc_zero(mem_ctx, union prefixMapCtr);
    5808           0 :         switch (level) {
    5809           0 :                 case PREFIX_MAP_VERSION_DSDB:
    5810           0 :                         if (in == NULL) {
    5811           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->dsdb");
    5812           0 :                                 talloc_free(ret); return NULL;
    5813             :                         }
    5814           0 :                         PY_CHECK_TYPE(drsuapi_DsReplicaOIDMapping_Ctr_Type, in, talloc_free(ret); return NULL;);
    5815           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5816           0 :                                 PyErr_NoMemory();
    5817           0 :                                 talloc_free(ret); return NULL;
    5818             :                         }
    5819           0 :                         ret->dsdb = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(in);
    5820           0 :                         break;
    5821             : 
    5822           0 :                 default:
    5823           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
    5824           0 :                         talloc_free(ret);
    5825           0 :                         ret = NULL;
    5826             :         }
    5827             : 
    5828           0 :         return ret;
    5829             : }
    5830             : 
    5831          48 : static PyObject *py_prefixMapCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5832             : {
    5833          48 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    5834          48 :         PyObject *mem_ctx_obj = NULL;
    5835          48 :         TALLOC_CTX *mem_ctx = NULL;
    5836          48 :         int level = 0;
    5837          48 :         PyObject *in_obj = NULL;
    5838          48 :         union prefixMapCtr *in = NULL;
    5839             : 
    5840          48 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    5841             :                 discard_const_p(char *, kwnames),
    5842             :                 &mem_ctx_obj,
    5843             :                 &level,
    5844             :                 &in_obj)) {
    5845           0 :                 return NULL;
    5846             :         }
    5847          48 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5848          48 :         if (mem_ctx == NULL) {
    5849           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    5850           0 :                 return NULL;
    5851             :         }
    5852          48 :         in = (union prefixMapCtr *)pytalloc_get_ptr(in_obj);
    5853          48 :         if (in == NULL) {
    5854           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union prefixMapCtr!");
    5855           0 :                 return NULL;
    5856             :         }
    5857             : 
    5858          48 :         return py_import_prefixMapCtr(mem_ctx, level, in);
    5859             : }
    5860             : 
    5861           0 : static PyObject *py_prefixMapCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5862             : {
    5863           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    5864           0 :         PyObject *mem_ctx_obj = NULL;
    5865           0 :         TALLOC_CTX *mem_ctx = NULL;
    5866           0 :         int level = 0;
    5867           0 :         PyObject *in = NULL;
    5868           0 :         union prefixMapCtr *out = NULL;
    5869             : 
    5870           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    5871             :                 discard_const_p(char *, kwnames),
    5872             :                 &mem_ctx_obj,
    5873             :                 &level,
    5874             :                 &in)) {
    5875           0 :                 return NULL;
    5876             :         }
    5877           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5878           0 :         if (mem_ctx == NULL) {
    5879           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    5880           0 :                 return NULL;
    5881             :         }
    5882             : 
    5883           0 :         out = py_export_prefixMapCtr(mem_ctx, level, in);
    5884           0 :         if (out == NULL) {
    5885           0 :                 return NULL;
    5886             :         }
    5887             : 
    5888           0 :         return pytalloc_GenericObject_reference(out);
    5889             : }
    5890             : 
    5891             : static PyMethodDef py_prefixMapCtr_methods[] = {
    5892             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_prefixMapCtr_import),
    5893             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    5894             :                 "T.__import__(mem_ctx, level, in) => ret." },
    5895             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_prefixMapCtr_export),
    5896             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    5897             :                 "T.__export__(mem_ctx, level, in) => ret." },
    5898             :         { NULL, NULL, 0, NULL }
    5899             : };
    5900             : 
    5901           0 : static PyObject *py_prefixMapCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5902             : {
    5903           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    5904           0 :         return NULL;
    5905             : }
    5906             : 
    5907             : 
    5908             : static PyTypeObject prefixMapCtr_Type = {
    5909             :         PyVarObject_HEAD_INIT(NULL, 0)
    5910             :         .tp_name = "drsblobs.prefixMapCtr",
    5911             :         .tp_getset = NULL,
    5912             :         .tp_methods = py_prefixMapCtr_methods,
    5913             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5914             :         .tp_new = py_prefixMapCtr_new,
    5915             : };
    5916             : 
    5917             : 
    5918           0 : static PyObject *py_prefixMapBlob_get_version(PyObject *obj, void *closure)
    5919             : {
    5920           0 :         struct prefixMapBlob *object = pytalloc_get_ptr(obj);
    5921           0 :         PyObject *py_version;
    5922           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
    5923           0 :         return py_version;
    5924             : }
    5925             : 
    5926           0 : static int py_prefixMapBlob_set_version(PyObject *py_obj, PyObject *value, void *closure)
    5927             : {
    5928           0 :         struct prefixMapBlob *object = pytalloc_get_ptr(py_obj);
    5929           0 :         if (value == NULL) {
    5930           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    5931           0 :                 return -1;
    5932             :         }
    5933             :         {
    5934           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    5935           0 :                 if (PyLong_Check(value)) {
    5936           0 :                         unsigned long long test_var;
    5937           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5938           0 :                         if (PyErr_Occurred() != NULL) {
    5939           0 :                                 return -1;
    5940             :                         }
    5941           0 :                         if (test_var > uint_max) {
    5942           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5943             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5944           0 :                                 return -1;
    5945             :                         }
    5946           0 :                         object->version = test_var;
    5947             :                 } else {
    5948           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5949             :                           PyLong_Type.tp_name);
    5950           0 :                         return -1;
    5951             :                 }
    5952             :         }
    5953           0 :         return 0;
    5954             : }
    5955             : 
    5956           0 : static PyObject *py_prefixMapBlob_get_reserved(PyObject *obj, void *closure)
    5957             : {
    5958           0 :         struct prefixMapBlob *object = pytalloc_get_ptr(obj);
    5959           0 :         PyObject *py_reserved;
    5960           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
    5961           0 :         return py_reserved;
    5962             : }
    5963             : 
    5964           0 : static int py_prefixMapBlob_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
    5965             : {
    5966           0 :         struct prefixMapBlob *object = pytalloc_get_ptr(py_obj);
    5967           0 :         if (value == NULL) {
    5968           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
    5969           0 :                 return -1;
    5970             :         }
    5971             :         {
    5972           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
    5973           0 :                 if (PyLong_Check(value)) {
    5974           0 :                         unsigned long long test_var;
    5975           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5976           0 :                         if (PyErr_Occurred() != NULL) {
    5977           0 :                                 return -1;
    5978             :                         }
    5979           0 :                         if (test_var > uint_max) {
    5980           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5981             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5982           0 :                                 return -1;
    5983             :                         }
    5984           0 :                         object->reserved = test_var;
    5985             :                 } else {
    5986           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5987             :                           PyLong_Type.tp_name);
    5988           0 :                         return -1;
    5989             :                 }
    5990             :         }
    5991           0 :         return 0;
    5992             : }
    5993             : 
    5994          48 : static PyObject *py_prefixMapBlob_get_ctr(PyObject *obj, void *closure)
    5995             : {
    5996          48 :         struct prefixMapBlob *object = pytalloc_get_ptr(obj);
    5997           0 :         PyObject *py_ctr;
    5998          48 :         py_ctr = pyrpc_import_union(&prefixMapCtr_Type, pytalloc_get_mem_ctx(obj), object->version, &object->ctr, "union prefixMapCtr");
    5999          48 :         if (py_ctr == NULL) {
    6000           0 :                 return NULL;
    6001             :         }
    6002          48 :         return py_ctr;
    6003             : }
    6004             : 
    6005           0 : static int py_prefixMapBlob_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    6006             : {
    6007           0 :         struct prefixMapBlob *object = pytalloc_get_ptr(py_obj);
    6008           0 :         if (value == NULL) {
    6009           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
    6010           0 :                 return -1;
    6011             :         }
    6012             :         {
    6013           0 :                 union prefixMapCtr *ctr_switch_0;
    6014           0 :                 ctr_switch_0 = (union prefixMapCtr *)pyrpc_export_union(&prefixMapCtr_Type, pytalloc_get_mem_ctx(py_obj), object->version, value, "union prefixMapCtr");
    6015           0 :                 if (ctr_switch_0 == NULL) {
    6016           0 :                         return -1;
    6017             :                 }
    6018           0 :                 object->ctr = *ctr_switch_0;
    6019             :         }
    6020           0 :         return 0;
    6021             : }
    6022             : 
    6023             : static PyGetSetDef py_prefixMapBlob_getsetters[] = {
    6024             :         {
    6025             :                 .name = discard_const_p(char, "version"),
    6026             :                 .get = py_prefixMapBlob_get_version,
    6027             :                 .set = py_prefixMapBlob_set_version,
    6028             :                 .doc = discard_const_p(char, "PIDL-generated element of base type prefixMapVersion")
    6029             :         },
    6030             :         {
    6031             :                 .name = discard_const_p(char, "reserved"),
    6032             :                 .get = py_prefixMapBlob_get_reserved,
    6033             :                 .set = py_prefixMapBlob_set_reserved,
    6034             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6035             :         },
    6036             :         {
    6037             :                 .name = discard_const_p(char, "ctr"),
    6038             :                 .get = py_prefixMapBlob_get_ctr,
    6039             :                 .set = py_prefixMapBlob_set_ctr,
    6040             :                 .doc = discard_const_p(char, "PIDL-generated element of base type prefixMapCtr")
    6041             :         },
    6042             :         { .name = NULL }
    6043             : };
    6044             : 
    6045          12 : static PyObject *py_prefixMapBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6046             : {
    6047          12 :         return pytalloc_new(struct prefixMapBlob, type);
    6048             : }
    6049             : 
    6050           0 : static PyObject *py_prefixMapBlob_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6051             : {
    6052           0 :         struct prefixMapBlob *object = pytalloc_get_ptr(py_obj);
    6053           0 :         PyObject *ret = NULL;
    6054           0 :         DATA_BLOB blob;
    6055           0 :         enum ndr_err_code err;
    6056           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6057           0 :         if (tmp_ctx == NULL) {
    6058           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6059           0 :                 return NULL;
    6060             :         }
    6061           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_prefixMapBlob);
    6062           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6063           0 :                 TALLOC_FREE(tmp_ctx);
    6064           0 :                 PyErr_SetNdrError(err);
    6065           0 :                 return NULL;
    6066             :         }
    6067             : 
    6068           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6069           0 :         TALLOC_FREE(tmp_ctx);
    6070           0 :         return ret;
    6071             : }
    6072             : 
    6073          12 : static PyObject *py_prefixMapBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6074             : {
    6075          12 :         struct prefixMapBlob *object = pytalloc_get_ptr(py_obj);
    6076          12 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6077          12 :         Py_ssize_t blob_length = 0;
    6078           0 :         enum ndr_err_code err;
    6079          12 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6080          12 :         PyObject *allow_remaining_obj = NULL;
    6081          12 :         bool allow_remaining = false;
    6082             : 
    6083          12 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6084             :                 discard_const_p(char *, kwnames),
    6085             :                 &blob.data, &blob_length,
    6086             :                 &allow_remaining_obj)) {
    6087           0 :                 return NULL;
    6088             :         }
    6089          12 :         blob.length = blob_length;
    6090             : 
    6091          12 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6092           0 :                 allow_remaining = true;
    6093             :         }
    6094             : 
    6095          12 :         if (allow_remaining) {
    6096           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_prefixMapBlob);
    6097             :         } else {
    6098          12 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_prefixMapBlob);
    6099             :         }
    6100          12 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6101           0 :                 PyErr_SetNdrError(err);
    6102           0 :                 return NULL;
    6103             :         }
    6104             : 
    6105          12 :         Py_RETURN_NONE;
    6106             : }
    6107             : 
    6108           0 : static PyObject *py_prefixMapBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6109             : {
    6110           0 :         struct prefixMapBlob *object = pytalloc_get_ptr(py_obj);
    6111           0 :         PyObject *ret;
    6112           0 :         char *retstr;
    6113             : 
    6114           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_prefixMapBlob, "prefixMapBlob", object);
    6115           0 :         ret = PyUnicode_FromString(retstr);
    6116           0 :         talloc_free(retstr);
    6117             : 
    6118           0 :         return ret;
    6119             : }
    6120             : 
    6121             : static PyMethodDef py_prefixMapBlob_methods[] = {
    6122             :         { "__ndr_pack__", (PyCFunction)py_prefixMapBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6123             :         { "__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" },
    6124             :         { "__ndr_print__", (PyCFunction)py_prefixMapBlob_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6125             :         { NULL, NULL, 0, NULL }
    6126             : };
    6127             : 
    6128             : 
    6129             : static PyTypeObject prefixMapBlob_Type = {
    6130             :         PyVarObject_HEAD_INIT(NULL, 0)
    6131             :         .tp_name = "drsblobs.prefixMapBlob",
    6132             :         .tp_getset = py_prefixMapBlob_getsetters,
    6133             :         .tp_methods = py_prefixMapBlob_methods,
    6134             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6135             :         .tp_new = py_prefixMapBlob_new,
    6136             : };
    6137             : 
    6138           0 : static PyObject *py_import_ldapControlDirSyncExtra(TALLOC_CTX *mem_ctx, int level, union ldapControlDirSyncExtra *in)
    6139             : {
    6140           0 :         PyObject *ret;
    6141             : 
    6142           0 :         switch (level) {
    6143           0 :                 case 0:
    6144           0 :                         ret = Py_None;
    6145           0 :                         Py_INCREF(ret);
    6146           0 :                         return ret;
    6147             : 
    6148           0 :                 default:
    6149           0 :                         ret = pytalloc_reference_ex(&replUpToDateVectorBlob_Type, mem_ctx, &in->uptodateness_vector);
    6150           0 :                         return ret;
    6151             : 
    6152             :         }
    6153             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    6154             :         return NULL;
    6155             : }
    6156             : 
    6157           0 : static union ldapControlDirSyncExtra *py_export_ldapControlDirSyncExtra(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    6158             : {
    6159           0 :         union ldapControlDirSyncExtra *ret = talloc_zero(mem_ctx, union ldapControlDirSyncExtra);
    6160           0 :         switch (level) {
    6161           0 :                 case 0:
    6162           0 :                         break;
    6163             : 
    6164           0 :                 default:
    6165           0 :                         if (in == NULL) {
    6166           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->uptodateness_vector");
    6167           0 :                                 talloc_free(ret); return NULL;
    6168             :                         }
    6169           0 :                         PY_CHECK_TYPE(&replUpToDateVectorBlob_Type, in, talloc_free(ret); return NULL;);
    6170           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    6171           0 :                                 PyErr_NoMemory();
    6172           0 :                                 talloc_free(ret); return NULL;
    6173             :                         }
    6174           0 :                         ret->uptodateness_vector = *(struct replUpToDateVectorBlob *)pytalloc_get_ptr(in);
    6175           0 :                         break;
    6176             : 
    6177             :         }
    6178             : 
    6179           0 :         return ret;
    6180             : }
    6181             : 
    6182           0 : static PyObject *py_ldapControlDirSyncExtra_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6183             : {
    6184           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    6185           0 :         PyObject *mem_ctx_obj = NULL;
    6186           0 :         TALLOC_CTX *mem_ctx = NULL;
    6187           0 :         int level = 0;
    6188           0 :         PyObject *in_obj = NULL;
    6189           0 :         union ldapControlDirSyncExtra *in = NULL;
    6190             : 
    6191           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    6192             :                 discard_const_p(char *, kwnames),
    6193             :                 &mem_ctx_obj,
    6194             :                 &level,
    6195             :                 &in_obj)) {
    6196           0 :                 return NULL;
    6197             :         }
    6198           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    6199           0 :         if (mem_ctx == NULL) {
    6200           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    6201           0 :                 return NULL;
    6202             :         }
    6203           0 :         in = (union ldapControlDirSyncExtra *)pytalloc_get_ptr(in_obj);
    6204           0 :         if (in == NULL) {
    6205           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union ldapControlDirSyncExtra!");
    6206           0 :                 return NULL;
    6207             :         }
    6208             : 
    6209           0 :         return py_import_ldapControlDirSyncExtra(mem_ctx, level, in);
    6210             : }
    6211             : 
    6212           0 : static PyObject *py_ldapControlDirSyncExtra_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6213             : {
    6214           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    6215           0 :         PyObject *mem_ctx_obj = NULL;
    6216           0 :         TALLOC_CTX *mem_ctx = NULL;
    6217           0 :         int level = 0;
    6218           0 :         PyObject *in = NULL;
    6219           0 :         union ldapControlDirSyncExtra *out = NULL;
    6220             : 
    6221           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    6222             :                 discard_const_p(char *, kwnames),
    6223             :                 &mem_ctx_obj,
    6224             :                 &level,
    6225             :                 &in)) {
    6226           0 :                 return NULL;
    6227             :         }
    6228           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    6229           0 :         if (mem_ctx == NULL) {
    6230           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    6231           0 :                 return NULL;
    6232             :         }
    6233             : 
    6234           0 :         out = py_export_ldapControlDirSyncExtra(mem_ctx, level, in);
    6235           0 :         if (out == NULL) {
    6236           0 :                 return NULL;
    6237             :         }
    6238             : 
    6239           0 :         return pytalloc_GenericObject_reference(out);
    6240             : }
    6241             : 
    6242             : static PyMethodDef py_ldapControlDirSyncExtra_methods[] = {
    6243             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ldapControlDirSyncExtra_import),
    6244             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    6245             :                 "T.__import__(mem_ctx, level, in) => ret." },
    6246             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ldapControlDirSyncExtra_export),
    6247             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    6248             :                 "T.__export__(mem_ctx, level, in) => ret." },
    6249             :         { NULL, NULL, 0, NULL }
    6250             : };
    6251             : 
    6252           0 : static PyObject *py_ldapControlDirSyncExtra_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6253             : {
    6254           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    6255           0 :         return NULL;
    6256             : }
    6257             : 
    6258             : 
    6259             : static PyTypeObject ldapControlDirSyncExtra_Type = {
    6260             :         PyVarObject_HEAD_INIT(NULL, 0)
    6261             :         .tp_name = "drsblobs.ldapControlDirSyncExtra",
    6262             :         .tp_getset = NULL,
    6263             :         .tp_methods = py_ldapControlDirSyncExtra_methods,
    6264             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6265             :         .tp_new = py_ldapControlDirSyncExtra_new,
    6266             : };
    6267             : 
    6268             : 
    6269           0 : static PyObject *py_ldapControlDirSyncBlob_get_u1(PyObject *obj, void *closure)
    6270             : {
    6271           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(obj);
    6272           0 :         PyObject *py_u1;
    6273           0 :         py_u1 = PyLong_FromUnsignedLongLong((uint32_t)(object->u1));
    6274           0 :         return py_u1;
    6275             : }
    6276             : 
    6277           0 : static int py_ldapControlDirSyncBlob_set_u1(PyObject *py_obj, PyObject *value, void *closure)
    6278             : {
    6279           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(py_obj);
    6280           0 :         if (value == NULL) {
    6281           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u1");
    6282           0 :                 return -1;
    6283             :         }
    6284             :         {
    6285           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u1));
    6286           0 :                 if (PyLong_Check(value)) {
    6287           0 :                         unsigned long long test_var;
    6288           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6289           0 :                         if (PyErr_Occurred() != NULL) {
    6290           0 :                                 return -1;
    6291             :                         }
    6292           0 :                         if (test_var > uint_max) {
    6293           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6294             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6295           0 :                                 return -1;
    6296             :                         }
    6297           0 :                         object->u1 = test_var;
    6298             :                 } else {
    6299           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6300             :                           PyLong_Type.tp_name);
    6301           0 :                         return -1;
    6302             :                 }
    6303             :         }
    6304           0 :         return 0;
    6305             : }
    6306             : 
    6307           0 : static PyObject *py_ldapControlDirSyncBlob_get_time(PyObject *obj, void *closure)
    6308             : {
    6309           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(obj);
    6310           0 :         PyObject *py_time;
    6311           0 :         py_time = PyLong_FromUnsignedLongLong(object->time);
    6312           0 :         return py_time;
    6313             : }
    6314             : 
    6315           0 : static int py_ldapControlDirSyncBlob_set_time(PyObject *py_obj, PyObject *value, void *closure)
    6316             : {
    6317           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(py_obj);
    6318           0 :         if (value == NULL) {
    6319           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
    6320           0 :                 return -1;
    6321             :         }
    6322             :         {
    6323           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
    6324           0 :                 if (PyLong_Check(value)) {
    6325           0 :                         unsigned long long test_var;
    6326           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6327           0 :                         if (PyErr_Occurred() != NULL) {
    6328           0 :                                 return -1;
    6329             :                         }
    6330           0 :                         if (test_var > uint_max) {
    6331           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6332             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6333           0 :                                 return -1;
    6334             :                         }
    6335           0 :                         object->time = test_var;
    6336             :                 } else {
    6337           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6338             :                           PyLong_Type.tp_name);
    6339           0 :                         return -1;
    6340             :                 }
    6341             :         }
    6342           0 :         return 0;
    6343             : }
    6344             : 
    6345           0 : static PyObject *py_ldapControlDirSyncBlob_get_u2(PyObject *obj, void *closure)
    6346             : {
    6347           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(obj);
    6348           0 :         PyObject *py_u2;
    6349           0 :         py_u2 = PyLong_FromUnsignedLongLong((uint32_t)(object->u2));
    6350           0 :         return py_u2;
    6351             : }
    6352             : 
    6353           0 : static int py_ldapControlDirSyncBlob_set_u2(PyObject *py_obj, PyObject *value, void *closure)
    6354             : {
    6355           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(py_obj);
    6356           0 :         if (value == NULL) {
    6357           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u2");
    6358           0 :                 return -1;
    6359             :         }
    6360             :         {
    6361           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u2));
    6362           0 :                 if (PyLong_Check(value)) {
    6363           0 :                         unsigned long long test_var;
    6364           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6365           0 :                         if (PyErr_Occurred() != NULL) {
    6366           0 :                                 return -1;
    6367             :                         }
    6368           0 :                         if (test_var > uint_max) {
    6369           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6370             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6371           0 :                                 return -1;
    6372             :                         }
    6373           0 :                         object->u2 = test_var;
    6374             :                 } else {
    6375           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6376             :                           PyLong_Type.tp_name);
    6377           0 :                         return -1;
    6378             :                 }
    6379             :         }
    6380           0 :         return 0;
    6381             : }
    6382             : 
    6383           0 : static PyObject *py_ldapControlDirSyncBlob_get_u3(PyObject *obj, void *closure)
    6384             : {
    6385           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(obj);
    6386           0 :         PyObject *py_u3;
    6387           0 :         py_u3 = PyLong_FromUnsignedLongLong((uint32_t)(object->u3));
    6388           0 :         return py_u3;
    6389             : }
    6390             : 
    6391           0 : static int py_ldapControlDirSyncBlob_set_u3(PyObject *py_obj, PyObject *value, void *closure)
    6392             : {
    6393           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(py_obj);
    6394           0 :         if (value == NULL) {
    6395           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u3");
    6396           0 :                 return -1;
    6397             :         }
    6398             :         {
    6399           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u3));
    6400           0 :                 if (PyLong_Check(value)) {
    6401           0 :                         unsigned long long test_var;
    6402           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6403           0 :                         if (PyErr_Occurred() != NULL) {
    6404           0 :                                 return -1;
    6405             :                         }
    6406           0 :                         if (test_var > uint_max) {
    6407           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6408             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6409           0 :                                 return -1;
    6410             :                         }
    6411           0 :                         object->u3 = test_var;
    6412             :                 } else {
    6413           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6414             :                           PyLong_Type.tp_name);
    6415           0 :                         return -1;
    6416             :                 }
    6417             :         }
    6418           0 :         return 0;
    6419             : }
    6420             : 
    6421           0 : static PyObject *py_ldapControlDirSyncBlob_get_extra_length(PyObject *obj, void *closure)
    6422             : {
    6423           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(obj);
    6424           0 :         PyObject *py_extra_length;
    6425           0 :         py_extra_length = PyLong_FromUnsignedLongLong((uint32_t)(object->extra_length));
    6426           0 :         return py_extra_length;
    6427             : }
    6428             : 
    6429           0 : static int py_ldapControlDirSyncBlob_set_extra_length(PyObject *py_obj, PyObject *value, void *closure)
    6430             : {
    6431           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(py_obj);
    6432           0 :         if (value == NULL) {
    6433           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extra_length");
    6434           0 :                 return -1;
    6435             :         }
    6436             :         {
    6437           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extra_length));
    6438           0 :                 if (PyLong_Check(value)) {
    6439           0 :                         unsigned long long test_var;
    6440           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6441           0 :                         if (PyErr_Occurred() != NULL) {
    6442           0 :                                 return -1;
    6443             :                         }
    6444           0 :                         if (test_var > uint_max) {
    6445           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6446             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6447           0 :                                 return -1;
    6448             :                         }
    6449           0 :                         object->extra_length = test_var;
    6450             :                 } else {
    6451           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6452             :                           PyLong_Type.tp_name);
    6453           0 :                         return -1;
    6454             :                 }
    6455             :         }
    6456           0 :         return 0;
    6457             : }
    6458             : 
    6459           0 : static PyObject *py_ldapControlDirSyncBlob_get_highwatermark(PyObject *obj, void *closure)
    6460             : {
    6461           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(obj);
    6462           0 :         PyObject *py_highwatermark;
    6463           0 :         py_highwatermark = pytalloc_reference_ex(drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->highwatermark);
    6464           0 :         return py_highwatermark;
    6465             : }
    6466             : 
    6467           0 : static int py_ldapControlDirSyncBlob_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
    6468             : {
    6469           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(py_obj);
    6470           0 :         if (value == NULL) {
    6471           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highwatermark");
    6472           0 :                 return -1;
    6473             :         }
    6474           0 :         PY_CHECK_TYPE(drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
    6475           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6476           0 :                 PyErr_NoMemory();
    6477           0 :                 return -1;
    6478             :         }
    6479           0 :         object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
    6480           0 :         return 0;
    6481             : }
    6482             : 
    6483           0 : static PyObject *py_ldapControlDirSyncBlob_get_guid1(PyObject *obj, void *closure)
    6484             : {
    6485           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(obj);
    6486           0 :         PyObject *py_guid1;
    6487           0 :         py_guid1 = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid1);
    6488           0 :         return py_guid1;
    6489             : }
    6490             : 
    6491           1 : static int py_ldapControlDirSyncBlob_set_guid1(PyObject *py_obj, PyObject *value, void *closure)
    6492             : {
    6493           1 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(py_obj);
    6494           1 :         if (value == NULL) {
    6495           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid1");
    6496           0 :                 return -1;
    6497             :         }
    6498           1 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    6499           1 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6500           0 :                 PyErr_NoMemory();
    6501           0 :                 return -1;
    6502             :         }
    6503           1 :         object->guid1 = *(struct GUID *)pytalloc_get_ptr(value);
    6504           1 :         return 0;
    6505             : }
    6506             : 
    6507           0 : static PyObject *py_ldapControlDirSyncBlob_get_extra(PyObject *obj, void *closure)
    6508             : {
    6509           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(obj);
    6510           0 :         PyObject *py_extra;
    6511           0 :         py_extra = pyrpc_import_union(&ldapControlDirSyncExtra_Type, pytalloc_get_mem_ctx(obj), object->extra_length, &object->extra, "union ldapControlDirSyncExtra");
    6512           0 :         if (py_extra == NULL) {
    6513           0 :                 return NULL;
    6514             :         }
    6515           0 :         return py_extra;
    6516             : }
    6517             : 
    6518           0 : static int py_ldapControlDirSyncBlob_set_extra(PyObject *py_obj, PyObject *value, void *closure)
    6519             : {
    6520           0 :         struct ldapControlDirSyncBlob *object = pytalloc_get_ptr(py_obj);
    6521           0 :         if (value == NULL) {
    6522           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extra");
    6523           0 :                 return -1;
    6524             :         }
    6525             :         {
    6526           0 :                 union ldapControlDirSyncExtra *extra_switch_0;
    6527           0 :                 extra_switch_0 = (union ldapControlDirSyncExtra *)pyrpc_export_union(&ldapControlDirSyncExtra_Type, pytalloc_get_mem_ctx(py_obj), object->extra_length, value, "union ldapControlDirSyncExtra");
    6528           0 :                 if (extra_switch_0 == NULL) {
    6529           0 :                         return -1;
    6530             :                 }
    6531           0 :                 object->extra = *extra_switch_0;
    6532             :         }
    6533           0 :         return 0;
    6534             : }
    6535             : 
    6536             : static PyGetSetDef py_ldapControlDirSyncBlob_getsetters[] = {
    6537             :         {
    6538             :                 .name = discard_const_p(char, "u1"),
    6539             :                 .get = py_ldapControlDirSyncBlob_get_u1,
    6540             :                 .set = py_ldapControlDirSyncBlob_set_u1,
    6541             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6542             :         },
    6543             :         {
    6544             :                 .name = discard_const_p(char, "time"),
    6545             :                 .get = py_ldapControlDirSyncBlob_get_time,
    6546             :                 .set = py_ldapControlDirSyncBlob_set_time,
    6547             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    6548             :         },
    6549             :         {
    6550             :                 .name = discard_const_p(char, "u2"),
    6551             :                 .get = py_ldapControlDirSyncBlob_get_u2,
    6552             :                 .set = py_ldapControlDirSyncBlob_set_u2,
    6553             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6554             :         },
    6555             :         {
    6556             :                 .name = discard_const_p(char, "u3"),
    6557             :                 .get = py_ldapControlDirSyncBlob_get_u3,
    6558             :                 .set = py_ldapControlDirSyncBlob_set_u3,
    6559             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6560             :         },
    6561             :         {
    6562             :                 .name = discard_const_p(char, "extra_length"),
    6563             :                 .get = py_ldapControlDirSyncBlob_get_extra_length,
    6564             :                 .set = py_ldapControlDirSyncBlob_set_extra_length,
    6565             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6566             :         },
    6567             :         {
    6568             :                 .name = discard_const_p(char, "highwatermark"),
    6569             :                 .get = py_ldapControlDirSyncBlob_get_highwatermark,
    6570             :                 .set = py_ldapControlDirSyncBlob_set_highwatermark,
    6571             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
    6572             :         },
    6573             :         {
    6574             :                 .name = discard_const_p(char, "guid1"),
    6575             :                 .get = py_ldapControlDirSyncBlob_get_guid1,
    6576             :                 .set = py_ldapControlDirSyncBlob_set_guid1,
    6577             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    6578             :         },
    6579             :         {
    6580             :                 .name = discard_const_p(char, "extra"),
    6581             :                 .get = py_ldapControlDirSyncBlob_get_extra,
    6582             :                 .set = py_ldapControlDirSyncBlob_set_extra,
    6583             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ldapControlDirSyncExtra")
    6584             :         },
    6585             :         { .name = NULL }
    6586             : };
    6587             : 
    6588           0 : static PyObject *py_ldapControlDirSyncBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6589             : {
    6590           0 :         return pytalloc_new(struct ldapControlDirSyncBlob, type);
    6591             : }
    6592             : 
    6593             : 
    6594             : static PyTypeObject ldapControlDirSyncBlob_Type = {
    6595             :         PyVarObject_HEAD_INIT(NULL, 0)
    6596             :         .tp_name = "drsblobs.ldapControlDirSyncBlob",
    6597             :         .tp_getset = py_ldapControlDirSyncBlob_getsetters,
    6598             :         .tp_methods = NULL,
    6599             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6600             :         .tp_new = py_ldapControlDirSyncBlob_new,
    6601             : };
    6602             : 
    6603             : 
    6604           0 : static PyObject *py_ldapControlDirSyncCookie_get_msds(PyObject *obj, void *closure)
    6605             : {
    6606           0 :         struct ldapControlDirSyncCookie *object = pytalloc_get_ptr(obj);
    6607           0 :         PyObject *py_msds;
    6608           0 :         if (object->msds == NULL) {
    6609           0 :                 py_msds = Py_None;
    6610           0 :                 Py_INCREF(py_msds);
    6611             :         } else {
    6612           0 :                 py_msds = PyUnicode_Decode(object->msds, strlen(object->msds), "utf-8", "ignore");
    6613             :         }
    6614           0 :         return py_msds;
    6615             : }
    6616             : 
    6617           0 : static int py_ldapControlDirSyncCookie_set_msds(PyObject *py_obj, PyObject *value, void *closure)
    6618             : {
    6619           0 :         struct ldapControlDirSyncCookie *object = pytalloc_get_ptr(py_obj);
    6620           0 :         if (value == NULL) {
    6621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->msds");
    6622           0 :                 return -1;
    6623             :         }
    6624             :         {
    6625           0 :                 const char *test_str;
    6626           0 :                 const char *talloc_str;
    6627           0 :                 PyObject *unicode = NULL;
    6628           0 :                 if (PyUnicode_Check(value)) {
    6629           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6630           0 :                         if (unicode == NULL) {
    6631           0 :                                 return -1;
    6632             :                         }
    6633           0 :                         test_str = PyBytes_AS_STRING(unicode);
    6634           0 :                 } else if (PyBytes_Check(value)) {
    6635           0 :                         test_str = PyBytes_AS_STRING(value);
    6636             :                 } else {
    6637           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6638           0 :                         return -1;
    6639             :                 }
    6640           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6641           0 :                 if (unicode != NULL) {
    6642           0 :                         Py_DECREF(unicode);
    6643             :                 }
    6644           0 :                 if (talloc_str == NULL) {
    6645           0 :                         PyErr_NoMemory();
    6646           0 :                         return -1;
    6647             :                 }
    6648           0 :                 object->msds = talloc_str;
    6649             :         }
    6650           0 :         return 0;
    6651             : }
    6652             : 
    6653           1 : static PyObject *py_ldapControlDirSyncCookie_get_blob(PyObject *obj, void *closure)
    6654             : {
    6655           1 :         struct ldapControlDirSyncCookie *object = pytalloc_get_ptr(obj);
    6656           0 :         PyObject *py_blob;
    6657           1 :         py_blob = pytalloc_reference_ex(&ldapControlDirSyncBlob_Type, pytalloc_get_mem_ctx(obj), &object->blob);
    6658           1 :         return py_blob;
    6659             : }
    6660             : 
    6661           0 : static int py_ldapControlDirSyncCookie_set_blob(PyObject *py_obj, PyObject *value, void *closure)
    6662             : {
    6663           0 :         struct ldapControlDirSyncCookie *object = pytalloc_get_ptr(py_obj);
    6664           0 :         if (value == NULL) {
    6665           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->blob");
    6666           0 :                 return -1;
    6667             :         }
    6668           0 :         PY_CHECK_TYPE(&ldapControlDirSyncBlob_Type, value, return -1;);
    6669           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6670           0 :                 PyErr_NoMemory();
    6671           0 :                 return -1;
    6672             :         }
    6673           0 :         object->blob = *(struct ldapControlDirSyncBlob *)pytalloc_get_ptr(value);
    6674           0 :         return 0;
    6675             : }
    6676             : 
    6677             : static PyGetSetDef py_ldapControlDirSyncCookie_getsetters[] = {
    6678             :         {
    6679             :                 .name = discard_const_p(char, "msds"),
    6680             :                 .get = py_ldapControlDirSyncCookie_get_msds,
    6681             :                 .set = py_ldapControlDirSyncCookie_set_msds,
    6682             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    6683             :         },
    6684             :         {
    6685             :                 .name = discard_const_p(char, "blob"),
    6686             :                 .get = py_ldapControlDirSyncCookie_get_blob,
    6687             :                 .set = py_ldapControlDirSyncCookie_set_blob,
    6688             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ldapControlDirSyncBlob")
    6689             :         },
    6690             :         { .name = NULL }
    6691             : };
    6692             : 
    6693           1 : static PyObject *py_ldapControlDirSyncCookie_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6694             : {
    6695           1 :         return pytalloc_new(struct ldapControlDirSyncCookie, type);
    6696             : }
    6697             : 
    6698           1 : static PyObject *py_ldapControlDirSyncCookie_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6699             : {
    6700           1 :         struct ldapControlDirSyncCookie *object = pytalloc_get_ptr(py_obj);
    6701           1 :         PyObject *ret = NULL;
    6702           0 :         DATA_BLOB blob;
    6703           0 :         enum ndr_err_code err;
    6704           1 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6705           1 :         if (tmp_ctx == NULL) {
    6706           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6707           0 :                 return NULL;
    6708             :         }
    6709           1 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_ldapControlDirSyncCookie);
    6710           1 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6711           0 :                 TALLOC_FREE(tmp_ctx);
    6712           0 :                 PyErr_SetNdrError(err);
    6713           0 :                 return NULL;
    6714             :         }
    6715             : 
    6716           1 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6717           1 :         TALLOC_FREE(tmp_ctx);
    6718           1 :         return ret;
    6719             : }
    6720             : 
    6721           1 : static PyObject *py_ldapControlDirSyncCookie_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6722             : {
    6723           1 :         struct ldapControlDirSyncCookie *object = pytalloc_get_ptr(py_obj);
    6724           1 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6725           1 :         Py_ssize_t blob_length = 0;
    6726           0 :         enum ndr_err_code err;
    6727           1 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6728           1 :         PyObject *allow_remaining_obj = NULL;
    6729           1 :         bool allow_remaining = false;
    6730             : 
    6731           1 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6732             :                 discard_const_p(char *, kwnames),
    6733             :                 &blob.data, &blob_length,
    6734             :                 &allow_remaining_obj)) {
    6735           0 :                 return NULL;
    6736             :         }
    6737           1 :         blob.length = blob_length;
    6738             : 
    6739           1 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6740           0 :                 allow_remaining = true;
    6741             :         }
    6742             : 
    6743           1 :         if (allow_remaining) {
    6744           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ldapControlDirSyncCookie);
    6745             :         } else {
    6746           1 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ldapControlDirSyncCookie);
    6747             :         }
    6748           1 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6749           0 :                 PyErr_SetNdrError(err);
    6750           0 :                 return NULL;
    6751             :         }
    6752             : 
    6753           1 :         Py_RETURN_NONE;
    6754             : }
    6755             : 
    6756           0 : static PyObject *py_ldapControlDirSyncCookie_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6757             : {
    6758           0 :         struct ldapControlDirSyncCookie *object = pytalloc_get_ptr(py_obj);
    6759           0 :         PyObject *ret;
    6760           0 :         char *retstr;
    6761             : 
    6762           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_ldapControlDirSyncCookie, "ldapControlDirSyncCookie", object);
    6763           0 :         ret = PyUnicode_FromString(retstr);
    6764           0 :         talloc_free(retstr);
    6765             : 
    6766           0 :         return ret;
    6767             : }
    6768             : 
    6769             : static PyMethodDef py_ldapControlDirSyncCookie_methods[] = {
    6770             :         { "__ndr_pack__", (PyCFunction)py_ldapControlDirSyncCookie_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6771             :         { "__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" },
    6772             :         { "__ndr_print__", (PyCFunction)py_ldapControlDirSyncCookie_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6773             :         { NULL, NULL, 0, NULL }
    6774             : };
    6775             : 
    6776             : 
    6777             : static PyTypeObject ldapControlDirSyncCookie_Type = {
    6778             :         PyVarObject_HEAD_INIT(NULL, 0)
    6779             :         .tp_name = "drsblobs.ldapControlDirSyncCookie",
    6780             :         .tp_getset = py_ldapControlDirSyncCookie_getsetters,
    6781             :         .tp_methods = py_ldapControlDirSyncCookie_methods,
    6782             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6783             :         .tp_new = py_ldapControlDirSyncCookie_new,
    6784             : };
    6785             : 
    6786             : 
    6787           0 : static PyObject *py_supplementalCredentialsPackage_get_name_len(PyObject *obj, void *closure)
    6788             : {
    6789           0 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(obj);
    6790           0 :         PyObject *py_name_len;
    6791           0 :         py_name_len = PyLong_FromLong((uint16_t)(object->name_len));
    6792           0 :         return py_name_len;
    6793             : }
    6794             : 
    6795           0 : static int py_supplementalCredentialsPackage_set_name_len(PyObject *py_obj, PyObject *value, void *closure)
    6796             : {
    6797           0 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(py_obj);
    6798           0 :         if (value == NULL) {
    6799           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name_len");
    6800           0 :                 return -1;
    6801             :         }
    6802             :         {
    6803           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->name_len));
    6804           0 :                 if (PyLong_Check(value)) {
    6805           0 :                         unsigned long long test_var;
    6806           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6807           0 :                         if (PyErr_Occurred() != NULL) {
    6808           0 :                                 return -1;
    6809             :                         }
    6810           0 :                         if (test_var > uint_max) {
    6811           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6812             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6813           0 :                                 return -1;
    6814             :                         }
    6815           0 :                         object->name_len = test_var;
    6816             :                 } else {
    6817           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6818             :                           PyLong_Type.tp_name);
    6819           0 :                         return -1;
    6820             :                 }
    6821             :         }
    6822           0 :         return 0;
    6823             : }
    6824             : 
    6825           0 : static PyObject *py_supplementalCredentialsPackage_get_data_len(PyObject *obj, void *closure)
    6826             : {
    6827           0 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(obj);
    6828           0 :         PyObject *py_data_len;
    6829           0 :         py_data_len = PyLong_FromLong((uint16_t)(object->data_len));
    6830           0 :         return py_data_len;
    6831             : }
    6832             : 
    6833           0 : static int py_supplementalCredentialsPackage_set_data_len(PyObject *py_obj, PyObject *value, void *closure)
    6834             : {
    6835           0 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(py_obj);
    6836           0 :         if (value == NULL) {
    6837           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data_len");
    6838           0 :                 return -1;
    6839             :         }
    6840             :         {
    6841           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data_len));
    6842           0 :                 if (PyLong_Check(value)) {
    6843           0 :                         unsigned long long test_var;
    6844           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6845           0 :                         if (PyErr_Occurred() != NULL) {
    6846           0 :                                 return -1;
    6847             :                         }
    6848           0 :                         if (test_var > uint_max) {
    6849           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6850             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6851           0 :                                 return -1;
    6852             :                         }
    6853           0 :                         object->data_len = test_var;
    6854             :                 } else {
    6855           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6856             :                           PyLong_Type.tp_name);
    6857           0 :                         return -1;
    6858             :                 }
    6859             :         }
    6860           0 :         return 0;
    6861             : }
    6862             : 
    6863           0 : static PyObject *py_supplementalCredentialsPackage_get_reserved(PyObject *obj, void *closure)
    6864             : {
    6865           0 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(obj);
    6866           0 :         PyObject *py_reserved;
    6867           0 :         py_reserved = PyLong_FromLong((uint16_t)(object->reserved));
    6868           0 :         return py_reserved;
    6869             : }
    6870             : 
    6871           0 : static int py_supplementalCredentialsPackage_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
    6872             : {
    6873           0 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(py_obj);
    6874           0 :         if (value == NULL) {
    6875           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
    6876           0 :                 return -1;
    6877             :         }
    6878             :         {
    6879           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
    6880           0 :                 if (PyLong_Check(value)) {
    6881           0 :                         unsigned long long test_var;
    6882           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6883           0 :                         if (PyErr_Occurred() != NULL) {
    6884           0 :                                 return -1;
    6885             :                         }
    6886           0 :                         if (test_var > uint_max) {
    6887           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6888             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6889           0 :                                 return -1;
    6890             :                         }
    6891           0 :                         object->reserved = test_var;
    6892             :                 } else {
    6893           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6894             :                           PyLong_Type.tp_name);
    6895           0 :                         return -1;
    6896             :                 }
    6897             :         }
    6898           0 :         return 0;
    6899             : }
    6900             : 
    6901       16755 : static PyObject *py_supplementalCredentialsPackage_get_name(PyObject *obj, void *closure)
    6902             : {
    6903       16755 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(obj);
    6904         160 :         PyObject *py_name;
    6905       16755 :         if (object->name == NULL) {
    6906           0 :                 py_name = Py_None;
    6907           0 :                 Py_INCREF(py_name);
    6908             :         } else {
    6909       16755 :                 py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    6910             :         }
    6911       16755 :         return py_name;
    6912             : }
    6913             : 
    6914           0 : static int py_supplementalCredentialsPackage_set_name(PyObject *py_obj, PyObject *value, void *closure)
    6915             : {
    6916           0 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(py_obj);
    6917           0 :         if (value == NULL) {
    6918           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
    6919           0 :                 return -1;
    6920             :         }
    6921             :         {
    6922           0 :                 const char *test_str;
    6923           0 :                 const char *talloc_str;
    6924           0 :                 PyObject *unicode = NULL;
    6925           0 :                 if (PyUnicode_Check(value)) {
    6926           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6927           0 :                         if (unicode == NULL) {
    6928           0 :                                 return -1;
    6929             :                         }
    6930           0 :                         test_str = PyBytes_AS_STRING(unicode);
    6931           0 :                 } else if (PyBytes_Check(value)) {
    6932           0 :                         test_str = PyBytes_AS_STRING(value);
    6933             :                 } else {
    6934           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6935           0 :                         return -1;
    6936             :                 }
    6937           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6938           0 :                 if (unicode != NULL) {
    6939           0 :                         Py_DECREF(unicode);
    6940             :                 }
    6941           0 :                 if (talloc_str == NULL) {
    6942           0 :                         PyErr_NoMemory();
    6943           0 :                         return -1;
    6944             :                 }
    6945           0 :                 object->name = talloc_str;
    6946             :         }
    6947           0 :         return 0;
    6948             : }
    6949             : 
    6950        3683 : static PyObject *py_supplementalCredentialsPackage_get_data(PyObject *obj, void *closure)
    6951             : {
    6952        3683 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(obj);
    6953          30 :         PyObject *py_data;
    6954        3683 :         if (object->data == NULL) {
    6955           0 :                 py_data = Py_None;
    6956           0 :                 Py_INCREF(py_data);
    6957             :         } else {
    6958        3683 :                 py_data = PyUnicode_Decode(object->data, strlen(object->data), "utf-8", "ignore");
    6959             :         }
    6960        3683 :         return py_data;
    6961             : }
    6962             : 
    6963           0 : static int py_supplementalCredentialsPackage_set_data(PyObject *py_obj, PyObject *value, void *closure)
    6964             : {
    6965           0 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(py_obj);
    6966           0 :         if (value == NULL) {
    6967           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    6968           0 :                 return -1;
    6969             :         }
    6970             :         {
    6971           0 :                 const char *test_str;
    6972           0 :                 const char *talloc_str;
    6973           0 :                 PyObject *unicode = NULL;
    6974           0 :                 if (PyUnicode_Check(value)) {
    6975           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6976           0 :                         if (unicode == NULL) {
    6977           0 :                                 return -1;
    6978             :                         }
    6979           0 :                         test_str = PyBytes_AS_STRING(unicode);
    6980           0 :                 } else if (PyBytes_Check(value)) {
    6981           0 :                         test_str = PyBytes_AS_STRING(value);
    6982             :                 } else {
    6983           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6984           0 :                         return -1;
    6985             :                 }
    6986           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6987           0 :                 if (unicode != NULL) {
    6988           0 :                         Py_DECREF(unicode);
    6989             :                 }
    6990           0 :                 if (talloc_str == NULL) {
    6991           0 :                         PyErr_NoMemory();
    6992           0 :                         return -1;
    6993             :                 }
    6994           0 :                 object->data = talloc_str;
    6995             :         }
    6996           0 :         return 0;
    6997             : }
    6998             : 
    6999             : static PyGetSetDef py_supplementalCredentialsPackage_getsetters[] = {
    7000             :         {
    7001             :                 .name = discard_const_p(char, "name_len"),
    7002             :                 .get = py_supplementalCredentialsPackage_get_name_len,
    7003             :                 .set = py_supplementalCredentialsPackage_set_name_len,
    7004             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7005             :         },
    7006             :         {
    7007             :                 .name = discard_const_p(char, "data_len"),
    7008             :                 .get = py_supplementalCredentialsPackage_get_data_len,
    7009             :                 .set = py_supplementalCredentialsPackage_set_data_len,
    7010             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7011             :         },
    7012             :         {
    7013             :                 .name = discard_const_p(char, "reserved"),
    7014             :                 .get = py_supplementalCredentialsPackage_get_reserved,
    7015             :                 .set = py_supplementalCredentialsPackage_set_reserved,
    7016             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7017             :         },
    7018             :         {
    7019             :                 .name = discard_const_p(char, "name"),
    7020             :                 .get = py_supplementalCredentialsPackage_get_name,
    7021             :                 .set = py_supplementalCredentialsPackage_set_name,
    7022             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7023             :         },
    7024             :         {
    7025             :                 .name = discard_const_p(char, "data"),
    7026             :                 .get = py_supplementalCredentialsPackage_get_data,
    7027             :                 .set = py_supplementalCredentialsPackage_set_data,
    7028             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7029             :         },
    7030             :         { .name = NULL }
    7031             : };
    7032             : 
    7033           0 : static PyObject *py_supplementalCredentialsPackage_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7034             : {
    7035           0 :         return pytalloc_new(struct supplementalCredentialsPackage, type);
    7036             : }
    7037             : 
    7038           0 : static PyObject *py_supplementalCredentialsPackage_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7039             : {
    7040           0 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(py_obj);
    7041           0 :         PyObject *ret = NULL;
    7042           0 :         DATA_BLOB blob;
    7043           0 :         enum ndr_err_code err;
    7044           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7045           0 :         if (tmp_ctx == NULL) {
    7046           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7047           0 :                 return NULL;
    7048             :         }
    7049           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_supplementalCredentialsPackage);
    7050           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7051           0 :                 TALLOC_FREE(tmp_ctx);
    7052           0 :                 PyErr_SetNdrError(err);
    7053           0 :                 return NULL;
    7054             :         }
    7055             : 
    7056           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7057           0 :         TALLOC_FREE(tmp_ctx);
    7058           0 :         return ret;
    7059             : }
    7060             : 
    7061           0 : static PyObject *py_supplementalCredentialsPackage_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7062             : {
    7063           0 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(py_obj);
    7064           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7065           0 :         Py_ssize_t blob_length = 0;
    7066           0 :         enum ndr_err_code err;
    7067           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7068           0 :         PyObject *allow_remaining_obj = NULL;
    7069           0 :         bool allow_remaining = false;
    7070             : 
    7071           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7072             :                 discard_const_p(char *, kwnames),
    7073             :                 &blob.data, &blob_length,
    7074             :                 &allow_remaining_obj)) {
    7075           0 :                 return NULL;
    7076             :         }
    7077           0 :         blob.length = blob_length;
    7078             : 
    7079           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7080           0 :                 allow_remaining = true;
    7081             :         }
    7082             : 
    7083           0 :         if (allow_remaining) {
    7084           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_supplementalCredentialsPackage);
    7085             :         } else {
    7086           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_supplementalCredentialsPackage);
    7087             :         }
    7088           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7089           0 :                 PyErr_SetNdrError(err);
    7090           0 :                 return NULL;
    7091             :         }
    7092             : 
    7093           0 :         Py_RETURN_NONE;
    7094             : }
    7095             : 
    7096           0 : static PyObject *py_supplementalCredentialsPackage_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7097             : {
    7098           0 :         struct supplementalCredentialsPackage *object = pytalloc_get_ptr(py_obj);
    7099           0 :         PyObject *ret;
    7100           0 :         char *retstr;
    7101             : 
    7102           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_supplementalCredentialsPackage, "supplementalCredentialsPackage", object);
    7103           0 :         ret = PyUnicode_FromString(retstr);
    7104           0 :         talloc_free(retstr);
    7105             : 
    7106           0 :         return ret;
    7107             : }
    7108             : 
    7109             : static PyMethodDef py_supplementalCredentialsPackage_methods[] = {
    7110             :         { "__ndr_pack__", (PyCFunction)py_supplementalCredentialsPackage_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7111             :         { "__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" },
    7112             :         { "__ndr_print__", (PyCFunction)py_supplementalCredentialsPackage_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7113             :         { NULL, NULL, 0, NULL }
    7114             : };
    7115             : 
    7116             : 
    7117             : static PyTypeObject supplementalCredentialsPackage_Type = {
    7118             :         PyVarObject_HEAD_INIT(NULL, 0)
    7119             :         .tp_name = "drsblobs.supplementalCredentialsPackage",
    7120             :         .tp_getset = py_supplementalCredentialsPackage_getsetters,
    7121             :         .tp_methods = py_supplementalCredentialsPackage_methods,
    7122             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7123             :         .tp_new = py_supplementalCredentialsPackage_new,
    7124             : };
    7125             : 
    7126             : 
    7127           0 : static PyObject *py_supplementalCredentialsSubBlob_get_prefix(PyObject *obj, void *closure)
    7128             : {
    7129           0 :         struct supplementalCredentialsSubBlob *object = pytalloc_get_ptr(obj);
    7130           0 :         PyObject *py_prefix;
    7131           0 :         if (object->prefix == NULL) {
    7132           0 :                 py_prefix = Py_None;
    7133           0 :                 Py_INCREF(py_prefix);
    7134             :         } else {
    7135           0 :                 py_prefix = PyUnicode_Decode(object->prefix, strlen(object->prefix), "utf-8", "ignore");
    7136             :         }
    7137           0 :         return py_prefix;
    7138             : }
    7139             : 
    7140           0 : static int py_supplementalCredentialsSubBlob_set_prefix(PyObject *py_obj, PyObject *value, void *closure)
    7141             : {
    7142           0 :         struct supplementalCredentialsSubBlob *object = pytalloc_get_ptr(py_obj);
    7143           0 :         if (value == NULL) {
    7144           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->prefix");
    7145           0 :                 return -1;
    7146             :         }
    7147             :         {
    7148           0 :                 const char *test_str;
    7149           0 :                 const char *talloc_str;
    7150           0 :                 PyObject *unicode = NULL;
    7151           0 :                 if (PyUnicode_Check(value)) {
    7152           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7153           0 :                         if (unicode == NULL) {
    7154           0 :                                 return -1;
    7155             :                         }
    7156           0 :                         test_str = PyBytes_AS_STRING(unicode);
    7157           0 :                 } else if (PyBytes_Check(value)) {
    7158           0 :                         test_str = PyBytes_AS_STRING(value);
    7159             :                 } else {
    7160           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7161           0 :                         return -1;
    7162             :                 }
    7163           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7164           0 :                 if (unicode != NULL) {
    7165           0 :                         Py_DECREF(unicode);
    7166             :                 }
    7167           0 :                 if (talloc_str == NULL) {
    7168           0 :                         PyErr_NoMemory();
    7169           0 :                         return -1;
    7170             :                 }
    7171           0 :                 object->prefix = talloc_str;
    7172             :         }
    7173           0 :         return 0;
    7174             : }
    7175             : 
    7176           0 : static PyObject *py_supplementalCredentialsSubBlob_get_signature(PyObject *obj, void *closure)
    7177             : {
    7178           0 :         struct supplementalCredentialsSubBlob *object = pytalloc_get_ptr(obj);
    7179           0 :         PyObject *py_signature;
    7180           0 :         py_signature = PyLong_FromLong((uint16_t)(object->signature));
    7181           0 :         return py_signature;
    7182             : }
    7183             : 
    7184           0 : static int py_supplementalCredentialsSubBlob_set_signature(PyObject *py_obj, PyObject *value, void *closure)
    7185             : {
    7186           0 :         struct supplementalCredentialsSubBlob *object = pytalloc_get_ptr(py_obj);
    7187           0 :         if (value == NULL) {
    7188           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->signature");
    7189           0 :                 return -1;
    7190             :         }
    7191             :         {
    7192           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->signature));
    7193           0 :                 if (PyLong_Check(value)) {
    7194           0 :                         unsigned long long test_var;
    7195           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7196           0 :                         if (PyErr_Occurred() != NULL) {
    7197           0 :                                 return -1;
    7198             :                         }
    7199           0 :                         if (test_var > uint_max) {
    7200           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7201             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7202           0 :                                 return -1;
    7203             :                         }
    7204           0 :                         object->signature = test_var;
    7205             :                 } else {
    7206           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7207             :                           PyLong_Type.tp_name);
    7208           0 :                         return -1;
    7209             :                 }
    7210             :         }
    7211           0 :         return 0;
    7212             : }
    7213             : 
    7214         240 : static PyObject *py_supplementalCredentialsSubBlob_get_num_packages(PyObject *obj, void *closure)
    7215             : {
    7216         240 :         struct supplementalCredentialsSubBlob *object = pytalloc_get_ptr(obj);
    7217           0 :         PyObject *py_num_packages;
    7218         240 :         py_num_packages = PyLong_FromLong((uint16_t)(object->num_packages));
    7219         240 :         return py_num_packages;
    7220             : }
    7221             : 
    7222           0 : static int py_supplementalCredentialsSubBlob_set_num_packages(PyObject *py_obj, PyObject *value, void *closure)
    7223             : {
    7224           0 :         struct supplementalCredentialsSubBlob *object = pytalloc_get_ptr(py_obj);
    7225           0 :         if (value == NULL) {
    7226           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_packages");
    7227           0 :                 return -1;
    7228             :         }
    7229             :         {
    7230           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_packages));
    7231           0 :                 if (PyLong_Check(value)) {
    7232           0 :                         unsigned long long test_var;
    7233           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7234           0 :                         if (PyErr_Occurred() != NULL) {
    7235           0 :                                 return -1;
    7236             :                         }
    7237           0 :                         if (test_var > uint_max) {
    7238           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7239             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7240           0 :                                 return -1;
    7241             :                         }
    7242           0 :                         object->num_packages = test_var;
    7243             :                 } else {
    7244           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7245             :                           PyLong_Type.tp_name);
    7246           0 :                         return -1;
    7247             :                 }
    7248             :         }
    7249           0 :         return 0;
    7250             : }
    7251             : 
    7252        5070 : static PyObject *py_supplementalCredentialsSubBlob_get_packages(PyObject *obj, void *closure)
    7253             : {
    7254        5070 :         struct supplementalCredentialsSubBlob *object = pytalloc_get_ptr(obj);
    7255          44 :         PyObject *py_packages;
    7256        5070 :         py_packages = PyList_New(object->num_packages);
    7257        5070 :         if (py_packages == NULL) {
    7258           0 :                 return NULL;
    7259             :         }
    7260             :         {
    7261             :                 int packages_cntr_0;
    7262       29946 :                 for (packages_cntr_0 = 0; packages_cntr_0 < (object->num_packages); packages_cntr_0++) {
    7263         253 :                         PyObject *py_packages_0;
    7264       24876 :                         py_packages_0 = pytalloc_reference_ex(&supplementalCredentialsPackage_Type, object->packages, &(object->packages)[packages_cntr_0]);
    7265       24876 :                         PyList_SetItem(py_packages, packages_cntr_0, py_packages_0);
    7266             :                 }
    7267             :         }
    7268        5026 :         return py_packages;
    7269             : }
    7270             : 
    7271           0 : static int py_supplementalCredentialsSubBlob_set_packages(PyObject *py_obj, PyObject *value, void *closure)
    7272             : {
    7273           0 :         struct supplementalCredentialsSubBlob *object = pytalloc_get_ptr(py_obj);
    7274           0 :         if (value == NULL) {
    7275           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->packages");
    7276           0 :                 return -1;
    7277             :         }
    7278           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7279             :         {
    7280           0 :                 int packages_cntr_0;
    7281           0 :                 object->packages = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->packages, PyList_GET_SIZE(value));
    7282           0 :                 if (!object->packages) { return -1; }
    7283           0 :                 talloc_set_name_const(object->packages, "ARRAY: object->packages");
    7284           0 :                 for (packages_cntr_0 = 0; packages_cntr_0 < PyList_GET_SIZE(value); packages_cntr_0++) {
    7285           0 :                         if (PyList_GET_ITEM(value, packages_cntr_0) == NULL) {
    7286           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->packages)[packages_cntr_0]");
    7287           0 :                                 return -1;
    7288             :                         }
    7289           0 :                         PY_CHECK_TYPE(&supplementalCredentialsPackage_Type, PyList_GET_ITEM(value, packages_cntr_0), return -1;);
    7290           0 :                         if (talloc_reference(object->packages, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, packages_cntr_0))) == NULL) {
    7291           0 :                                 PyErr_NoMemory();
    7292           0 :                                 return -1;
    7293             :                         }
    7294           0 :                         (object->packages)[packages_cntr_0] = *(struct supplementalCredentialsPackage *)pytalloc_get_ptr(PyList_GET_ITEM(value, packages_cntr_0));
    7295             :                 }
    7296             :         }
    7297           0 :         return 0;
    7298             : }
    7299             : 
    7300             : static PyGetSetDef py_supplementalCredentialsSubBlob_getsetters[] = {
    7301             :         {
    7302             :                 .name = discard_const_p(char, "prefix"),
    7303             :                 .get = py_supplementalCredentialsSubBlob_get_prefix,
    7304             :                 .set = py_supplementalCredentialsSubBlob_set_prefix,
    7305             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7306             :         },
    7307             :         {
    7308             :                 .name = discard_const_p(char, "signature"),
    7309             :                 .get = py_supplementalCredentialsSubBlob_get_signature,
    7310             :                 .set = py_supplementalCredentialsSubBlob_set_signature,
    7311             :                 .doc = discard_const_p(char, "PIDL-generated element of base type supplementalCredentialsSignature")
    7312             :         },
    7313             :         {
    7314             :                 .name = discard_const_p(char, "num_packages"),
    7315             :                 .get = py_supplementalCredentialsSubBlob_get_num_packages,
    7316             :                 .set = py_supplementalCredentialsSubBlob_set_num_packages,
    7317             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7318             :         },
    7319             :         {
    7320             :                 .name = discard_const_p(char, "packages"),
    7321             :                 .get = py_supplementalCredentialsSubBlob_get_packages,
    7322             :                 .set = py_supplementalCredentialsSubBlob_set_packages,
    7323             :                 .doc = discard_const_p(char, "PIDL-generated element of base type supplementalCredentialsPackage")
    7324             :         },
    7325             :         { .name = NULL }
    7326             : };
    7327             : 
    7328           0 : static PyObject *py_supplementalCredentialsSubBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7329             : {
    7330           0 :         return pytalloc_new(struct supplementalCredentialsSubBlob, type);
    7331             : }
    7332             : 
    7333             : 
    7334             : static PyTypeObject supplementalCredentialsSubBlob_Type = {
    7335             :         PyVarObject_HEAD_INIT(NULL, 0)
    7336             :         .tp_name = "drsblobs.supplementalCredentialsSubBlob",
    7337             :         .tp_getset = py_supplementalCredentialsSubBlob_getsetters,
    7338             :         .tp_methods = NULL,
    7339             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7340             :         .tp_new = py_supplementalCredentialsSubBlob_new,
    7341             : };
    7342             : 
    7343             : 
    7344           0 : static PyObject *py_supplementalCredentialsBlob_get_unknown1(PyObject *obj, void *closure)
    7345             : {
    7346           0 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(obj);
    7347           0 :         PyObject *py_unknown1;
    7348           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown1));
    7349           0 :         return py_unknown1;
    7350             : }
    7351             : 
    7352           0 : static int py_supplementalCredentialsBlob_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
    7353             : {
    7354           0 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(py_obj);
    7355           0 :         if (value == NULL) {
    7356           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
    7357           0 :                 return -1;
    7358             :         }
    7359             :         {
    7360           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
    7361           0 :                 if (PyLong_Check(value)) {
    7362           0 :                         unsigned long long test_var;
    7363           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7364           0 :                         if (PyErr_Occurred() != NULL) {
    7365           0 :                                 return -1;
    7366             :                         }
    7367           0 :                         if (test_var > uint_max) {
    7368           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7369             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7370           0 :                                 return -1;
    7371             :                         }
    7372           0 :                         object->unknown1 = test_var;
    7373             :                 } else {
    7374           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7375             :                           PyLong_Type.tp_name);
    7376           0 :                         return -1;
    7377             :                 }
    7378             :         }
    7379           0 :         return 0;
    7380             : }
    7381             : 
    7382           0 : static PyObject *py_supplementalCredentialsBlob_get___ndr_size(PyObject *obj, void *closure)
    7383             : {
    7384           0 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(obj);
    7385           0 :         PyObject *py___ndr_size;
    7386           0 :         py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size));
    7387           0 :         return py___ndr_size;
    7388             : }
    7389             : 
    7390           0 : static int py_supplementalCredentialsBlob_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
    7391             : {
    7392           0 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(py_obj);
    7393           0 :         if (value == NULL) {
    7394           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
    7395           0 :                 return -1;
    7396             :         }
    7397             :         {
    7398           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
    7399           0 :                 if (PyLong_Check(value)) {
    7400           0 :                         unsigned long long test_var;
    7401           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7402           0 :                         if (PyErr_Occurred() != NULL) {
    7403           0 :                                 return -1;
    7404             :                         }
    7405           0 :                         if (test_var > uint_max) {
    7406           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7407             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7408           0 :                                 return -1;
    7409             :                         }
    7410           0 :                         object->__ndr_size = test_var;
    7411             :                 } else {
    7412           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7413             :                           PyLong_Type.tp_name);
    7414           0 :                         return -1;
    7415             :                 }
    7416             :         }
    7417           0 :         return 0;
    7418             : }
    7419             : 
    7420           0 : static PyObject *py_supplementalCredentialsBlob_get_unknown2(PyObject *obj, void *closure)
    7421             : {
    7422           0 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(obj);
    7423           0 :         PyObject *py_unknown2;
    7424           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown2));
    7425           0 :         return py_unknown2;
    7426             : }
    7427             : 
    7428           0 : static int py_supplementalCredentialsBlob_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    7429             : {
    7430           0 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(py_obj);
    7431           0 :         if (value == NULL) {
    7432           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    7433           0 :                 return -1;
    7434             :         }
    7435             :         {
    7436           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
    7437           0 :                 if (PyLong_Check(value)) {
    7438           0 :                         unsigned long long test_var;
    7439           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7440           0 :                         if (PyErr_Occurred() != NULL) {
    7441           0 :                                 return -1;
    7442             :                         }
    7443           0 :                         if (test_var > uint_max) {
    7444           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7445             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7446           0 :                                 return -1;
    7447             :                         }
    7448           0 :                         object->unknown2 = test_var;
    7449             :                 } else {
    7450           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7451             :                           PyLong_Type.tp_name);
    7452           0 :                         return -1;
    7453             :                 }
    7454             :         }
    7455           0 :         return 0;
    7456             : }
    7457             : 
    7458        5310 : static PyObject *py_supplementalCredentialsBlob_get_sub(PyObject *obj, void *closure)
    7459             : {
    7460        5310 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(obj);
    7461          44 :         PyObject *py_sub;
    7462        5310 :         py_sub = pytalloc_reference_ex(&supplementalCredentialsSubBlob_Type, pytalloc_get_mem_ctx(obj), &object->sub);
    7463        5310 :         return py_sub;
    7464             : }
    7465             : 
    7466           0 : static int py_supplementalCredentialsBlob_set_sub(PyObject *py_obj, PyObject *value, void *closure)
    7467             : {
    7468           0 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(py_obj);
    7469           0 :         if (value == NULL) {
    7470           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sub");
    7471           0 :                 return -1;
    7472             :         }
    7473           0 :         PY_CHECK_TYPE(&supplementalCredentialsSubBlob_Type, value, return -1;);
    7474           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7475           0 :                 PyErr_NoMemory();
    7476           0 :                 return -1;
    7477             :         }
    7478           0 :         object->sub = *(struct supplementalCredentialsSubBlob *)pytalloc_get_ptr(value);
    7479           0 :         return 0;
    7480             : }
    7481             : 
    7482           0 : static PyObject *py_supplementalCredentialsBlob_get_unknown3(PyObject *obj, void *closure)
    7483             : {
    7484           0 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(obj);
    7485           0 :         PyObject *py_unknown3;
    7486           0 :         py_unknown3 = PyLong_FromLong((uint16_t)(object->unknown3));
    7487           0 :         return py_unknown3;
    7488             : }
    7489             : 
    7490           0 : static int py_supplementalCredentialsBlob_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    7491             : {
    7492           0 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(py_obj);
    7493           0 :         if (value == NULL) {
    7494           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
    7495           0 :                 return -1;
    7496             :         }
    7497             :         {
    7498           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
    7499           0 :                 if (PyLong_Check(value)) {
    7500           0 :                         unsigned long long test_var;
    7501           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7502           0 :                         if (PyErr_Occurred() != NULL) {
    7503           0 :                                 return -1;
    7504             :                         }
    7505           0 :                         if (test_var > uint_max) {
    7506           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7507             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7508           0 :                                 return -1;
    7509             :                         }
    7510           0 :                         object->unknown3 = test_var;
    7511             :                 } else {
    7512           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7513             :                           PyLong_Type.tp_name);
    7514           0 :                         return -1;
    7515             :                 }
    7516             :         }
    7517           0 :         return 0;
    7518             : }
    7519             : 
    7520             : static PyGetSetDef py_supplementalCredentialsBlob_getsetters[] = {
    7521             :         {
    7522             :                 .name = discard_const_p(char, "unknown1"),
    7523             :                 .get = py_supplementalCredentialsBlob_get_unknown1,
    7524             :                 .set = py_supplementalCredentialsBlob_set_unknown1,
    7525             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7526             :         },
    7527             :         {
    7528             :                 .name = discard_const_p(char, "__ndr_size"),
    7529             :                 .get = py_supplementalCredentialsBlob_get___ndr_size,
    7530             :                 .set = py_supplementalCredentialsBlob_set___ndr_size,
    7531             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7532             :         },
    7533             :         {
    7534             :                 .name = discard_const_p(char, "unknown2"),
    7535             :                 .get = py_supplementalCredentialsBlob_get_unknown2,
    7536             :                 .set = py_supplementalCredentialsBlob_set_unknown2,
    7537             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7538             :         },
    7539             :         {
    7540             :                 .name = discard_const_p(char, "sub"),
    7541             :                 .get = py_supplementalCredentialsBlob_get_sub,
    7542             :                 .set = py_supplementalCredentialsBlob_set_sub,
    7543             :                 .doc = discard_const_p(char, "PIDL-generated element of base type supplementalCredentialsSubBlob")
    7544             :         },
    7545             :         {
    7546             :                 .name = discard_const_p(char, "unknown3"),
    7547             :                 .get = py_supplementalCredentialsBlob_get_unknown3,
    7548             :                 .set = py_supplementalCredentialsBlob_set_unknown3,
    7549             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7550             :         },
    7551             :         { .name = NULL }
    7552             : };
    7553             : 
    7554        3154 : static PyObject *py_supplementalCredentialsBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7555             : {
    7556        3154 :         return pytalloc_new(struct supplementalCredentialsBlob, type);
    7557             : }
    7558             : 
    7559           0 : static PyObject *py_supplementalCredentialsBlob_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7560             : {
    7561           0 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(py_obj);
    7562           0 :         PyObject *ret = NULL;
    7563           0 :         DATA_BLOB blob;
    7564           0 :         enum ndr_err_code err;
    7565           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7566           0 :         if (tmp_ctx == NULL) {
    7567           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7568           0 :                 return NULL;
    7569             :         }
    7570           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_supplementalCredentialsBlob);
    7571           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7572           0 :                 TALLOC_FREE(tmp_ctx);
    7573           0 :                 PyErr_SetNdrError(err);
    7574           0 :                 return NULL;
    7575             :         }
    7576             : 
    7577           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7578           0 :         TALLOC_FREE(tmp_ctx);
    7579           0 :         return ret;
    7580             : }
    7581             : 
    7582        3154 : static PyObject *py_supplementalCredentialsBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7583             : {
    7584        3154 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(py_obj);
    7585        3154 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7586        3154 :         Py_ssize_t blob_length = 0;
    7587          12 :         enum ndr_err_code err;
    7588        3154 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7589        3154 :         PyObject *allow_remaining_obj = NULL;
    7590        3154 :         bool allow_remaining = false;
    7591             : 
    7592        3154 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7593             :                 discard_const_p(char *, kwnames),
    7594             :                 &blob.data, &blob_length,
    7595             :                 &allow_remaining_obj)) {
    7596           0 :                 return NULL;
    7597             :         }
    7598        3154 :         blob.length = blob_length;
    7599             : 
    7600        3154 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7601           0 :                 allow_remaining = true;
    7602             :         }
    7603             : 
    7604        3142 :         if (allow_remaining) {
    7605           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_supplementalCredentialsBlob);
    7606             :         } else {
    7607        3154 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_supplementalCredentialsBlob);
    7608             :         }
    7609        3154 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7610           0 :                 PyErr_SetNdrError(err);
    7611           0 :                 return NULL;
    7612             :         }
    7613             : 
    7614        3154 :         Py_RETURN_NONE;
    7615             : }
    7616             : 
    7617           0 : static PyObject *py_supplementalCredentialsBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7618             : {
    7619           0 :         struct supplementalCredentialsBlob *object = pytalloc_get_ptr(py_obj);
    7620           0 :         PyObject *ret;
    7621           0 :         char *retstr;
    7622             : 
    7623           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_supplementalCredentialsBlob, "supplementalCredentialsBlob", object);
    7624           0 :         ret = PyUnicode_FromString(retstr);
    7625           0 :         talloc_free(retstr);
    7626             : 
    7627           0 :         return ret;
    7628             : }
    7629             : 
    7630             : static PyMethodDef py_supplementalCredentialsBlob_methods[] = {
    7631             :         { "__ndr_pack__", (PyCFunction)py_supplementalCredentialsBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7632             :         { "__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" },
    7633             :         { "__ndr_print__", (PyCFunction)py_supplementalCredentialsBlob_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7634             :         { NULL, NULL, 0, NULL }
    7635             : };
    7636             : 
    7637             : 
    7638             : static PyTypeObject supplementalCredentialsBlob_Type = {
    7639             :         PyVarObject_HEAD_INIT(NULL, 0)
    7640             :         .tp_name = "drsblobs.supplementalCredentialsBlob",
    7641             :         .tp_getset = py_supplementalCredentialsBlob_getsetters,
    7642             :         .tp_methods = py_supplementalCredentialsBlob_methods,
    7643             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7644             :         .tp_new = py_supplementalCredentialsBlob_new,
    7645             : };
    7646             : 
    7647             : 
    7648           0 : static PyObject *py_package_PackagesBlob_get_names(PyObject *obj, void *closure)
    7649             : {
    7650           0 :         struct package_PackagesBlob *object = pytalloc_get_ptr(obj);
    7651           0 :         PyObject *py_names;
    7652           0 :         py_names = pytalloc_GenericObject_reference_ex(pytalloc_get_mem_ctx(obj), object->names);
    7653           0 :         return py_names;
    7654             : }
    7655             : 
    7656           0 : static int py_package_PackagesBlob_set_names(PyObject *py_obj, PyObject *value, void *closure)
    7657             : {
    7658           0 :         struct package_PackagesBlob *object = pytalloc_get_ptr(py_obj);
    7659           0 :         if (value == NULL) {
    7660           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->names");
    7661           0 :                 return -1;
    7662             :         }
    7663           0 :         object->names = pytalloc_get_ptr(value);
    7664           0 :         return 0;
    7665             : }
    7666             : 
    7667             : static PyGetSetDef py_package_PackagesBlob_getsetters[] = {
    7668             :         {
    7669             :                 .name = discard_const_p(char, "names"),
    7670             :                 .get = py_package_PackagesBlob_get_names,
    7671             :                 .set = py_package_PackagesBlob_set_names,
    7672             :                 .doc = discard_const_p(char, "PIDL-generated element of base type string_array")
    7673             :         },
    7674             :         { .name = NULL }
    7675             : };
    7676             : 
    7677           0 : static PyObject *py_package_PackagesBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7678             : {
    7679           0 :         return pytalloc_new(struct package_PackagesBlob, type);
    7680             : }
    7681             : 
    7682           0 : static PyObject *py_package_PackagesBlob_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7683             : {
    7684           0 :         struct package_PackagesBlob *object = pytalloc_get_ptr(py_obj);
    7685           0 :         PyObject *ret = NULL;
    7686           0 :         DATA_BLOB blob;
    7687           0 :         enum ndr_err_code err;
    7688           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7689           0 :         if (tmp_ctx == NULL) {
    7690           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7691           0 :                 return NULL;
    7692             :         }
    7693           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_package_PackagesBlob);
    7694           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7695           0 :                 TALLOC_FREE(tmp_ctx);
    7696           0 :                 PyErr_SetNdrError(err);
    7697           0 :                 return NULL;
    7698             :         }
    7699             : 
    7700           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7701           0 :         TALLOC_FREE(tmp_ctx);
    7702           0 :         return ret;
    7703             : }
    7704             : 
    7705           0 : static PyObject *py_package_PackagesBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7706             : {
    7707           0 :         struct package_PackagesBlob *object = pytalloc_get_ptr(py_obj);
    7708           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7709           0 :         Py_ssize_t blob_length = 0;
    7710           0 :         enum ndr_err_code err;
    7711           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7712           0 :         PyObject *allow_remaining_obj = NULL;
    7713           0 :         bool allow_remaining = false;
    7714             : 
    7715           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7716             :                 discard_const_p(char *, kwnames),
    7717             :                 &blob.data, &blob_length,
    7718             :                 &allow_remaining_obj)) {
    7719           0 :                 return NULL;
    7720             :         }
    7721           0 :         blob.length = blob_length;
    7722             : 
    7723           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7724           0 :                 allow_remaining = true;
    7725             :         }
    7726             : 
    7727           0 :         if (allow_remaining) {
    7728           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PackagesBlob);
    7729             :         } else {
    7730           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PackagesBlob);
    7731             :         }
    7732           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7733           0 :                 PyErr_SetNdrError(err);
    7734           0 :                 return NULL;
    7735             :         }
    7736             : 
    7737           0 :         Py_RETURN_NONE;
    7738             : }
    7739             : 
    7740           0 : static PyObject *py_package_PackagesBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7741             : {
    7742           0 :         struct package_PackagesBlob *object = pytalloc_get_ptr(py_obj);
    7743           0 :         PyObject *ret;
    7744           0 :         char *retstr;
    7745             : 
    7746           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_package_PackagesBlob, "package_PackagesBlob", object);
    7747           0 :         ret = PyUnicode_FromString(retstr);
    7748           0 :         talloc_free(retstr);
    7749             : 
    7750           0 :         return ret;
    7751             : }
    7752             : 
    7753             : static PyMethodDef py_package_PackagesBlob_methods[] = {
    7754             :         { "__ndr_pack__", (PyCFunction)py_package_PackagesBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7755             :         { "__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" },
    7756             :         { "__ndr_print__", (PyCFunction)py_package_PackagesBlob_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7757             :         { NULL, NULL, 0, NULL }
    7758             : };
    7759             : 
    7760             : 
    7761             : static PyTypeObject package_PackagesBlob_Type = {
    7762             :         PyVarObject_HEAD_INIT(NULL, 0)
    7763             :         .tp_name = "drsblobs.package_PackagesBlob",
    7764             :         .tp_getset = py_package_PackagesBlob_getsetters,
    7765             :         .tp_methods = py_package_PackagesBlob_methods,
    7766             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7767             :         .tp_new = py_package_PackagesBlob_new,
    7768             : };
    7769             : 
    7770             : 
    7771           0 : static PyObject *py_package_PrimaryKerberosString_get_length(PyObject *obj, void *closure)
    7772             : {
    7773           0 :         struct package_PrimaryKerberosString *object = pytalloc_get_ptr(obj);
    7774           0 :         PyObject *py_length;
    7775           0 :         py_length = PyLong_FromLong((uint16_t)(object->length));
    7776           0 :         return py_length;
    7777             : }
    7778             : 
    7779           0 : static int py_package_PrimaryKerberosString_set_length(PyObject *py_obj, PyObject *value, void *closure)
    7780             : {
    7781           0 :         struct package_PrimaryKerberosString *object = pytalloc_get_ptr(py_obj);
    7782           0 :         if (value == NULL) {
    7783           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    7784           0 :                 return -1;
    7785             :         }
    7786             :         {
    7787           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    7788           0 :                 if (PyLong_Check(value)) {
    7789           0 :                         unsigned long long test_var;
    7790           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7791           0 :                         if (PyErr_Occurred() != NULL) {
    7792           0 :                                 return -1;
    7793             :                         }
    7794           0 :                         if (test_var > uint_max) {
    7795           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7796             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7797           0 :                                 return -1;
    7798             :                         }
    7799           0 :                         object->length = test_var;
    7800             :                 } else {
    7801           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7802             :                           PyLong_Type.tp_name);
    7803           0 :                         return -1;
    7804             :                 }
    7805             :         }
    7806           0 :         return 0;
    7807             : }
    7808             : 
    7809           0 : static PyObject *py_package_PrimaryKerberosString_get_size(PyObject *obj, void *closure)
    7810             : {
    7811           0 :         struct package_PrimaryKerberosString *object = pytalloc_get_ptr(obj);
    7812           0 :         PyObject *py_size;
    7813           0 :         py_size = PyLong_FromLong((uint16_t)(object->size));
    7814           0 :         return py_size;
    7815             : }
    7816             : 
    7817           0 : static int py_package_PrimaryKerberosString_set_size(PyObject *py_obj, PyObject *value, void *closure)
    7818             : {
    7819           0 :         struct package_PrimaryKerberosString *object = pytalloc_get_ptr(py_obj);
    7820           0 :         if (value == NULL) {
    7821           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
    7822           0 :                 return -1;
    7823             :         }
    7824             :         {
    7825           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
    7826           0 :                 if (PyLong_Check(value)) {
    7827           0 :                         unsigned long long test_var;
    7828           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7829           0 :                         if (PyErr_Occurred() != NULL) {
    7830           0 :                                 return -1;
    7831             :                         }
    7832           0 :                         if (test_var > uint_max) {
    7833           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7834             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7835           0 :                                 return -1;
    7836             :                         }
    7837           0 :                         object->size = test_var;
    7838             :                 } else {
    7839           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7840             :                           PyLong_Type.tp_name);
    7841           0 :                         return -1;
    7842             :                 }
    7843             :         }
    7844           0 :         return 0;
    7845             : }
    7846             : 
    7847         438 : static PyObject *py_package_PrimaryKerberosString_get_string(PyObject *obj, void *closure)
    7848             : {
    7849         438 :         struct package_PrimaryKerberosString *object = pytalloc_get_ptr(obj);
    7850          12 :         PyObject *py_string;
    7851         438 :         if (object->string == NULL) {
    7852           0 :                 Py_RETURN_NONE;
    7853             :         }
    7854         438 :         if (object->string == NULL) {
    7855           0 :                 py_string = Py_None;
    7856           0 :                 Py_INCREF(py_string);
    7857             :         } else {
    7858         438 :                 py_string = PyString_FromStringOrNULL(object->string);
    7859             :         }
    7860         438 :         return py_string;
    7861             : }
    7862             : 
    7863           0 : static int py_package_PrimaryKerberosString_set_string(PyObject *py_obj, PyObject *value, void *closure)
    7864             : {
    7865           0 :         struct package_PrimaryKerberosString *object = pytalloc_get_ptr(py_obj);
    7866           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->string));
    7867           0 :         if (value == NULL) {
    7868           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->string");
    7869           0 :                 return -1;
    7870             :         }
    7871           0 :         if (value == Py_None) {
    7872           0 :                 object->string = NULL;
    7873             :         } else {
    7874           0 :                 object->string = NULL;
    7875             :                 {
    7876           0 :                         const char *test_str;
    7877           0 :                         const char *talloc_str;
    7878           0 :                         PyObject *unicode = NULL;
    7879           0 :                         if (PyUnicode_Check(value)) {
    7880           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7881           0 :                                 if (unicode == NULL) {
    7882           0 :                                         return -1;
    7883             :                                 }
    7884           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7885           0 :                         } else if (PyBytes_Check(value)) {
    7886           0 :                                 test_str = PyBytes_AS_STRING(value);
    7887             :                         } else {
    7888           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7889           0 :                                 return -1;
    7890             :                         }
    7891           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7892           0 :                         if (unicode != NULL) {
    7893           0 :                                 Py_DECREF(unicode);
    7894             :                         }
    7895           0 :                         if (talloc_str == NULL) {
    7896           0 :                                 PyErr_NoMemory();
    7897           0 :                                 return -1;
    7898             :                         }
    7899           0 :                         object->string = talloc_str;
    7900             :                 }
    7901             :         }
    7902           0 :         return 0;
    7903             : }
    7904             : 
    7905             : static PyGetSetDef py_package_PrimaryKerberosString_getsetters[] = {
    7906             :         {
    7907             :                 .name = discard_const_p(char, "length"),
    7908             :                 .get = py_package_PrimaryKerberosString_get_length,
    7909             :                 .set = py_package_PrimaryKerberosString_set_length,
    7910             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7911             :         },
    7912             :         {
    7913             :                 .name = discard_const_p(char, "size"),
    7914             :                 .get = py_package_PrimaryKerberosString_get_size,
    7915             :                 .set = py_package_PrimaryKerberosString_set_size,
    7916             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7917             :         },
    7918             :         {
    7919             :                 .name = discard_const_p(char, "string"),
    7920             :                 .get = py_package_PrimaryKerberosString_get_string,
    7921             :                 .set = py_package_PrimaryKerberosString_set_string,
    7922             :                 .doc = discard_const_p(char, "PIDL-generated element of base type string")
    7923             :         },
    7924             :         { .name = NULL }
    7925             : };
    7926             : 
    7927           0 : static PyObject *py_package_PrimaryKerberosString_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7928             : {
    7929           0 :         return pytalloc_new(struct package_PrimaryKerberosString, type);
    7930             : }
    7931             : 
    7932             : 
    7933             : static PyTypeObject package_PrimaryKerberosString_Type = {
    7934             :         PyVarObject_HEAD_INIT(NULL, 0)
    7935             :         .tp_name = "drsblobs.package_PrimaryKerberosString",
    7936             :         .tp_getset = py_package_PrimaryKerberosString_getsetters,
    7937             :         .tp_methods = NULL,
    7938             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7939             :         .tp_new = py_package_PrimaryKerberosString_new,
    7940             : };
    7941             : 
    7942             : 
    7943           0 : static PyObject *py_package_PrimaryKerberosKey3_get_reserved1(PyObject *obj, void *closure)
    7944             : {
    7945           0 :         struct package_PrimaryKerberosKey3 *object = pytalloc_get_ptr(obj);
    7946           0 :         PyObject *py_reserved1;
    7947           0 :         py_reserved1 = PyLong_FromLong((uint16_t)(object->reserved1));
    7948           0 :         return py_reserved1;
    7949             : }
    7950             : 
    7951           0 : static int py_package_PrimaryKerberosKey3_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
    7952             : {
    7953           0 :         struct package_PrimaryKerberosKey3 *object = pytalloc_get_ptr(py_obj);
    7954           0 :         if (value == NULL) {
    7955           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved1");
    7956           0 :                 return -1;
    7957             :         }
    7958             :         {
    7959           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved1));
    7960           0 :                 if (PyLong_Check(value)) {
    7961           0 :                         unsigned long long test_var;
    7962           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7963           0 :                         if (PyErr_Occurred() != NULL) {
    7964           0 :                                 return -1;
    7965             :                         }
    7966           0 :                         if (test_var > uint_max) {
    7967           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7968             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7969           0 :                                 return -1;
    7970             :                         }
    7971           0 :                         object->reserved1 = test_var;
    7972             :                 } else {
    7973           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7974             :                           PyLong_Type.tp_name);
    7975           0 :                         return -1;
    7976             :                 }
    7977             :         }
    7978           0 :         return 0;
    7979             : }
    7980             : 
    7981           0 : static PyObject *py_package_PrimaryKerberosKey3_get_reserved2(PyObject *obj, void *closure)
    7982             : {
    7983           0 :         struct package_PrimaryKerberosKey3 *object = pytalloc_get_ptr(obj);
    7984           0 :         PyObject *py_reserved2;
    7985           0 :         py_reserved2 = PyLong_FromLong((uint16_t)(object->reserved2));
    7986           0 :         return py_reserved2;
    7987             : }
    7988             : 
    7989           0 : static int py_package_PrimaryKerberosKey3_set_reserved2(PyObject *py_obj, PyObject *value, void *closure)
    7990             : {
    7991           0 :         struct package_PrimaryKerberosKey3 *object = pytalloc_get_ptr(py_obj);
    7992           0 :         if (value == NULL) {
    7993           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved2");
    7994           0 :                 return -1;
    7995             :         }
    7996             :         {
    7997           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved2));
    7998           0 :                 if (PyLong_Check(value)) {
    7999           0 :                         unsigned long long test_var;
    8000           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8001           0 :                         if (PyErr_Occurred() != NULL) {
    8002           0 :                                 return -1;
    8003             :                         }
    8004           0 :                         if (test_var > uint_max) {
    8005           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8006             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8007           0 :                                 return -1;
    8008             :                         }
    8009           0 :                         object->reserved2 = test_var;
    8010             :                 } else {
    8011           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8012             :                           PyLong_Type.tp_name);
    8013           0 :                         return -1;
    8014             :                 }
    8015             :         }
    8016           0 :         return 0;
    8017             : }
    8018             : 
    8019           0 : static PyObject *py_package_PrimaryKerberosKey3_get_reserved3(PyObject *obj, void *closure)
    8020             : {
    8021           0 :         struct package_PrimaryKerberosKey3 *object = pytalloc_get_ptr(obj);
    8022           0 :         PyObject *py_reserved3;
    8023           0 :         py_reserved3 = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved3));
    8024           0 :         return py_reserved3;
    8025             : }
    8026             : 
    8027           0 : static int py_package_PrimaryKerberosKey3_set_reserved3(PyObject *py_obj, PyObject *value, void *closure)
    8028             : {
    8029           0 :         struct package_PrimaryKerberosKey3 *object = pytalloc_get_ptr(py_obj);
    8030           0 :         if (value == NULL) {
    8031           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved3");
    8032           0 :                 return -1;
    8033             :         }
    8034             :         {
    8035           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved3));
    8036           0 :                 if (PyLong_Check(value)) {
    8037           0 :                         unsigned long long test_var;
    8038           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8039           0 :                         if (PyErr_Occurred() != NULL) {
    8040           0 :                                 return -1;
    8041             :                         }
    8042           0 :                         if (test_var > uint_max) {
    8043           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8044             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8045           0 :                                 return -1;
    8046             :                         }
    8047           0 :                         object->reserved3 = test_var;
    8048             :                 } else {
    8049           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8050             :                           PyLong_Type.tp_name);
    8051           0 :                         return -1;
    8052             :                 }
    8053             :         }
    8054           0 :         return 0;
    8055             : }
    8056             : 
    8057           0 : static PyObject *py_package_PrimaryKerberosKey3_get_keytype(PyObject *obj, void *closure)
    8058             : {
    8059           0 :         struct package_PrimaryKerberosKey3 *object = pytalloc_get_ptr(obj);
    8060           0 :         PyObject *py_keytype;
    8061           0 :         py_keytype = PyLong_FromUnsignedLongLong((uint32_t)(object->keytype));
    8062           0 :         return py_keytype;
    8063             : }
    8064             : 
    8065           0 : static int py_package_PrimaryKerberosKey3_set_keytype(PyObject *py_obj, PyObject *value, void *closure)
    8066             : {
    8067           0 :         struct package_PrimaryKerberosKey3 *object = pytalloc_get_ptr(py_obj);
    8068           0 :         if (value == NULL) {
    8069           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->keytype");
    8070           0 :                 return -1;
    8071             :         }
    8072             :         {
    8073           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->keytype));
    8074           0 :                 if (PyLong_Check(value)) {
    8075           0 :                         unsigned long long test_var;
    8076           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8077           0 :                         if (PyErr_Occurred() != NULL) {
    8078           0 :                                 return -1;
    8079             :                         }
    8080           0 :                         if (test_var > uint_max) {
    8081           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8082             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8083           0 :                                 return -1;
    8084             :                         }
    8085           0 :                         object->keytype = test_var;
    8086             :                 } else {
    8087           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8088             :                           PyLong_Type.tp_name);
    8089           0 :                         return -1;
    8090             :                 }
    8091             :         }
    8092           0 :         return 0;
    8093             : }
    8094             : 
    8095           0 : static PyObject *py_package_PrimaryKerberosKey3_get_value_len(PyObject *obj, void *closure)
    8096             : {
    8097           0 :         struct package_PrimaryKerberosKey3 *object = pytalloc_get_ptr(obj);
    8098           0 :         PyObject *py_value_len;
    8099           0 :         py_value_len = PyLong_FromUnsignedLongLong((uint32_t)(object->value_len));
    8100           0 :         return py_value_len;
    8101             : }
    8102             : 
    8103           0 : static int py_package_PrimaryKerberosKey3_set_value_len(PyObject *py_obj, PyObject *value, void *closure)
    8104             : {
    8105           0 :         struct package_PrimaryKerberosKey3 *object = pytalloc_get_ptr(py_obj);
    8106           0 :         if (value == NULL) {
    8107           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->value_len");
    8108           0 :                 return -1;
    8109             :         }
    8110             :         {
    8111           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->value_len));
    8112           0 :                 if (PyLong_Check(value)) {
    8113           0 :                         unsigned long long test_var;
    8114           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8115           0 :                         if (PyErr_Occurred() != NULL) {
    8116           0 :                                 return -1;
    8117             :                         }
    8118           0 :                         if (test_var > uint_max) {
    8119           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8120             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8121           0 :                                 return -1;
    8122             :                         }
    8123           0 :                         object->value_len = test_var;
    8124             :                 } else {
    8125           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8126             :                           PyLong_Type.tp_name);
    8127           0 :                         return -1;
    8128             :                 }
    8129             :         }
    8130           0 :         return 0;
    8131             : }
    8132             : 
    8133           0 : static PyObject *py_package_PrimaryKerberosKey3_get_value(PyObject *obj, void *closure)
    8134             : {
    8135           0 :         struct package_PrimaryKerberosKey3 *object = pytalloc_get_ptr(obj);
    8136           0 :         PyObject *py_value;
    8137           0 :         if (object->value == NULL) {
    8138           0 :                 Py_RETURN_NONE;
    8139             :         }
    8140           0 :         if (object->value == NULL) {
    8141           0 :                 py_value = Py_None;
    8142           0 :                 Py_INCREF(py_value);
    8143             :         } else {
    8144           0 :                 py_value = PyBytes_FromStringAndSize((char *)(*object->value).data, (*object->value).length);
    8145             :         }
    8146           0 :         return py_value;
    8147             : }
    8148             : 
    8149           0 : static int py_package_PrimaryKerberosKey3_set_value(PyObject *py_obj, PyObject *value, void *closure)
    8150             : {
    8151           0 :         struct package_PrimaryKerberosKey3 *object = pytalloc_get_ptr(py_obj);
    8152           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->value));
    8153           0 :         if (value == NULL) {
    8154           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->value");
    8155           0 :                 return -1;
    8156             :         }
    8157           0 :         if (value == Py_None) {
    8158           0 :                 object->value = NULL;
    8159             :         } else {
    8160           0 :                 object->value = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->value);
    8161           0 :                 if (object->value == NULL) {
    8162           0 :                         PyErr_NoMemory();
    8163           0 :                         return -1;
    8164             :                 }
    8165           0 :                 *object->value = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    8166             :         }
    8167           0 :         return 0;
    8168             : }
    8169             : 
    8170             : static PyGetSetDef py_package_PrimaryKerberosKey3_getsetters[] = {
    8171             :         {
    8172             :                 .name = discard_const_p(char, "reserved1"),
    8173             :                 .get = py_package_PrimaryKerberosKey3_get_reserved1,
    8174             :                 .set = py_package_PrimaryKerberosKey3_set_reserved1,
    8175             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8176             :         },
    8177             :         {
    8178             :                 .name = discard_const_p(char, "reserved2"),
    8179             :                 .get = py_package_PrimaryKerberosKey3_get_reserved2,
    8180             :                 .set = py_package_PrimaryKerberosKey3_set_reserved2,
    8181             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8182             :         },
    8183             :         {
    8184             :                 .name = discard_const_p(char, "reserved3"),
    8185             :                 .get = py_package_PrimaryKerberosKey3_get_reserved3,
    8186             :                 .set = py_package_PrimaryKerberosKey3_set_reserved3,
    8187             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8188             :         },
    8189             :         {
    8190             :                 .name = discard_const_p(char, "keytype"),
    8191             :                 .get = py_package_PrimaryKerberosKey3_get_keytype,
    8192             :                 .set = py_package_PrimaryKerberosKey3_set_keytype,
    8193             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8194             :         },
    8195             :         {
    8196             :                 .name = discard_const_p(char, "value_len"),
    8197             :                 .get = py_package_PrimaryKerberosKey3_get_value_len,
    8198             :                 .set = py_package_PrimaryKerberosKey3_set_value_len,
    8199             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8200             :         },
    8201             :         {
    8202             :                 .name = discard_const_p(char, "value"),
    8203             :                 .get = py_package_PrimaryKerberosKey3_get_value,
    8204             :                 .set = py_package_PrimaryKerberosKey3_set_value,
    8205             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    8206             :         },
    8207             :         { .name = NULL }
    8208             : };
    8209             : 
    8210           0 : static PyObject *py_package_PrimaryKerberosKey3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8211             : {
    8212           0 :         return pytalloc_new(struct package_PrimaryKerberosKey3, type);
    8213             : }
    8214             : 
    8215             : 
    8216             : static PyTypeObject package_PrimaryKerberosKey3_Type = {
    8217             :         PyVarObject_HEAD_INIT(NULL, 0)
    8218             :         .tp_name = "drsblobs.package_PrimaryKerberosKey3",
    8219             :         .tp_getset = py_package_PrimaryKerberosKey3_getsetters,
    8220             :         .tp_methods = NULL,
    8221             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8222             :         .tp_new = py_package_PrimaryKerberosKey3_new,
    8223             : };
    8224             : 
    8225             : 
    8226           0 : static PyObject *py_package_PrimaryKerberosCtr3_get_num_keys(PyObject *obj, void *closure)
    8227             : {
    8228           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(obj);
    8229           0 :         PyObject *py_num_keys;
    8230           0 :         py_num_keys = PyLong_FromLong((uint16_t)(object->num_keys));
    8231           0 :         return py_num_keys;
    8232             : }
    8233             : 
    8234           0 : static int py_package_PrimaryKerberosCtr3_set_num_keys(PyObject *py_obj, PyObject *value, void *closure)
    8235             : {
    8236           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(py_obj);
    8237           0 :         if (value == NULL) {
    8238           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_keys");
    8239           0 :                 return -1;
    8240             :         }
    8241             :         {
    8242           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_keys));
    8243           0 :                 if (PyLong_Check(value)) {
    8244           0 :                         unsigned long long test_var;
    8245           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8246           0 :                         if (PyErr_Occurred() != NULL) {
    8247           0 :                                 return -1;
    8248             :                         }
    8249           0 :                         if (test_var > uint_max) {
    8250           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8251             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8252           0 :                                 return -1;
    8253             :                         }
    8254           0 :                         object->num_keys = test_var;
    8255             :                 } else {
    8256           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8257             :                           PyLong_Type.tp_name);
    8258           0 :                         return -1;
    8259             :                 }
    8260             :         }
    8261           0 :         return 0;
    8262             : }
    8263             : 
    8264           0 : static PyObject *py_package_PrimaryKerberosCtr3_get_num_old_keys(PyObject *obj, void *closure)
    8265             : {
    8266           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(obj);
    8267           0 :         PyObject *py_num_old_keys;
    8268           0 :         py_num_old_keys = PyLong_FromLong((uint16_t)(object->num_old_keys));
    8269           0 :         return py_num_old_keys;
    8270             : }
    8271             : 
    8272           0 : static int py_package_PrimaryKerberosCtr3_set_num_old_keys(PyObject *py_obj, PyObject *value, void *closure)
    8273             : {
    8274           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(py_obj);
    8275           0 :         if (value == NULL) {
    8276           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_old_keys");
    8277           0 :                 return -1;
    8278             :         }
    8279             :         {
    8280           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_old_keys));
    8281           0 :                 if (PyLong_Check(value)) {
    8282           0 :                         unsigned long long test_var;
    8283           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8284           0 :                         if (PyErr_Occurred() != NULL) {
    8285           0 :                                 return -1;
    8286             :                         }
    8287           0 :                         if (test_var > uint_max) {
    8288           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8289             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8290           0 :                                 return -1;
    8291             :                         }
    8292           0 :                         object->num_old_keys = test_var;
    8293             :                 } else {
    8294           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8295             :                           PyLong_Type.tp_name);
    8296           0 :                         return -1;
    8297             :                 }
    8298             :         }
    8299           0 :         return 0;
    8300             : }
    8301             : 
    8302           0 : static PyObject *py_package_PrimaryKerberosCtr3_get_salt(PyObject *obj, void *closure)
    8303             : {
    8304           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(obj);
    8305           0 :         PyObject *py_salt;
    8306           0 :         py_salt = pytalloc_reference_ex(&package_PrimaryKerberosString_Type, pytalloc_get_mem_ctx(obj), &object->salt);
    8307           0 :         return py_salt;
    8308             : }
    8309             : 
    8310           0 : static int py_package_PrimaryKerberosCtr3_set_salt(PyObject *py_obj, PyObject *value, void *closure)
    8311             : {
    8312           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(py_obj);
    8313           0 :         if (value == NULL) {
    8314           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->salt");
    8315           0 :                 return -1;
    8316             :         }
    8317           0 :         PY_CHECK_TYPE(&package_PrimaryKerberosString_Type, value, return -1;);
    8318           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8319           0 :                 PyErr_NoMemory();
    8320           0 :                 return -1;
    8321             :         }
    8322           0 :         object->salt = *(struct package_PrimaryKerberosString *)pytalloc_get_ptr(value);
    8323           0 :         return 0;
    8324             : }
    8325             : 
    8326           0 : static PyObject *py_package_PrimaryKerberosCtr3_get_keys(PyObject *obj, void *closure)
    8327             : {
    8328           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(obj);
    8329           0 :         PyObject *py_keys;
    8330           0 :         py_keys = PyList_New(object->num_keys);
    8331           0 :         if (py_keys == NULL) {
    8332           0 :                 return NULL;
    8333             :         }
    8334             :         {
    8335             :                 int keys_cntr_0;
    8336           0 :                 for (keys_cntr_0 = 0; keys_cntr_0 < (object->num_keys); keys_cntr_0++) {
    8337           0 :                         PyObject *py_keys_0;
    8338           0 :                         py_keys_0 = pytalloc_reference_ex(&package_PrimaryKerberosKey3_Type, object->keys, &(object->keys)[keys_cntr_0]);
    8339           0 :                         PyList_SetItem(py_keys, keys_cntr_0, py_keys_0);
    8340             :                 }
    8341             :         }
    8342           0 :         return py_keys;
    8343             : }
    8344             : 
    8345           0 : static int py_package_PrimaryKerberosCtr3_set_keys(PyObject *py_obj, PyObject *value, void *closure)
    8346             : {
    8347           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(py_obj);
    8348           0 :         if (value == NULL) {
    8349           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->keys");
    8350           0 :                 return -1;
    8351             :         }
    8352           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    8353             :         {
    8354           0 :                 int keys_cntr_0;
    8355           0 :                 object->keys = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->keys, PyList_GET_SIZE(value));
    8356           0 :                 if (!object->keys) { return -1; }
    8357           0 :                 talloc_set_name_const(object->keys, "ARRAY: object->keys");
    8358           0 :                 for (keys_cntr_0 = 0; keys_cntr_0 < PyList_GET_SIZE(value); keys_cntr_0++) {
    8359           0 :                         if (PyList_GET_ITEM(value, keys_cntr_0) == NULL) {
    8360           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->keys)[keys_cntr_0]");
    8361           0 :                                 return -1;
    8362             :                         }
    8363           0 :                         PY_CHECK_TYPE(&package_PrimaryKerberosKey3_Type, PyList_GET_ITEM(value, keys_cntr_0), return -1;);
    8364           0 :                         if (talloc_reference(object->keys, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, keys_cntr_0))) == NULL) {
    8365           0 :                                 PyErr_NoMemory();
    8366           0 :                                 return -1;
    8367             :                         }
    8368           0 :                         (object->keys)[keys_cntr_0] = *(struct package_PrimaryKerberosKey3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, keys_cntr_0));
    8369             :                 }
    8370             :         }
    8371           0 :         return 0;
    8372             : }
    8373             : 
    8374           0 : static PyObject *py_package_PrimaryKerberosCtr3_get_old_keys(PyObject *obj, void *closure)
    8375             : {
    8376           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(obj);
    8377           0 :         PyObject *py_old_keys;
    8378           0 :         py_old_keys = PyList_New(object->num_old_keys);
    8379           0 :         if (py_old_keys == NULL) {
    8380           0 :                 return NULL;
    8381             :         }
    8382             :         {
    8383             :                 int old_keys_cntr_0;
    8384           0 :                 for (old_keys_cntr_0 = 0; old_keys_cntr_0 < (object->num_old_keys); old_keys_cntr_0++) {
    8385           0 :                         PyObject *py_old_keys_0;
    8386           0 :                         py_old_keys_0 = pytalloc_reference_ex(&package_PrimaryKerberosKey3_Type, object->old_keys, &(object->old_keys)[old_keys_cntr_0]);
    8387           0 :                         PyList_SetItem(py_old_keys, old_keys_cntr_0, py_old_keys_0);
    8388             :                 }
    8389             :         }
    8390           0 :         return py_old_keys;
    8391             : }
    8392             : 
    8393           0 : static int py_package_PrimaryKerberosCtr3_set_old_keys(PyObject *py_obj, PyObject *value, void *closure)
    8394             : {
    8395           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(py_obj);
    8396           0 :         if (value == NULL) {
    8397           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->old_keys");
    8398           0 :                 return -1;
    8399             :         }
    8400           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    8401             :         {
    8402           0 :                 int old_keys_cntr_0;
    8403           0 :                 object->old_keys = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->old_keys, PyList_GET_SIZE(value));
    8404           0 :                 if (!object->old_keys) { return -1; }
    8405           0 :                 talloc_set_name_const(object->old_keys, "ARRAY: object->old_keys");
    8406           0 :                 for (old_keys_cntr_0 = 0; old_keys_cntr_0 < PyList_GET_SIZE(value); old_keys_cntr_0++) {
    8407           0 :                         if (PyList_GET_ITEM(value, old_keys_cntr_0) == NULL) {
    8408           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->old_keys)[old_keys_cntr_0]");
    8409           0 :                                 return -1;
    8410             :                         }
    8411           0 :                         PY_CHECK_TYPE(&package_PrimaryKerberosKey3_Type, PyList_GET_ITEM(value, old_keys_cntr_0), return -1;);
    8412           0 :                         if (talloc_reference(object->old_keys, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, old_keys_cntr_0))) == NULL) {
    8413           0 :                                 PyErr_NoMemory();
    8414           0 :                                 return -1;
    8415             :                         }
    8416           0 :                         (object->old_keys)[old_keys_cntr_0] = *(struct package_PrimaryKerberosKey3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, old_keys_cntr_0));
    8417             :                 }
    8418             :         }
    8419           0 :         return 0;
    8420             : }
    8421             : 
    8422           0 : static PyObject *py_package_PrimaryKerberosCtr3_get_padding1(PyObject *obj, void *closure)
    8423             : {
    8424           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(obj);
    8425           0 :         PyObject *py_padding1;
    8426           0 :         py_padding1 = PyLong_FromUnsignedLongLong((uint32_t)(object->padding1));
    8427           0 :         return py_padding1;
    8428             : }
    8429             : 
    8430           0 : static int py_package_PrimaryKerberosCtr3_set_padding1(PyObject *py_obj, PyObject *value, void *closure)
    8431             : {
    8432           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(py_obj);
    8433           0 :         if (value == NULL) {
    8434           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->padding1");
    8435           0 :                 return -1;
    8436             :         }
    8437             :         {
    8438           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->padding1));
    8439           0 :                 if (PyLong_Check(value)) {
    8440           0 :                         unsigned long long test_var;
    8441           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8442           0 :                         if (PyErr_Occurred() != NULL) {
    8443           0 :                                 return -1;
    8444             :                         }
    8445           0 :                         if (test_var > uint_max) {
    8446           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8447             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8448           0 :                                 return -1;
    8449             :                         }
    8450           0 :                         object->padding1 = test_var;
    8451             :                 } else {
    8452           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8453             :                           PyLong_Type.tp_name);
    8454           0 :                         return -1;
    8455             :                 }
    8456             :         }
    8457           0 :         return 0;
    8458             : }
    8459             : 
    8460           0 : static PyObject *py_package_PrimaryKerberosCtr3_get_padding2(PyObject *obj, void *closure)
    8461             : {
    8462           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(obj);
    8463           0 :         PyObject *py_padding2;
    8464           0 :         py_padding2 = PyLong_FromUnsignedLongLong((uint32_t)(object->padding2));
    8465           0 :         return py_padding2;
    8466             : }
    8467             : 
    8468           0 : static int py_package_PrimaryKerberosCtr3_set_padding2(PyObject *py_obj, PyObject *value, void *closure)
    8469             : {
    8470           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(py_obj);
    8471           0 :         if (value == NULL) {
    8472           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->padding2");
    8473           0 :                 return -1;
    8474             :         }
    8475             :         {
    8476           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->padding2));
    8477           0 :                 if (PyLong_Check(value)) {
    8478           0 :                         unsigned long long test_var;
    8479           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8480           0 :                         if (PyErr_Occurred() != NULL) {
    8481           0 :                                 return -1;
    8482             :                         }
    8483           0 :                         if (test_var > uint_max) {
    8484           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8485             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8486           0 :                                 return -1;
    8487             :                         }
    8488           0 :                         object->padding2 = test_var;
    8489             :                 } else {
    8490           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8491             :                           PyLong_Type.tp_name);
    8492           0 :                         return -1;
    8493             :                 }
    8494             :         }
    8495           0 :         return 0;
    8496             : }
    8497             : 
    8498           0 : static PyObject *py_package_PrimaryKerberosCtr3_get_padding3(PyObject *obj, void *closure)
    8499             : {
    8500           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(obj);
    8501           0 :         PyObject *py_padding3;
    8502           0 :         py_padding3 = PyLong_FromUnsignedLongLong((uint32_t)(object->padding3));
    8503           0 :         return py_padding3;
    8504             : }
    8505             : 
    8506           0 : static int py_package_PrimaryKerberosCtr3_set_padding3(PyObject *py_obj, PyObject *value, void *closure)
    8507             : {
    8508           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(py_obj);
    8509           0 :         if (value == NULL) {
    8510           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->padding3");
    8511           0 :                 return -1;
    8512             :         }
    8513             :         {
    8514           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->padding3));
    8515           0 :                 if (PyLong_Check(value)) {
    8516           0 :                         unsigned long long test_var;
    8517           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8518           0 :                         if (PyErr_Occurred() != NULL) {
    8519           0 :                                 return -1;
    8520             :                         }
    8521           0 :                         if (test_var > uint_max) {
    8522           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8523             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8524           0 :                                 return -1;
    8525             :                         }
    8526           0 :                         object->padding3 = test_var;
    8527             :                 } else {
    8528           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8529             :                           PyLong_Type.tp_name);
    8530           0 :                         return -1;
    8531             :                 }
    8532             :         }
    8533           0 :         return 0;
    8534             : }
    8535             : 
    8536           0 : static PyObject *py_package_PrimaryKerberosCtr3_get_padding4(PyObject *obj, void *closure)
    8537             : {
    8538           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(obj);
    8539           0 :         PyObject *py_padding4;
    8540           0 :         py_padding4 = PyLong_FromUnsignedLongLong((uint32_t)(object->padding4));
    8541           0 :         return py_padding4;
    8542             : }
    8543             : 
    8544           0 : static int py_package_PrimaryKerberosCtr3_set_padding4(PyObject *py_obj, PyObject *value, void *closure)
    8545             : {
    8546           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(py_obj);
    8547           0 :         if (value == NULL) {
    8548           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->padding4");
    8549           0 :                 return -1;
    8550             :         }
    8551             :         {
    8552           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->padding4));
    8553           0 :                 if (PyLong_Check(value)) {
    8554           0 :                         unsigned long long test_var;
    8555           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8556           0 :                         if (PyErr_Occurred() != NULL) {
    8557           0 :                                 return -1;
    8558             :                         }
    8559           0 :                         if (test_var > uint_max) {
    8560           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8561             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8562           0 :                                 return -1;
    8563             :                         }
    8564           0 :                         object->padding4 = test_var;
    8565             :                 } else {
    8566           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8567             :                           PyLong_Type.tp_name);
    8568           0 :                         return -1;
    8569             :                 }
    8570             :         }
    8571           0 :         return 0;
    8572             : }
    8573             : 
    8574           0 : static PyObject *py_package_PrimaryKerberosCtr3_get_padding5(PyObject *obj, void *closure)
    8575             : {
    8576           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(obj);
    8577           0 :         PyObject *py_padding5;
    8578           0 :         py_padding5 = PyLong_FromUnsignedLongLong((uint32_t)(object->padding5));
    8579           0 :         return py_padding5;
    8580             : }
    8581             : 
    8582           0 : static int py_package_PrimaryKerberosCtr3_set_padding5(PyObject *py_obj, PyObject *value, void *closure)
    8583             : {
    8584           0 :         struct package_PrimaryKerberosCtr3 *object = pytalloc_get_ptr(py_obj);
    8585           0 :         if (value == NULL) {
    8586           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->padding5");
    8587           0 :                 return -1;
    8588             :         }
    8589             :         {
    8590           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->padding5));
    8591           0 :                 if (PyLong_Check(value)) {
    8592           0 :                         unsigned long long test_var;
    8593           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8594           0 :                         if (PyErr_Occurred() != NULL) {
    8595           0 :                                 return -1;
    8596             :                         }
    8597           0 :                         if (test_var > uint_max) {
    8598           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8599             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8600           0 :                                 return -1;
    8601             :                         }
    8602           0 :                         object->padding5 = test_var;
    8603             :                 } else {
    8604           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8605             :                           PyLong_Type.tp_name);
    8606           0 :                         return -1;
    8607             :                 }
    8608             :         }
    8609           0 :         return 0;
    8610             : }
    8611             : 
    8612             : static PyGetSetDef py_package_PrimaryKerberosCtr3_getsetters[] = {
    8613             :         {
    8614             :                 .name = discard_const_p(char, "num_keys"),
    8615             :                 .get = py_package_PrimaryKerberosCtr3_get_num_keys,
    8616             :                 .set = py_package_PrimaryKerberosCtr3_set_num_keys,
    8617             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8618             :         },
    8619             :         {
    8620             :                 .name = discard_const_p(char, "num_old_keys"),
    8621             :                 .get = py_package_PrimaryKerberosCtr3_get_num_old_keys,
    8622             :                 .set = py_package_PrimaryKerberosCtr3_set_num_old_keys,
    8623             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8624             :         },
    8625             :         {
    8626             :                 .name = discard_const_p(char, "salt"),
    8627             :                 .get = py_package_PrimaryKerberosCtr3_get_salt,
    8628             :                 .set = py_package_PrimaryKerberosCtr3_set_salt,
    8629             :                 .doc = discard_const_p(char, "PIDL-generated element of base type package_PrimaryKerberosString")
    8630             :         },
    8631             :         {
    8632             :                 .name = discard_const_p(char, "keys"),
    8633             :                 .get = py_package_PrimaryKerberosCtr3_get_keys,
    8634             :                 .set = py_package_PrimaryKerberosCtr3_set_keys,
    8635             :                 .doc = discard_const_p(char, "PIDL-generated element of base type package_PrimaryKerberosKey3")
    8636             :         },
    8637             :         {
    8638             :                 .name = discard_const_p(char, "old_keys"),
    8639             :                 .get = py_package_PrimaryKerberosCtr3_get_old_keys,
    8640             :                 .set = py_package_PrimaryKerberosCtr3_set_old_keys,
    8641             :                 .doc = discard_const_p(char, "PIDL-generated element of base type package_PrimaryKerberosKey3")
    8642             :         },
    8643             :         {
    8644             :                 .name = discard_const_p(char, "padding1"),
    8645             :                 .get = py_package_PrimaryKerberosCtr3_get_padding1,
    8646             :                 .set = py_package_PrimaryKerberosCtr3_set_padding1,
    8647             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8648             :         },
    8649             :         {
    8650             :                 .name = discard_const_p(char, "padding2"),
    8651             :                 .get = py_package_PrimaryKerberosCtr3_get_padding2,
    8652             :                 .set = py_package_PrimaryKerberosCtr3_set_padding2,
    8653             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8654             :         },
    8655             :         {
    8656             :                 .name = discard_const_p(char, "padding3"),
    8657             :                 .get = py_package_PrimaryKerberosCtr3_get_padding3,
    8658             :                 .set = py_package_PrimaryKerberosCtr3_set_padding3,
    8659             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8660             :         },
    8661             :         {
    8662             :                 .name = discard_const_p(char, "padding4"),
    8663             :                 .get = py_package_PrimaryKerberosCtr3_get_padding4,
    8664             :                 .set = py_package_PrimaryKerberosCtr3_set_padding4,
    8665             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8666             :         },
    8667             :         {
    8668             :                 .name = discard_const_p(char, "padding5"),
    8669             :                 .get = py_package_PrimaryKerberosCtr3_get_padding5,
    8670             :                 .set = py_package_PrimaryKerberosCtr3_set_padding5,
    8671             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8672             :         },
    8673             :         { .name = NULL }
    8674             : };
    8675             : 
    8676           0 : static PyObject *py_package_PrimaryKerberosCtr3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8677             : {
    8678           0 :         return pytalloc_new(struct package_PrimaryKerberosCtr3, type);
    8679             : }
    8680             : 
    8681             : 
    8682             : static PyTypeObject package_PrimaryKerberosCtr3_Type = {
    8683             :         PyVarObject_HEAD_INIT(NULL, 0)
    8684             :         .tp_name = "drsblobs.package_PrimaryKerberosCtr3",
    8685             :         .tp_getset = py_package_PrimaryKerberosCtr3_getsetters,
    8686             :         .tp_methods = NULL,
    8687             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8688             :         .tp_new = py_package_PrimaryKerberosCtr3_new,
    8689             : };
    8690             : 
    8691             : 
    8692           0 : static PyObject *py_package_PrimaryKerberosKey4_get_reserved1(PyObject *obj, void *closure)
    8693             : {
    8694           0 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(obj);
    8695           0 :         PyObject *py_reserved1;
    8696           0 :         py_reserved1 = PyLong_FromLong((uint16_t)(object->reserved1));
    8697           0 :         return py_reserved1;
    8698             : }
    8699             : 
    8700           0 : static int py_package_PrimaryKerberosKey4_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
    8701             : {
    8702           0 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(py_obj);
    8703           0 :         if (value == NULL) {
    8704           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved1");
    8705           0 :                 return -1;
    8706             :         }
    8707             :         {
    8708           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved1));
    8709           0 :                 if (PyLong_Check(value)) {
    8710           0 :                         unsigned long long test_var;
    8711           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8712           0 :                         if (PyErr_Occurred() != NULL) {
    8713           0 :                                 return -1;
    8714             :                         }
    8715           0 :                         if (test_var > uint_max) {
    8716           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8717             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8718           0 :                                 return -1;
    8719             :                         }
    8720           0 :                         object->reserved1 = test_var;
    8721             :                 } else {
    8722           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8723             :                           PyLong_Type.tp_name);
    8724           0 :                         return -1;
    8725             :                 }
    8726             :         }
    8727           0 :         return 0;
    8728             : }
    8729             : 
    8730           0 : static PyObject *py_package_PrimaryKerberosKey4_get_reserved2(PyObject *obj, void *closure)
    8731             : {
    8732           0 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(obj);
    8733           0 :         PyObject *py_reserved2;
    8734           0 :         py_reserved2 = PyLong_FromLong((uint16_t)(object->reserved2));
    8735           0 :         return py_reserved2;
    8736             : }
    8737             : 
    8738           0 : static int py_package_PrimaryKerberosKey4_set_reserved2(PyObject *py_obj, PyObject *value, void *closure)
    8739             : {
    8740           0 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(py_obj);
    8741           0 :         if (value == NULL) {
    8742           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved2");
    8743           0 :                 return -1;
    8744             :         }
    8745             :         {
    8746           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved2));
    8747           0 :                 if (PyLong_Check(value)) {
    8748           0 :                         unsigned long long test_var;
    8749           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8750           0 :                         if (PyErr_Occurred() != NULL) {
    8751           0 :                                 return -1;
    8752             :                         }
    8753           0 :                         if (test_var > uint_max) {
    8754           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8755             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8756           0 :                                 return -1;
    8757             :                         }
    8758           0 :                         object->reserved2 = test_var;
    8759             :                 } else {
    8760           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8761             :                           PyLong_Type.tp_name);
    8762           0 :                         return -1;
    8763             :                 }
    8764             :         }
    8765           0 :         return 0;
    8766             : }
    8767             : 
    8768           0 : static PyObject *py_package_PrimaryKerberosKey4_get_reserved3(PyObject *obj, void *closure)
    8769             : {
    8770           0 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(obj);
    8771           0 :         PyObject *py_reserved3;
    8772           0 :         py_reserved3 = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved3));
    8773           0 :         return py_reserved3;
    8774             : }
    8775             : 
    8776           0 : static int py_package_PrimaryKerberosKey4_set_reserved3(PyObject *py_obj, PyObject *value, void *closure)
    8777             : {
    8778           0 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(py_obj);
    8779           0 :         if (value == NULL) {
    8780           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved3");
    8781           0 :                 return -1;
    8782             :         }
    8783             :         {
    8784           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved3));
    8785           0 :                 if (PyLong_Check(value)) {
    8786           0 :                         unsigned long long test_var;
    8787           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8788           0 :                         if (PyErr_Occurred() != NULL) {
    8789           0 :                                 return -1;
    8790             :                         }
    8791           0 :                         if (test_var > uint_max) {
    8792           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8793             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8794           0 :                                 return -1;
    8795             :                         }
    8796           0 :                         object->reserved3 = test_var;
    8797             :                 } else {
    8798           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8799             :                           PyLong_Type.tp_name);
    8800           0 :                         return -1;
    8801             :                 }
    8802             :         }
    8803           0 :         return 0;
    8804             : }
    8805             : 
    8806           0 : static PyObject *py_package_PrimaryKerberosKey4_get_iteration_count(PyObject *obj, void *closure)
    8807             : {
    8808           0 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(obj);
    8809           0 :         PyObject *py_iteration_count;
    8810           0 :         py_iteration_count = PyLong_FromUnsignedLongLong((uint32_t)(object->iteration_count));
    8811           0 :         return py_iteration_count;
    8812             : }
    8813             : 
    8814           0 : static int py_package_PrimaryKerberosKey4_set_iteration_count(PyObject *py_obj, PyObject *value, void *closure)
    8815             : {
    8816           0 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(py_obj);
    8817           0 :         if (value == NULL) {
    8818           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->iteration_count");
    8819           0 :                 return -1;
    8820             :         }
    8821             :         {
    8822           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->iteration_count));
    8823           0 :                 if (PyLong_Check(value)) {
    8824           0 :                         unsigned long long test_var;
    8825           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8826           0 :                         if (PyErr_Occurred() != NULL) {
    8827           0 :                                 return -1;
    8828             :                         }
    8829           0 :                         if (test_var > uint_max) {
    8830           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8831             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8832           0 :                                 return -1;
    8833             :                         }
    8834           0 :                         object->iteration_count = test_var;
    8835             :                 } else {
    8836           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8837             :                           PyLong_Type.tp_name);
    8838           0 :                         return -1;
    8839             :                 }
    8840             :         }
    8841           0 :         return 0;
    8842             : }
    8843             : 
    8844       10654 : static PyObject *py_package_PrimaryKerberosKey4_get_keytype(PyObject *obj, void *closure)
    8845             : {
    8846       10654 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(obj);
    8847          12 :         PyObject *py_keytype;
    8848       10654 :         py_keytype = PyLong_FromUnsignedLongLong((uint32_t)(object->keytype));
    8849       10654 :         return py_keytype;
    8850             : }
    8851             : 
    8852           0 : static int py_package_PrimaryKerberosKey4_set_keytype(PyObject *py_obj, PyObject *value, void *closure)
    8853             : {
    8854           0 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(py_obj);
    8855           0 :         if (value == NULL) {
    8856           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->keytype");
    8857           0 :                 return -1;
    8858             :         }
    8859             :         {
    8860           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->keytype));
    8861           0 :                 if (PyLong_Check(value)) {
    8862           0 :                         unsigned long long test_var;
    8863           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8864           0 :                         if (PyErr_Occurred() != NULL) {
    8865           0 :                                 return -1;
    8866             :                         }
    8867           0 :                         if (test_var > uint_max) {
    8868           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8869             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8870           0 :                                 return -1;
    8871             :                         }
    8872           0 :                         object->keytype = test_var;
    8873             :                 } else {
    8874           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8875             :                           PyLong_Type.tp_name);
    8876           0 :                         return -1;
    8877             :                 }
    8878             :         }
    8879           0 :         return 0;
    8880             : }
    8881             : 
    8882           0 : static PyObject *py_package_PrimaryKerberosKey4_get_value_len(PyObject *obj, void *closure)
    8883             : {
    8884           0 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(obj);
    8885           0 :         PyObject *py_value_len;
    8886           0 :         py_value_len = PyLong_FromUnsignedLongLong((uint32_t)(object->value_len));
    8887           0 :         return py_value_len;
    8888             : }
    8889             : 
    8890           0 : static int py_package_PrimaryKerberosKey4_set_value_len(PyObject *py_obj, PyObject *value, void *closure)
    8891             : {
    8892           0 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(py_obj);
    8893           0 :         if (value == NULL) {
    8894           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->value_len");
    8895           0 :                 return -1;
    8896             :         }
    8897             :         {
    8898           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->value_len));
    8899           0 :                 if (PyLong_Check(value)) {
    8900           0 :                         unsigned long long test_var;
    8901           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8902           0 :                         if (PyErr_Occurred() != NULL) {
    8903           0 :                                 return -1;
    8904             :                         }
    8905           0 :                         if (test_var > uint_max) {
    8906           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8907             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8908           0 :                                 return -1;
    8909             :                         }
    8910           0 :                         object->value_len = test_var;
    8911             :                 } else {
    8912           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8913             :                           PyLong_Type.tp_name);
    8914           0 :                         return -1;
    8915             :                 }
    8916             :         }
    8917           0 :         return 0;
    8918             : }
    8919             : 
    8920        5282 : static PyObject *py_package_PrimaryKerberosKey4_get_value(PyObject *obj, void *closure)
    8921             : {
    8922        5282 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(obj);
    8923           0 :         PyObject *py_value;
    8924        5282 :         if (object->value == NULL) {
    8925           0 :                 Py_RETURN_NONE;
    8926             :         }
    8927        5282 :         if (object->value == NULL) {
    8928           0 :                 py_value = Py_None;
    8929           0 :                 Py_INCREF(py_value);
    8930             :         } else {
    8931        5282 :                 py_value = PyBytes_FromStringAndSize((char *)(*object->value).data, (*object->value).length);
    8932             :         }
    8933        5282 :         return py_value;
    8934             : }
    8935             : 
    8936           0 : static int py_package_PrimaryKerberosKey4_set_value(PyObject *py_obj, PyObject *value, void *closure)
    8937             : {
    8938           0 :         struct package_PrimaryKerberosKey4 *object = pytalloc_get_ptr(py_obj);
    8939           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->value));
    8940           0 :         if (value == NULL) {
    8941           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->value");
    8942           0 :                 return -1;
    8943             :         }
    8944           0 :         if (value == Py_None) {
    8945           0 :                 object->value = NULL;
    8946             :         } else {
    8947           0 :                 object->value = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->value);
    8948           0 :                 if (object->value == NULL) {
    8949           0 :                         PyErr_NoMemory();
    8950           0 :                         return -1;
    8951             :                 }
    8952           0 :                 *object->value = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    8953             :         }
    8954           0 :         return 0;
    8955             : }
    8956             : 
    8957             : static PyGetSetDef py_package_PrimaryKerberosKey4_getsetters[] = {
    8958             :         {
    8959             :                 .name = discard_const_p(char, "reserved1"),
    8960             :                 .get = py_package_PrimaryKerberosKey4_get_reserved1,
    8961             :                 .set = py_package_PrimaryKerberosKey4_set_reserved1,
    8962             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8963             :         },
    8964             :         {
    8965             :                 .name = discard_const_p(char, "reserved2"),
    8966             :                 .get = py_package_PrimaryKerberosKey4_get_reserved2,
    8967             :                 .set = py_package_PrimaryKerberosKey4_set_reserved2,
    8968             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8969             :         },
    8970             :         {
    8971             :                 .name = discard_const_p(char, "reserved3"),
    8972             :                 .get = py_package_PrimaryKerberosKey4_get_reserved3,
    8973             :                 .set = py_package_PrimaryKerberosKey4_set_reserved3,
    8974             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8975             :         },
    8976             :         {
    8977             :                 .name = discard_const_p(char, "iteration_count"),
    8978             :                 .get = py_package_PrimaryKerberosKey4_get_iteration_count,
    8979             :                 .set = py_package_PrimaryKerberosKey4_set_iteration_count,
    8980             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8981             :         },
    8982             :         {
    8983             :                 .name = discard_const_p(char, "keytype"),
    8984             :                 .get = py_package_PrimaryKerberosKey4_get_keytype,
    8985             :                 .set = py_package_PrimaryKerberosKey4_set_keytype,
    8986             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8987             :         },
    8988             :         {
    8989             :                 .name = discard_const_p(char, "value_len"),
    8990             :                 .get = py_package_PrimaryKerberosKey4_get_value_len,
    8991             :                 .set = py_package_PrimaryKerberosKey4_set_value_len,
    8992             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8993             :         },
    8994             :         {
    8995             :                 .name = discard_const_p(char, "value"),
    8996             :                 .get = py_package_PrimaryKerberosKey4_get_value,
    8997             :                 .set = py_package_PrimaryKerberosKey4_set_value,
    8998             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    8999             :         },
    9000             :         { .name = NULL }
    9001             : };
    9002             : 
    9003           0 : static PyObject *py_package_PrimaryKerberosKey4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9004             : {
    9005           0 :         return pytalloc_new(struct package_PrimaryKerberosKey4, type);
    9006             : }
    9007             : 
    9008             : 
    9009             : static PyTypeObject package_PrimaryKerberosKey4_Type = {
    9010             :         PyVarObject_HEAD_INIT(NULL, 0)
    9011             :         .tp_name = "drsblobs.package_PrimaryKerberosKey4",
    9012             :         .tp_getset = py_package_PrimaryKerberosKey4_getsetters,
    9013             :         .tp_methods = NULL,
    9014             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9015             :         .tp_new = py_package_PrimaryKerberosKey4_new,
    9016             : };
    9017             : 
    9018             : 
    9019           0 : static PyObject *py_package_PrimaryKerberosCtr4_get_num_keys(PyObject *obj, void *closure)
    9020             : {
    9021           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(obj);
    9022           0 :         PyObject *py_num_keys;
    9023           0 :         py_num_keys = PyLong_FromLong((uint16_t)(object->num_keys));
    9024           0 :         return py_num_keys;
    9025             : }
    9026             : 
    9027           0 : static int py_package_PrimaryKerberosCtr4_set_num_keys(PyObject *py_obj, PyObject *value, void *closure)
    9028             : {
    9029           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(py_obj);
    9030           0 :         if (value == NULL) {
    9031           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_keys");
    9032           0 :                 return -1;
    9033             :         }
    9034             :         {
    9035           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_keys));
    9036           0 :                 if (PyLong_Check(value)) {
    9037           0 :                         unsigned long long test_var;
    9038           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9039           0 :                         if (PyErr_Occurred() != NULL) {
    9040           0 :                                 return -1;
    9041             :                         }
    9042           0 :                         if (test_var > uint_max) {
    9043           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9044             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9045           0 :                                 return -1;
    9046             :                         }
    9047           0 :                         object->num_keys = test_var;
    9048             :                 } else {
    9049           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9050             :                           PyLong_Type.tp_name);
    9051           0 :                         return -1;
    9052             :                 }
    9053             :         }
    9054           0 :         return 0;
    9055             : }
    9056             : 
    9057           0 : static PyObject *py_package_PrimaryKerberosCtr4_get_num_service_keys(PyObject *obj, void *closure)
    9058             : {
    9059           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(obj);
    9060           0 :         PyObject *py_num_service_keys;
    9061           0 :         py_num_service_keys = PyLong_FromLong((uint16_t)(object->num_service_keys));
    9062           0 :         return py_num_service_keys;
    9063             : }
    9064             : 
    9065           0 : static int py_package_PrimaryKerberosCtr4_set_num_service_keys(PyObject *py_obj, PyObject *value, void *closure)
    9066             : {
    9067           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(py_obj);
    9068           0 :         if (value == NULL) {
    9069           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_service_keys");
    9070           0 :                 return -1;
    9071             :         }
    9072             :         {
    9073           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_service_keys));
    9074           0 :                 if (PyLong_Check(value)) {
    9075           0 :                         unsigned long long test_var;
    9076           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9077           0 :                         if (PyErr_Occurred() != NULL) {
    9078           0 :                                 return -1;
    9079             :                         }
    9080           0 :                         if (test_var > uint_max) {
    9081           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9082             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9083           0 :                                 return -1;
    9084             :                         }
    9085           0 :                         object->num_service_keys = test_var;
    9086             :                 } else {
    9087           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9088             :                           PyLong_Type.tp_name);
    9089           0 :                         return -1;
    9090             :                 }
    9091             :         }
    9092           0 :         return 0;
    9093             : }
    9094             : 
    9095           0 : static PyObject *py_package_PrimaryKerberosCtr4_get_num_old_keys(PyObject *obj, void *closure)
    9096             : {
    9097           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(obj);
    9098           0 :         PyObject *py_num_old_keys;
    9099           0 :         py_num_old_keys = PyLong_FromLong((uint16_t)(object->num_old_keys));
    9100           0 :         return py_num_old_keys;
    9101             : }
    9102             : 
    9103           0 : static int py_package_PrimaryKerberosCtr4_set_num_old_keys(PyObject *py_obj, PyObject *value, void *closure)
    9104             : {
    9105           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(py_obj);
    9106           0 :         if (value == NULL) {
    9107           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_old_keys");
    9108           0 :                 return -1;
    9109             :         }
    9110             :         {
    9111           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_old_keys));
    9112           0 :                 if (PyLong_Check(value)) {
    9113           0 :                         unsigned long long test_var;
    9114           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9115           0 :                         if (PyErr_Occurred() != NULL) {
    9116           0 :                                 return -1;
    9117             :                         }
    9118           0 :                         if (test_var > uint_max) {
    9119           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9120             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9121           0 :                                 return -1;
    9122             :                         }
    9123           0 :                         object->num_old_keys = test_var;
    9124             :                 } else {
    9125           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9126             :                           PyLong_Type.tp_name);
    9127           0 :                         return -1;
    9128             :                 }
    9129             :         }
    9130           0 :         return 0;
    9131             : }
    9132             : 
    9133           0 : static PyObject *py_package_PrimaryKerberosCtr4_get_num_older_keys(PyObject *obj, void *closure)
    9134             : {
    9135           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(obj);
    9136           0 :         PyObject *py_num_older_keys;
    9137           0 :         py_num_older_keys = PyLong_FromLong((uint16_t)(object->num_older_keys));
    9138           0 :         return py_num_older_keys;
    9139             : }
    9140             : 
    9141           0 : static int py_package_PrimaryKerberosCtr4_set_num_older_keys(PyObject *py_obj, PyObject *value, void *closure)
    9142             : {
    9143           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(py_obj);
    9144           0 :         if (value == NULL) {
    9145           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_older_keys");
    9146           0 :                 return -1;
    9147             :         }
    9148             :         {
    9149           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_older_keys));
    9150           0 :                 if (PyLong_Check(value)) {
    9151           0 :                         unsigned long long test_var;
    9152           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9153           0 :                         if (PyErr_Occurred() != NULL) {
    9154           0 :                                 return -1;
    9155             :                         }
    9156           0 :                         if (test_var > uint_max) {
    9157           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9158             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9159           0 :                                 return -1;
    9160             :                         }
    9161           0 :                         object->num_older_keys = test_var;
    9162             :                 } else {
    9163           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9164             :                           PyLong_Type.tp_name);
    9165           0 :                         return -1;
    9166             :                 }
    9167             :         }
    9168           0 :         return 0;
    9169             : }
    9170             : 
    9171         438 : static PyObject *py_package_PrimaryKerberosCtr4_get_salt(PyObject *obj, void *closure)
    9172             : {
    9173         438 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(obj);
    9174          12 :         PyObject *py_salt;
    9175         438 :         py_salt = pytalloc_reference_ex(&package_PrimaryKerberosString_Type, pytalloc_get_mem_ctx(obj), &object->salt);
    9176         438 :         return py_salt;
    9177             : }
    9178             : 
    9179           0 : static int py_package_PrimaryKerberosCtr4_set_salt(PyObject *py_obj, PyObject *value, void *closure)
    9180             : {
    9181           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(py_obj);
    9182           0 :         if (value == NULL) {
    9183           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->salt");
    9184           0 :                 return -1;
    9185             :         }
    9186           0 :         PY_CHECK_TYPE(&package_PrimaryKerberosString_Type, value, return -1;);
    9187           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9188           0 :                 PyErr_NoMemory();
    9189           0 :                 return -1;
    9190             :         }
    9191           0 :         object->salt = *(struct package_PrimaryKerberosString *)pytalloc_get_ptr(value);
    9192           0 :         return 0;
    9193             : }
    9194             : 
    9195           0 : static PyObject *py_package_PrimaryKerberosCtr4_get_default_iteration_count(PyObject *obj, void *closure)
    9196             : {
    9197           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(obj);
    9198           0 :         PyObject *py_default_iteration_count;
    9199           0 :         py_default_iteration_count = PyLong_FromUnsignedLongLong((uint32_t)(object->default_iteration_count));
    9200           0 :         return py_default_iteration_count;
    9201             : }
    9202             : 
    9203           0 : static int py_package_PrimaryKerberosCtr4_set_default_iteration_count(PyObject *py_obj, PyObject *value, void *closure)
    9204             : {
    9205           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(py_obj);
    9206           0 :         if (value == NULL) {
    9207           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->default_iteration_count");
    9208           0 :                 return -1;
    9209             :         }
    9210             :         {
    9211           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->default_iteration_count));
    9212           0 :                 if (PyLong_Check(value)) {
    9213           0 :                         unsigned long long test_var;
    9214           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9215           0 :                         if (PyErr_Occurred() != NULL) {
    9216           0 :                                 return -1;
    9217             :                         }
    9218           0 :                         if (test_var > uint_max) {
    9219           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9220             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9221           0 :                                 return -1;
    9222             :                         }
    9223           0 :                         object->default_iteration_count = test_var;
    9224             :                 } else {
    9225           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9226             :                           PyLong_Type.tp_name);
    9227           0 :                         return -1;
    9228             :                 }
    9229             :         }
    9230           0 :         return 0;
    9231             : }
    9232             : 
    9233        3430 : static PyObject *py_package_PrimaryKerberosCtr4_get_keys(PyObject *obj, void *closure)
    9234             : {
    9235        3430 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(obj);
    9236          24 :         PyObject *py_keys;
    9237        3430 :         py_keys = PyList_New(object->num_keys);
    9238        3430 :         if (py_keys == NULL) {
    9239           0 :                 return NULL;
    9240             :         }
    9241             :         {
    9242             :                 int keys_cntr_0;
    9243       17150 :                 for (keys_cntr_0 = 0; keys_cntr_0 < (object->num_keys); keys_cntr_0++) {
    9244          96 :                         PyObject *py_keys_0;
    9245       13720 :                         py_keys_0 = pytalloc_reference_ex(&package_PrimaryKerberosKey4_Type, object->keys, &(object->keys)[keys_cntr_0]);
    9246       13720 :                         PyList_SetItem(py_keys, keys_cntr_0, py_keys_0);
    9247             :                 }
    9248             :         }
    9249        3406 :         return py_keys;
    9250             : }
    9251             : 
    9252           0 : static int py_package_PrimaryKerberosCtr4_set_keys(PyObject *py_obj, PyObject *value, void *closure)
    9253             : {
    9254           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(py_obj);
    9255           0 :         if (value == NULL) {
    9256           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->keys");
    9257           0 :                 return -1;
    9258             :         }
    9259           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9260             :         {
    9261           0 :                 int keys_cntr_0;
    9262           0 :                 object->keys = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->keys, PyList_GET_SIZE(value));
    9263           0 :                 if (!object->keys) { return -1; }
    9264           0 :                 talloc_set_name_const(object->keys, "ARRAY: object->keys");
    9265           0 :                 for (keys_cntr_0 = 0; keys_cntr_0 < PyList_GET_SIZE(value); keys_cntr_0++) {
    9266           0 :                         if (PyList_GET_ITEM(value, keys_cntr_0) == NULL) {
    9267           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->keys)[keys_cntr_0]");
    9268           0 :                                 return -1;
    9269             :                         }
    9270           0 :                         PY_CHECK_TYPE(&package_PrimaryKerberosKey4_Type, PyList_GET_ITEM(value, keys_cntr_0), return -1;);
    9271           0 :                         if (talloc_reference(object->keys, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, keys_cntr_0))) == NULL) {
    9272           0 :                                 PyErr_NoMemory();
    9273           0 :                                 return -1;
    9274             :                         }
    9275           0 :                         (object->keys)[keys_cntr_0] = *(struct package_PrimaryKerberosKey4 *)pytalloc_get_ptr(PyList_GET_ITEM(value, keys_cntr_0));
    9276             :                 }
    9277             :         }
    9278           0 :         return 0;
    9279             : }
    9280             : 
    9281           0 : static PyObject *py_package_PrimaryKerberosCtr4_get_service_keys(PyObject *obj, void *closure)
    9282             : {
    9283           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(obj);
    9284           0 :         PyObject *py_service_keys;
    9285           0 :         py_service_keys = PyList_New(object->num_service_keys);
    9286           0 :         if (py_service_keys == NULL) {
    9287           0 :                 return NULL;
    9288             :         }
    9289             :         {
    9290             :                 int service_keys_cntr_0;
    9291           0 :                 for (service_keys_cntr_0 = 0; service_keys_cntr_0 < (object->num_service_keys); service_keys_cntr_0++) {
    9292           0 :                         PyObject *py_service_keys_0;
    9293           0 :                         py_service_keys_0 = pytalloc_reference_ex(&package_PrimaryKerberosKey4_Type, object->service_keys, &(object->service_keys)[service_keys_cntr_0]);
    9294           0 :                         PyList_SetItem(py_service_keys, service_keys_cntr_0, py_service_keys_0);
    9295             :                 }
    9296             :         }
    9297           0 :         return py_service_keys;
    9298             : }
    9299             : 
    9300           0 : static int py_package_PrimaryKerberosCtr4_set_service_keys(PyObject *py_obj, PyObject *value, void *closure)
    9301             : {
    9302           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(py_obj);
    9303           0 :         if (value == NULL) {
    9304           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->service_keys");
    9305           0 :                 return -1;
    9306             :         }
    9307           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9308             :         {
    9309           0 :                 int service_keys_cntr_0;
    9310           0 :                 object->service_keys = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->service_keys, PyList_GET_SIZE(value));
    9311           0 :                 if (!object->service_keys) { return -1; }
    9312           0 :                 talloc_set_name_const(object->service_keys, "ARRAY: object->service_keys");
    9313           0 :                 for (service_keys_cntr_0 = 0; service_keys_cntr_0 < PyList_GET_SIZE(value); service_keys_cntr_0++) {
    9314           0 :                         if (PyList_GET_ITEM(value, service_keys_cntr_0) == NULL) {
    9315           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->service_keys)[service_keys_cntr_0]");
    9316           0 :                                 return -1;
    9317             :                         }
    9318           0 :                         PY_CHECK_TYPE(&package_PrimaryKerberosKey4_Type, PyList_GET_ITEM(value, service_keys_cntr_0), return -1;);
    9319           0 :                         if (talloc_reference(object->service_keys, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, service_keys_cntr_0))) == NULL) {
    9320           0 :                                 PyErr_NoMemory();
    9321           0 :                                 return -1;
    9322             :                         }
    9323           0 :                         (object->service_keys)[service_keys_cntr_0] = *(struct package_PrimaryKerberosKey4 *)pytalloc_get_ptr(PyList_GET_ITEM(value, service_keys_cntr_0));
    9324             :                 }
    9325             :         }
    9326           0 :         return 0;
    9327             : }
    9328             : 
    9329           0 : static PyObject *py_package_PrimaryKerberosCtr4_get_old_keys(PyObject *obj, void *closure)
    9330             : {
    9331           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(obj);
    9332           0 :         PyObject *py_old_keys;
    9333           0 :         py_old_keys = PyList_New(object->num_old_keys);
    9334           0 :         if (py_old_keys == NULL) {
    9335           0 :                 return NULL;
    9336             :         }
    9337             :         {
    9338             :                 int old_keys_cntr_0;
    9339           0 :                 for (old_keys_cntr_0 = 0; old_keys_cntr_0 < (object->num_old_keys); old_keys_cntr_0++) {
    9340           0 :                         PyObject *py_old_keys_0;
    9341           0 :                         py_old_keys_0 = pytalloc_reference_ex(&package_PrimaryKerberosKey4_Type, object->old_keys, &(object->old_keys)[old_keys_cntr_0]);
    9342           0 :                         PyList_SetItem(py_old_keys, old_keys_cntr_0, py_old_keys_0);
    9343             :                 }
    9344             :         }
    9345           0 :         return py_old_keys;
    9346             : }
    9347             : 
    9348           0 : static int py_package_PrimaryKerberosCtr4_set_old_keys(PyObject *py_obj, PyObject *value, void *closure)
    9349             : {
    9350           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(py_obj);
    9351           0 :         if (value == NULL) {
    9352           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->old_keys");
    9353           0 :                 return -1;
    9354             :         }
    9355           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9356             :         {
    9357           0 :                 int old_keys_cntr_0;
    9358           0 :                 object->old_keys = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->old_keys, PyList_GET_SIZE(value));
    9359           0 :                 if (!object->old_keys) { return -1; }
    9360           0 :                 talloc_set_name_const(object->old_keys, "ARRAY: object->old_keys");
    9361           0 :                 for (old_keys_cntr_0 = 0; old_keys_cntr_0 < PyList_GET_SIZE(value); old_keys_cntr_0++) {
    9362           0 :                         if (PyList_GET_ITEM(value, old_keys_cntr_0) == NULL) {
    9363           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->old_keys)[old_keys_cntr_0]");
    9364           0 :                                 return -1;
    9365             :                         }
    9366           0 :                         PY_CHECK_TYPE(&package_PrimaryKerberosKey4_Type, PyList_GET_ITEM(value, old_keys_cntr_0), return -1;);
    9367           0 :                         if (talloc_reference(object->old_keys, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, old_keys_cntr_0))) == NULL) {
    9368           0 :                                 PyErr_NoMemory();
    9369           0 :                                 return -1;
    9370             :                         }
    9371           0 :                         (object->old_keys)[old_keys_cntr_0] = *(struct package_PrimaryKerberosKey4 *)pytalloc_get_ptr(PyList_GET_ITEM(value, old_keys_cntr_0));
    9372             :                 }
    9373             :         }
    9374           0 :         return 0;
    9375             : }
    9376             : 
    9377           0 : static PyObject *py_package_PrimaryKerberosCtr4_get_older_keys(PyObject *obj, void *closure)
    9378             : {
    9379           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(obj);
    9380           0 :         PyObject *py_older_keys;
    9381           0 :         py_older_keys = PyList_New(object->num_older_keys);
    9382           0 :         if (py_older_keys == NULL) {
    9383           0 :                 return NULL;
    9384             :         }
    9385             :         {
    9386             :                 int older_keys_cntr_0;
    9387           0 :                 for (older_keys_cntr_0 = 0; older_keys_cntr_0 < (object->num_older_keys); older_keys_cntr_0++) {
    9388           0 :                         PyObject *py_older_keys_0;
    9389           0 :                         py_older_keys_0 = pytalloc_reference_ex(&package_PrimaryKerberosKey4_Type, object->older_keys, &(object->older_keys)[older_keys_cntr_0]);
    9390           0 :                         PyList_SetItem(py_older_keys, older_keys_cntr_0, py_older_keys_0);
    9391             :                 }
    9392             :         }
    9393           0 :         return py_older_keys;
    9394             : }
    9395             : 
    9396           0 : static int py_package_PrimaryKerberosCtr4_set_older_keys(PyObject *py_obj, PyObject *value, void *closure)
    9397             : {
    9398           0 :         struct package_PrimaryKerberosCtr4 *object = pytalloc_get_ptr(py_obj);
    9399           0 :         if (value == NULL) {
    9400           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->older_keys");
    9401           0 :                 return -1;
    9402             :         }
    9403           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9404             :         {
    9405           0 :                 int older_keys_cntr_0;
    9406           0 :                 object->older_keys = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->older_keys, PyList_GET_SIZE(value));
    9407           0 :                 if (!object->older_keys) { return -1; }
    9408           0 :                 talloc_set_name_const(object->older_keys, "ARRAY: object->older_keys");
    9409           0 :                 for (older_keys_cntr_0 = 0; older_keys_cntr_0 < PyList_GET_SIZE(value); older_keys_cntr_0++) {
    9410           0 :                         if (PyList_GET_ITEM(value, older_keys_cntr_0) == NULL) {
    9411           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->older_keys)[older_keys_cntr_0]");
    9412           0 :                                 return -1;
    9413             :                         }
    9414           0 :                         PY_CHECK_TYPE(&package_PrimaryKerberosKey4_Type, PyList_GET_ITEM(value, older_keys_cntr_0), return -1;);
    9415           0 :                         if (talloc_reference(object->older_keys, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, older_keys_cntr_0))) == NULL) {
    9416           0 :                                 PyErr_NoMemory();
    9417           0 :                                 return -1;
    9418             :                         }
    9419           0 :                         (object->older_keys)[older_keys_cntr_0] = *(struct package_PrimaryKerberosKey4 *)pytalloc_get_ptr(PyList_GET_ITEM(value, older_keys_cntr_0));
    9420             :                 }
    9421             :         }
    9422           0 :         return 0;
    9423             : }
    9424             : 
    9425             : static PyGetSetDef py_package_PrimaryKerberosCtr4_getsetters[] = {
    9426             :         {
    9427             :                 .name = discard_const_p(char, "num_keys"),
    9428             :                 .get = py_package_PrimaryKerberosCtr4_get_num_keys,
    9429             :                 .set = py_package_PrimaryKerberosCtr4_set_num_keys,
    9430             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9431             :         },
    9432             :         {
    9433             :                 .name = discard_const_p(char, "num_service_keys"),
    9434             :                 .get = py_package_PrimaryKerberosCtr4_get_num_service_keys,
    9435             :                 .set = py_package_PrimaryKerberosCtr4_set_num_service_keys,
    9436             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9437             :         },
    9438             :         {
    9439             :                 .name = discard_const_p(char, "num_old_keys"),
    9440             :                 .get = py_package_PrimaryKerberosCtr4_get_num_old_keys,
    9441             :                 .set = py_package_PrimaryKerberosCtr4_set_num_old_keys,
    9442             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9443             :         },
    9444             :         {
    9445             :                 .name = discard_const_p(char, "num_older_keys"),
    9446             :                 .get = py_package_PrimaryKerberosCtr4_get_num_older_keys,
    9447             :                 .set = py_package_PrimaryKerberosCtr4_set_num_older_keys,
    9448             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9449             :         },
    9450             :         {
    9451             :                 .name = discard_const_p(char, "salt"),
    9452             :                 .get = py_package_PrimaryKerberosCtr4_get_salt,
    9453             :                 .set = py_package_PrimaryKerberosCtr4_set_salt,
    9454             :                 .doc = discard_const_p(char, "PIDL-generated element of base type package_PrimaryKerberosString")
    9455             :         },
    9456             :         {
    9457             :                 .name = discard_const_p(char, "default_iteration_count"),
    9458             :                 .get = py_package_PrimaryKerberosCtr4_get_default_iteration_count,
    9459             :                 .set = py_package_PrimaryKerberosCtr4_set_default_iteration_count,
    9460             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9461             :         },
    9462             :         {
    9463             :                 .name = discard_const_p(char, "keys"),
    9464             :                 .get = py_package_PrimaryKerberosCtr4_get_keys,
    9465             :                 .set = py_package_PrimaryKerberosCtr4_set_keys,
    9466             :                 .doc = discard_const_p(char, "PIDL-generated element of base type package_PrimaryKerberosKey4")
    9467             :         },
    9468             :         {
    9469             :                 .name = discard_const_p(char, "service_keys"),
    9470             :                 .get = py_package_PrimaryKerberosCtr4_get_service_keys,
    9471             :                 .set = py_package_PrimaryKerberosCtr4_set_service_keys,
    9472             :                 .doc = discard_const_p(char, "PIDL-generated element of base type package_PrimaryKerberosKey4")
    9473             :         },
    9474             :         {
    9475             :                 .name = discard_const_p(char, "old_keys"),
    9476             :                 .get = py_package_PrimaryKerberosCtr4_get_old_keys,
    9477             :                 .set = py_package_PrimaryKerberosCtr4_set_old_keys,
    9478             :                 .doc = discard_const_p(char, "PIDL-generated element of base type package_PrimaryKerberosKey4")
    9479             :         },
    9480             :         {
    9481             :                 .name = discard_const_p(char, "older_keys"),
    9482             :                 .get = py_package_PrimaryKerberosCtr4_get_older_keys,
    9483             :                 .set = py_package_PrimaryKerberosCtr4_set_older_keys,
    9484             :                 .doc = discard_const_p(char, "PIDL-generated element of base type package_PrimaryKerberosKey4")
    9485             :         },
    9486             :         { .name = NULL }
    9487             : };
    9488             : 
    9489           0 : static PyObject *py_package_PrimaryKerberosCtr4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9490             : {
    9491           0 :         return pytalloc_new(struct package_PrimaryKerberosCtr4, type);
    9492             : }
    9493             : 
    9494             : 
    9495             : static PyTypeObject package_PrimaryKerberosCtr4_Type = {
    9496             :         PyVarObject_HEAD_INIT(NULL, 0)
    9497             :         .tp_name = "drsblobs.package_PrimaryKerberosCtr4",
    9498             :         .tp_getset = py_package_PrimaryKerberosCtr4_getsetters,
    9499             :         .tp_methods = NULL,
    9500             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9501             :         .tp_new = py_package_PrimaryKerberosCtr4_new,
    9502             : };
    9503             : 
    9504        2992 : static PyObject *py_import_package_PrimaryKerberosCtr(TALLOC_CTX *mem_ctx, int level, union package_PrimaryKerberosCtr *in)
    9505             : {
    9506          12 :         PyObject *ret;
    9507             : 
    9508        2992 :         switch (level) {
    9509           0 :                 case 3:
    9510           0 :                         ret = pytalloc_reference_ex(&package_PrimaryKerberosCtr3_Type, mem_ctx, &in->ctr3);
    9511           0 :                         return ret;
    9512             : 
    9513        2992 :                 case 4:
    9514        2992 :                         ret = pytalloc_reference_ex(&package_PrimaryKerberosCtr4_Type, mem_ctx, &in->ctr4);
    9515        2992 :                         return ret;
    9516             : 
    9517             :         }
    9518           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    9519           0 :         return NULL;
    9520             : }
    9521             : 
    9522           0 : static union package_PrimaryKerberosCtr *py_export_package_PrimaryKerberosCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    9523             : {
    9524           0 :         union package_PrimaryKerberosCtr *ret = talloc_zero(mem_ctx, union package_PrimaryKerberosCtr);
    9525           0 :         switch (level) {
    9526           0 :                 case 3:
    9527           0 :                         if (in == NULL) {
    9528           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr3");
    9529           0 :                                 talloc_free(ret); return NULL;
    9530             :                         }
    9531           0 :                         PY_CHECK_TYPE(&package_PrimaryKerberosCtr3_Type, in, talloc_free(ret); return NULL;);
    9532           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    9533           0 :                                 PyErr_NoMemory();
    9534           0 :                                 talloc_free(ret); return NULL;
    9535             :                         }
    9536           0 :                         ret->ctr3 = *(struct package_PrimaryKerberosCtr3 *)pytalloc_get_ptr(in);
    9537           0 :                         break;
    9538             : 
    9539           0 :                 case 4:
    9540           0 :                         if (in == NULL) {
    9541           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr4");
    9542           0 :                                 talloc_free(ret); return NULL;
    9543             :                         }
    9544           0 :                         PY_CHECK_TYPE(&package_PrimaryKerberosCtr4_Type, in, talloc_free(ret); return NULL;);
    9545           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    9546           0 :                                 PyErr_NoMemory();
    9547           0 :                                 talloc_free(ret); return NULL;
    9548             :                         }
    9549           0 :                         ret->ctr4 = *(struct package_PrimaryKerberosCtr4 *)pytalloc_get_ptr(in);
    9550           0 :                         break;
    9551             : 
    9552           0 :                 default:
    9553           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
    9554           0 :                         talloc_free(ret);
    9555           0 :                         ret = NULL;
    9556             :         }
    9557             : 
    9558           0 :         return ret;
    9559             : }
    9560             : 
    9561        2992 : static PyObject *py_package_PrimaryKerberosCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9562             : {
    9563        2992 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    9564        2992 :         PyObject *mem_ctx_obj = NULL;
    9565        2992 :         TALLOC_CTX *mem_ctx = NULL;
    9566        2992 :         int level = 0;
    9567        2992 :         PyObject *in_obj = NULL;
    9568        2992 :         union package_PrimaryKerberosCtr *in = NULL;
    9569             : 
    9570        2992 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    9571             :                 discard_const_p(char *, kwnames),
    9572             :                 &mem_ctx_obj,
    9573             :                 &level,
    9574             :                 &in_obj)) {
    9575           0 :                 return NULL;
    9576             :         }
    9577        2992 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    9578        2992 :         if (mem_ctx == NULL) {
    9579           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    9580           0 :                 return NULL;
    9581             :         }
    9582        2992 :         in = (union package_PrimaryKerberosCtr *)pytalloc_get_ptr(in_obj);
    9583        2992 :         if (in == NULL) {
    9584           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union package_PrimaryKerberosCtr!");
    9585           0 :                 return NULL;
    9586             :         }
    9587             : 
    9588        2992 :         return py_import_package_PrimaryKerberosCtr(mem_ctx, level, in);
    9589             : }
    9590             : 
    9591           0 : static PyObject *py_package_PrimaryKerberosCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9592             : {
    9593           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    9594           0 :         PyObject *mem_ctx_obj = NULL;
    9595           0 :         TALLOC_CTX *mem_ctx = NULL;
    9596           0 :         int level = 0;
    9597           0 :         PyObject *in = NULL;
    9598           0 :         union package_PrimaryKerberosCtr *out = NULL;
    9599             : 
    9600           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    9601             :                 discard_const_p(char *, kwnames),
    9602             :                 &mem_ctx_obj,
    9603             :                 &level,
    9604             :                 &in)) {
    9605           0 :                 return NULL;
    9606             :         }
    9607           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    9608           0 :         if (mem_ctx == NULL) {
    9609           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    9610           0 :                 return NULL;
    9611             :         }
    9612             : 
    9613           0 :         out = py_export_package_PrimaryKerberosCtr(mem_ctx, level, in);
    9614           0 :         if (out == NULL) {
    9615           0 :                 return NULL;
    9616             :         }
    9617             : 
    9618           0 :         return pytalloc_GenericObject_reference(out);
    9619             : }
    9620             : 
    9621             : static PyMethodDef py_package_PrimaryKerberosCtr_methods[] = {
    9622             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_package_PrimaryKerberosCtr_import),
    9623             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    9624             :                 "T.__import__(mem_ctx, level, in) => ret." },
    9625             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_package_PrimaryKerberosCtr_export),
    9626             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    9627             :                 "T.__export__(mem_ctx, level, in) => ret." },
    9628             :         { NULL, NULL, 0, NULL }
    9629             : };
    9630             : 
    9631           0 : static PyObject *py_package_PrimaryKerberosCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9632             : {
    9633           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    9634           0 :         return NULL;
    9635             : }
    9636             : 
    9637             : 
    9638             : static PyTypeObject package_PrimaryKerberosCtr_Type = {
    9639             :         PyVarObject_HEAD_INIT(NULL, 0)
    9640             :         .tp_name = "drsblobs.package_PrimaryKerberosCtr",
    9641             :         .tp_getset = NULL,
    9642             :         .tp_methods = py_package_PrimaryKerberosCtr_methods,
    9643             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9644             :         .tp_new = py_package_PrimaryKerberosCtr_new,
    9645             : };
    9646             : 
    9647             : 
    9648         438 : static PyObject *py_package_PrimaryKerberosBlob_get_version(PyObject *obj, void *closure)
    9649             : {
    9650         438 :         struct package_PrimaryKerberosBlob *object = pytalloc_get_ptr(obj);
    9651          12 :         PyObject *py_version;
    9652         438 :         py_version = PyLong_FromLong((uint16_t)(object->version));
    9653         438 :         return py_version;
    9654             : }
    9655             : 
    9656           0 : static int py_package_PrimaryKerberosBlob_set_version(PyObject *py_obj, PyObject *value, void *closure)
    9657             : {
    9658           0 :         struct package_PrimaryKerberosBlob *object = pytalloc_get_ptr(py_obj);
    9659           0 :         if (value == NULL) {
    9660           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    9661           0 :                 return -1;
    9662             :         }
    9663             :         {
    9664           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    9665           0 :                 if (PyLong_Check(value)) {
    9666           0 :                         unsigned long long test_var;
    9667           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9668           0 :                         if (PyErr_Occurred() != NULL) {
    9669           0 :                                 return -1;
    9670             :                         }
    9671           0 :                         if (test_var > uint_max) {
    9672           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9673             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9674           0 :                                 return -1;
    9675             :                         }
    9676           0 :                         object->version = test_var;
    9677             :                 } else {
    9678           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9679             :                           PyLong_Type.tp_name);
    9680           0 :                         return -1;
    9681             :                 }
    9682             :         }
    9683           0 :         return 0;
    9684             : }
    9685             : 
    9686           0 : static PyObject *py_package_PrimaryKerberosBlob_get_flags(PyObject *obj, void *closure)
    9687             : {
    9688           0 :         struct package_PrimaryKerberosBlob *object = pytalloc_get_ptr(obj);
    9689           0 :         PyObject *py_flags;
    9690           0 :         py_flags = PyLong_FromLong((uint16_t)(object->flags));
    9691           0 :         return py_flags;
    9692             : }
    9693             : 
    9694           0 : static int py_package_PrimaryKerberosBlob_set_flags(PyObject *py_obj, PyObject *value, void *closure)
    9695             : {
    9696           0 :         struct package_PrimaryKerberosBlob *object = pytalloc_get_ptr(py_obj);
    9697           0 :         if (value == NULL) {
    9698           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
    9699           0 :                 return -1;
    9700             :         }
    9701             :         {
    9702           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
    9703           0 :                 if (PyLong_Check(value)) {
    9704           0 :                         unsigned long long test_var;
    9705           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9706           0 :                         if (PyErr_Occurred() != NULL) {
    9707           0 :                                 return -1;
    9708             :                         }
    9709           0 :                         if (test_var > uint_max) {
    9710           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9711             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9712           0 :                                 return -1;
    9713             :                         }
    9714           0 :                         object->flags = test_var;
    9715             :                 } else {
    9716           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9717             :                           PyLong_Type.tp_name);
    9718           0 :                         return -1;
    9719             :                 }
    9720             :         }
    9721           0 :         return 0;
    9722             : }
    9723             : 
    9724        2992 : static PyObject *py_package_PrimaryKerberosBlob_get_ctr(PyObject *obj, void *closure)
    9725             : {
    9726        2992 :         struct package_PrimaryKerberosBlob *object = pytalloc_get_ptr(obj);
    9727          12 :         PyObject *py_ctr;
    9728        2992 :         py_ctr = pyrpc_import_union(&package_PrimaryKerberosCtr_Type, pytalloc_get_mem_ctx(obj), object->version, &object->ctr, "union package_PrimaryKerberosCtr");
    9729        2992 :         if (py_ctr == NULL) {
    9730           0 :                 return NULL;
    9731             :         }
    9732        2980 :         return py_ctr;
    9733             : }
    9734             : 
    9735           0 : static int py_package_PrimaryKerberosBlob_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    9736             : {
    9737           0 :         struct package_PrimaryKerberosBlob *object = pytalloc_get_ptr(py_obj);
    9738           0 :         if (value == NULL) {
    9739           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
    9740           0 :                 return -1;
    9741             :         }
    9742             :         {
    9743           0 :                 union package_PrimaryKerberosCtr *ctr_switch_0;
    9744           0 :                 ctr_switch_0 = (union package_PrimaryKerberosCtr *)pyrpc_export_union(&package_PrimaryKerberosCtr_Type, pytalloc_get_mem_ctx(py_obj), object->version, value, "union package_PrimaryKerberosCtr");
    9745           0 :                 if (ctr_switch_0 == NULL) {
    9746           0 :                         return -1;
    9747             :                 }
    9748           0 :                 object->ctr = *ctr_switch_0;
    9749             :         }
    9750           0 :         return 0;
    9751             : }
    9752             : 
    9753             : static PyGetSetDef py_package_PrimaryKerberosBlob_getsetters[] = {
    9754             :         {
    9755             :                 .name = discard_const_p(char, "version"),
    9756             :                 .get = py_package_PrimaryKerberosBlob_get_version,
    9757             :                 .set = py_package_PrimaryKerberosBlob_set_version,
    9758             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9759             :         },
    9760             :         {
    9761             :                 .name = discard_const_p(char, "flags"),
    9762             :                 .get = py_package_PrimaryKerberosBlob_get_flags,
    9763             :                 .set = py_package_PrimaryKerberosBlob_set_flags,
    9764             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9765             :         },
    9766             :         {
    9767             :                 .name = discard_const_p(char, "ctr"),
    9768             :                 .get = py_package_PrimaryKerberosBlob_get_ctr,
    9769             :                 .set = py_package_PrimaryKerberosBlob_set_ctr,
    9770             :                 .doc = discard_const_p(char, "PIDL-generated element of base type package_PrimaryKerberosCtr")
    9771             :         },
    9772             :         { .name = NULL }
    9773             : };
    9774             : 
    9775        2992 : static PyObject *py_package_PrimaryKerberosBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9776             : {
    9777        2992 :         return pytalloc_new(struct package_PrimaryKerberosBlob, type);
    9778             : }
    9779             : 
    9780           0 : static PyObject *py_package_PrimaryKerberosBlob_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    9781             : {
    9782           0 :         struct package_PrimaryKerberosBlob *object = pytalloc_get_ptr(py_obj);
    9783           0 :         PyObject *ret = NULL;
    9784           0 :         DATA_BLOB blob;
    9785           0 :         enum ndr_err_code err;
    9786           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    9787           0 :         if (tmp_ctx == NULL) {
    9788           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9789           0 :                 return NULL;
    9790             :         }
    9791           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_package_PrimaryKerberosBlob);
    9792           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9793           0 :                 TALLOC_FREE(tmp_ctx);
    9794           0 :                 PyErr_SetNdrError(err);
    9795           0 :                 return NULL;
    9796             :         }
    9797             : 
    9798           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    9799           0 :         TALLOC_FREE(tmp_ctx);
    9800           0 :         return ret;
    9801             : }
    9802             : 
    9803        2992 : static PyObject *py_package_PrimaryKerberosBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9804             : {
    9805        2992 :         struct package_PrimaryKerberosBlob *object = pytalloc_get_ptr(py_obj);
    9806        2992 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    9807        2992 :         Py_ssize_t blob_length = 0;
    9808          12 :         enum ndr_err_code err;
    9809        2992 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    9810        2992 :         PyObject *allow_remaining_obj = NULL;
    9811        2992 :         bool allow_remaining = false;
    9812             : 
    9813        2992 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    9814             :                 discard_const_p(char *, kwnames),
    9815             :                 &blob.data, &blob_length,
    9816             :                 &allow_remaining_obj)) {
    9817           0 :                 return NULL;
    9818             :         }
    9819        2992 :         blob.length = blob_length;
    9820             : 
    9821        2992 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9822           0 :                 allow_remaining = true;
    9823             :         }
    9824             : 
    9825        2980 :         if (allow_remaining) {
    9826           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimaryKerberosBlob);
    9827             :         } else {
    9828        2992 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimaryKerberosBlob);
    9829             :         }
    9830        2992 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9831           0 :                 PyErr_SetNdrError(err);
    9832           0 :                 return NULL;
    9833             :         }
    9834             : 
    9835        2992 :         Py_RETURN_NONE;
    9836             : }
    9837             : 
    9838           0 : static PyObject *py_package_PrimaryKerberosBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9839             : {
    9840           0 :         struct package_PrimaryKerberosBlob *object = pytalloc_get_ptr(py_obj);
    9841           0 :         PyObject *ret;
    9842           0 :         char *retstr;
    9843             : 
    9844           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_package_PrimaryKerberosBlob, "package_PrimaryKerberosBlob", object);
    9845           0 :         ret = PyUnicode_FromString(retstr);
    9846           0 :         talloc_free(retstr);
    9847             : 
    9848           0 :         return ret;
    9849             : }
    9850             : 
    9851             : static PyMethodDef py_package_PrimaryKerberosBlob_methods[] = {
    9852             :         { "__ndr_pack__", (PyCFunction)py_package_PrimaryKerberosBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    9853             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_package_PrimaryKerberosBlob_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    9854             :         { "__ndr_print__", (PyCFunction)py_package_PrimaryKerberosBlob_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    9855             :         { NULL, NULL, 0, NULL }
    9856             : };
    9857             : 
    9858             : 
    9859             : static PyTypeObject package_PrimaryKerberosBlob_Type = {
    9860             :         PyVarObject_HEAD_INIT(NULL, 0)
    9861             :         .tp_name = "drsblobs.package_PrimaryKerberosBlob",
    9862             :         .tp_getset = py_package_PrimaryKerberosBlob_getsetters,
    9863             :         .tp_methods = py_package_PrimaryKerberosBlob_methods,
    9864             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9865             :         .tp_new = py_package_PrimaryKerberosBlob_new,
    9866             : };
    9867             : 
    9868             : 
    9869          14 : static PyObject *py_package_PrimaryCLEARTEXTBlob_get_cleartext(PyObject *obj, void *closure)
    9870             : {
    9871          14 :         struct package_PrimaryCLEARTEXTBlob *object = pytalloc_get_ptr(obj);
    9872           0 :         PyObject *py_cleartext;
    9873          14 :         py_cleartext = PyBytes_FromStringAndSize((char *)(object->cleartext).data, (object->cleartext).length);
    9874          14 :         return py_cleartext;
    9875             : }
    9876             : 
    9877           0 : static int py_package_PrimaryCLEARTEXTBlob_set_cleartext(PyObject *py_obj, PyObject *value, void *closure)
    9878             : {
    9879           0 :         struct package_PrimaryCLEARTEXTBlob *object = pytalloc_get_ptr(py_obj);
    9880           0 :         if (value == NULL) {
    9881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cleartext");
    9882           0 :                 return -1;
    9883             :         }
    9884           0 :         object->cleartext = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    9885           0 :         return 0;
    9886             : }
    9887             : 
    9888             : static PyGetSetDef py_package_PrimaryCLEARTEXTBlob_getsetters[] = {
    9889             :         {
    9890             :                 .name = discard_const_p(char, "cleartext"),
    9891             :                 .get = py_package_PrimaryCLEARTEXTBlob_get_cleartext,
    9892             :                 .set = py_package_PrimaryCLEARTEXTBlob_set_cleartext,
    9893             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    9894             :         },
    9895             :         { .name = NULL }
    9896             : };
    9897             : 
    9898          14 : static PyObject *py_package_PrimaryCLEARTEXTBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9899             : {
    9900          14 :         return pytalloc_new(struct package_PrimaryCLEARTEXTBlob, type);
    9901             : }
    9902             : 
    9903           0 : static PyObject *py_package_PrimaryCLEARTEXTBlob_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    9904             : {
    9905           0 :         struct package_PrimaryCLEARTEXTBlob *object = pytalloc_get_ptr(py_obj);
    9906           0 :         PyObject *ret = NULL;
    9907           0 :         DATA_BLOB blob;
    9908           0 :         enum ndr_err_code err;
    9909           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    9910           0 :         if (tmp_ctx == NULL) {
    9911           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9912           0 :                 return NULL;
    9913             :         }
    9914           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_package_PrimaryCLEARTEXTBlob);
    9915           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9916           0 :                 TALLOC_FREE(tmp_ctx);
    9917           0 :                 PyErr_SetNdrError(err);
    9918           0 :                 return NULL;
    9919             :         }
    9920             : 
    9921           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    9922           0 :         TALLOC_FREE(tmp_ctx);
    9923           0 :         return ret;
    9924             : }
    9925             : 
    9926          14 : static PyObject *py_package_PrimaryCLEARTEXTBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9927             : {
    9928          14 :         struct package_PrimaryCLEARTEXTBlob *object = pytalloc_get_ptr(py_obj);
    9929          14 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    9930          14 :         Py_ssize_t blob_length = 0;
    9931           0 :         enum ndr_err_code err;
    9932          14 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    9933          14 :         PyObject *allow_remaining_obj = NULL;
    9934          14 :         bool allow_remaining = false;
    9935             : 
    9936          14 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    9937             :                 discard_const_p(char *, kwnames),
    9938             :                 &blob.data, &blob_length,
    9939             :                 &allow_remaining_obj)) {
    9940           0 :                 return NULL;
    9941             :         }
    9942          14 :         blob.length = blob_length;
    9943             : 
    9944          14 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9945           0 :                 allow_remaining = true;
    9946             :         }
    9947             : 
    9948          14 :         if (allow_remaining) {
    9949           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimaryCLEARTEXTBlob);
    9950             :         } else {
    9951          14 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimaryCLEARTEXTBlob);
    9952             :         }
    9953          14 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9954           0 :                 PyErr_SetNdrError(err);
    9955           0 :                 return NULL;
    9956             :         }
    9957             : 
    9958          14 :         Py_RETURN_NONE;
    9959             : }
    9960             : 
    9961           0 : static PyObject *py_package_PrimaryCLEARTEXTBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9962             : {
    9963           0 :         struct package_PrimaryCLEARTEXTBlob *object = pytalloc_get_ptr(py_obj);
    9964           0 :         PyObject *ret;
    9965           0 :         char *retstr;
    9966             : 
    9967           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_package_PrimaryCLEARTEXTBlob, "package_PrimaryCLEARTEXTBlob", object);
    9968           0 :         ret = PyUnicode_FromString(retstr);
    9969           0 :         talloc_free(retstr);
    9970             : 
    9971           0 :         return ret;
    9972             : }
    9973             : 
    9974             : static PyMethodDef py_package_PrimaryCLEARTEXTBlob_methods[] = {
    9975             :         { "__ndr_pack__", (PyCFunction)py_package_PrimaryCLEARTEXTBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    9976             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_package_PrimaryCLEARTEXTBlob_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    9977             :         { "__ndr_print__", (PyCFunction)py_package_PrimaryCLEARTEXTBlob_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    9978             :         { NULL, NULL, 0, NULL }
    9979             : };
    9980             : 
    9981             : 
    9982             : static PyTypeObject package_PrimaryCLEARTEXTBlob_Type = {
    9983             :         PyVarObject_HEAD_INIT(NULL, 0)
    9984             :         .tp_name = "drsblobs.package_PrimaryCLEARTEXTBlob",
    9985             :         .tp_getset = py_package_PrimaryCLEARTEXTBlob_getsetters,
    9986             :         .tp_methods = py_package_PrimaryCLEARTEXTBlob_methods,
    9987             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9988             :         .tp_new = py_package_PrimaryCLEARTEXTBlob_new,
    9989             : };
    9990             : 
    9991             : 
    9992         725 : static PyObject *py_package_PrimaryWDigestHash_get_hash(PyObject *obj, void *closure)
    9993             : {
    9994         725 :         struct package_PrimaryWDigestHash *object = pytalloc_get_ptr(obj);
    9995           0 :         PyObject *py_hash;
    9996         725 :         py_hash = PyList_New(16);
    9997         725 :         if (py_hash == NULL) {
    9998           0 :                 return NULL;
    9999             :         }
   10000             :         {
   10001             :                 int hash_cntr_0;
   10002       12325 :                 for (hash_cntr_0 = 0; hash_cntr_0 < (16); hash_cntr_0++) {
   10003           0 :                         PyObject *py_hash_0;
   10004       11600 :                         py_hash_0 = PyLong_FromLong((uint16_t)((object->hash)[hash_cntr_0]));
   10005       11600 :                         PyList_SetItem(py_hash, hash_cntr_0, py_hash_0);
   10006             :                 }
   10007             :         }
   10008         725 :         return py_hash;
   10009             : }
   10010             : 
   10011           0 : static int py_package_PrimaryWDigestHash_set_hash(PyObject *py_obj, PyObject *value, void *closure)
   10012             : {
   10013           0 :         struct package_PrimaryWDigestHash *object = pytalloc_get_ptr(py_obj);
   10014           0 :         if (value == NULL) {
   10015           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->hash");
   10016           0 :                 return -1;
   10017             :         }
   10018           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   10019             :         {
   10020           0 :                 int hash_cntr_0;
   10021           0 :                 if (ARRAY_SIZE(object->hash) != PyList_GET_SIZE(value)) {
   10022           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->hash),  PyList_GET_SIZE(value));
   10023           0 :                         return -1;
   10024             :                 }
   10025           0 :                 for (hash_cntr_0 = 0; hash_cntr_0 < PyList_GET_SIZE(value); hash_cntr_0++) {
   10026           0 :                         if (PyList_GET_ITEM(value, hash_cntr_0) == NULL) {
   10027           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->hash)[hash_cntr_0]");
   10028           0 :                                 return -1;
   10029             :                         }
   10030             :                         {
   10031           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->hash)[hash_cntr_0]));
   10032           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, hash_cntr_0))) {
   10033           0 :                                         unsigned long long test_var;
   10034           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, hash_cntr_0));
   10035           0 :                                         if (PyErr_Occurred() != NULL) {
   10036           0 :                                                 return -1;
   10037             :                                         }
   10038           0 :                                         if (test_var > uint_max) {
   10039           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10040             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   10041           0 :                                                 return -1;
   10042             :                                         }
   10043           0 :                                         (object->hash)[hash_cntr_0] = test_var;
   10044             :                                 } else {
   10045           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10046             :                                           PyLong_Type.tp_name);
   10047           0 :                                         return -1;
   10048             :                                 }
   10049             :                         }
   10050             :                 }
   10051             :         }
   10052           0 :         return 0;
   10053             : }
   10054             : 
   10055             : static PyGetSetDef py_package_PrimaryWDigestHash_getsetters[] = {
   10056             :         {
   10057             :                 .name = discard_const_p(char, "hash"),
   10058             :                 .get = py_package_PrimaryWDigestHash_get_hash,
   10059             :                 .set = py_package_PrimaryWDigestHash_set_hash,
   10060             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10061             :         },
   10062             :         { .name = NULL }
   10063             : };
   10064             : 
   10065           0 : static PyObject *py_package_PrimaryWDigestHash_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10066             : {
   10067           0 :         return pytalloc_new(struct package_PrimaryWDigestHash, type);
   10068             : }
   10069             : 
   10070             : 
   10071             : static PyTypeObject package_PrimaryWDigestHash_Type = {
   10072             :         PyVarObject_HEAD_INIT(NULL, 0)
   10073             :         .tp_name = "drsblobs.package_PrimaryWDigestHash",
   10074             :         .tp_getset = py_package_PrimaryWDigestHash_getsetters,
   10075             :         .tp_methods = NULL,
   10076             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10077             :         .tp_new = py_package_PrimaryWDigestHash_new,
   10078             : };
   10079             : 
   10080             : 
   10081           0 : static PyObject *py_package_PrimaryWDigestBlob_get_unknown1(PyObject *obj, void *closure)
   10082             : {
   10083           0 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(obj);
   10084           0 :         PyObject *py_unknown1;
   10085           0 :         py_unknown1 = PyLong_FromLong((uint16_t)(object->unknown1));
   10086           0 :         return py_unknown1;
   10087             : }
   10088             : 
   10089           0 : static int py_package_PrimaryWDigestBlob_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   10090             : {
   10091           0 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(py_obj);
   10092           0 :         if (value == NULL) {
   10093           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   10094           0 :                 return -1;
   10095             :         }
   10096             :         {
   10097           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   10098           0 :                 if (PyLong_Check(value)) {
   10099           0 :                         unsigned long long test_var;
   10100           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10101           0 :                         if (PyErr_Occurred() != NULL) {
   10102           0 :                                 return -1;
   10103             :                         }
   10104           0 :                         if (test_var > uint_max) {
   10105           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10106             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10107           0 :                                 return -1;
   10108             :                         }
   10109           0 :                         object->unknown1 = test_var;
   10110             :                 } else {
   10111           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10112             :                           PyLong_Type.tp_name);
   10113           0 :                         return -1;
   10114             :                 }
   10115             :         }
   10116           0 :         return 0;
   10117             : }
   10118             : 
   10119           0 : static PyObject *py_package_PrimaryWDigestBlob_get_unknown2(PyObject *obj, void *closure)
   10120             : {
   10121           0 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(obj);
   10122           0 :         PyObject *py_unknown2;
   10123           0 :         py_unknown2 = PyLong_FromLong((uint16_t)(object->unknown2));
   10124           0 :         return py_unknown2;
   10125             : }
   10126             : 
   10127           0 : static int py_package_PrimaryWDigestBlob_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   10128             : {
   10129           0 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(py_obj);
   10130           0 :         if (value == NULL) {
   10131           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   10132           0 :                 return -1;
   10133             :         }
   10134             :         {
   10135           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   10136           0 :                 if (PyLong_Check(value)) {
   10137           0 :                         unsigned long long test_var;
   10138           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10139           0 :                         if (PyErr_Occurred() != NULL) {
   10140           0 :                                 return -1;
   10141             :                         }
   10142           0 :                         if (test_var > uint_max) {
   10143           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10144             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10145           0 :                                 return -1;
   10146             :                         }
   10147           0 :                         object->unknown2 = test_var;
   10148             :                 } else {
   10149           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10150             :                           PyLong_Type.tp_name);
   10151           0 :                         return -1;
   10152             :                 }
   10153             :         }
   10154           0 :         return 0;
   10155             : }
   10156             : 
   10157          22 : static PyObject *py_package_PrimaryWDigestBlob_get_num_hashes(PyObject *obj, void *closure)
   10158             : {
   10159          22 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(obj);
   10160           0 :         PyObject *py_num_hashes;
   10161          22 :         py_num_hashes = PyLong_FromLong((uint16_t)(object->num_hashes));
   10162          22 :         return py_num_hashes;
   10163             : }
   10164             : 
   10165           0 : static int py_package_PrimaryWDigestBlob_set_num_hashes(PyObject *py_obj, PyObject *value, void *closure)
   10166             : {
   10167           0 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(py_obj);
   10168           0 :         if (value == NULL) {
   10169           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_hashes");
   10170           0 :                 return -1;
   10171             :         }
   10172             :         {
   10173           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_hashes));
   10174           0 :                 if (PyLong_Check(value)) {
   10175           0 :                         unsigned long long test_var;
   10176           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10177           0 :                         if (PyErr_Occurred() != NULL) {
   10178           0 :                                 return -1;
   10179             :                         }
   10180           0 :                         if (test_var > uint_max) {
   10181           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10182             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10183           0 :                                 return -1;
   10184             :                         }
   10185           0 :                         object->num_hashes = test_var;
   10186             :                 } else {
   10187           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10188             :                           PyLong_Type.tp_name);
   10189           0 :                         return -1;
   10190             :                 }
   10191             :         }
   10192           0 :         return 0;
   10193             : }
   10194             : 
   10195           0 : static PyObject *py_package_PrimaryWDigestBlob_get_unknown3(PyObject *obj, void *closure)
   10196             : {
   10197           0 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(obj);
   10198           0 :         PyObject *py_unknown3;
   10199           0 :         py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown3));
   10200           0 :         return py_unknown3;
   10201             : }
   10202             : 
   10203           0 : static int py_package_PrimaryWDigestBlob_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   10204             : {
   10205           0 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(py_obj);
   10206           0 :         if (value == NULL) {
   10207           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   10208           0 :                 return -1;
   10209             :         }
   10210             :         {
   10211           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
   10212           0 :                 if (PyLong_Check(value)) {
   10213           0 :                         unsigned long long test_var;
   10214           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10215           0 :                         if (PyErr_Occurred() != NULL) {
   10216           0 :                                 return -1;
   10217             :                         }
   10218           0 :                         if (test_var > uint_max) {
   10219           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10220             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10221           0 :                                 return -1;
   10222             :                         }
   10223           0 :                         object->unknown3 = test_var;
   10224             :                 } else {
   10225           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10226             :                           PyLong_Type.tp_name);
   10227           0 :                         return -1;
   10228             :                 }
   10229             :         }
   10230           0 :         return 0;
   10231             : }
   10232             : 
   10233           0 : static PyObject *py_package_PrimaryWDigestBlob_get_uuknown4(PyObject *obj, void *closure)
   10234             : {
   10235           0 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(obj);
   10236           0 :         PyObject *py_uuknown4;
   10237           0 :         py_uuknown4 = PyLong_FromUnsignedLongLong(object->uuknown4);
   10238           0 :         return py_uuknown4;
   10239             : }
   10240             : 
   10241           0 : static int py_package_PrimaryWDigestBlob_set_uuknown4(PyObject *py_obj, PyObject *value, void *closure)
   10242             : {
   10243           0 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(py_obj);
   10244           0 :         if (value == NULL) {
   10245           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uuknown4");
   10246           0 :                 return -1;
   10247             :         }
   10248             :         {
   10249           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->uuknown4));
   10250           0 :                 if (PyLong_Check(value)) {
   10251           0 :                         unsigned long long test_var;
   10252           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10253           0 :                         if (PyErr_Occurred() != NULL) {
   10254           0 :                                 return -1;
   10255             :                         }
   10256           0 :                         if (test_var > uint_max) {
   10257           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10258             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10259           0 :                                 return -1;
   10260             :                         }
   10261           0 :                         object->uuknown4 = test_var;
   10262             :                 } else {
   10263           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10264             :                           PyLong_Type.tp_name);
   10265           0 :                         return -1;
   10266             :                 }
   10267             :         }
   10268           0 :         return 0;
   10269             : }
   10270             : 
   10271         725 : static PyObject *py_package_PrimaryWDigestBlob_get_hashes(PyObject *obj, void *closure)
   10272             : {
   10273         725 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(obj);
   10274           0 :         PyObject *py_hashes;
   10275         725 :         py_hashes = PyList_New(object->num_hashes);
   10276         725 :         if (py_hashes == NULL) {
   10277           0 :                 return NULL;
   10278             :         }
   10279             :         {
   10280             :                 int hashes_cntr_0;
   10281       21750 :                 for (hashes_cntr_0 = 0; hashes_cntr_0 < (object->num_hashes); hashes_cntr_0++) {
   10282           0 :                         PyObject *py_hashes_0;
   10283       21025 :                         py_hashes_0 = pytalloc_reference_ex(&package_PrimaryWDigestHash_Type, object->hashes, &(object->hashes)[hashes_cntr_0]);
   10284       21025 :                         PyList_SetItem(py_hashes, hashes_cntr_0, py_hashes_0);
   10285             :                 }
   10286             :         }
   10287         725 :         return py_hashes;
   10288             : }
   10289             : 
   10290           0 : static int py_package_PrimaryWDigestBlob_set_hashes(PyObject *py_obj, PyObject *value, void *closure)
   10291             : {
   10292           0 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(py_obj);
   10293           0 :         if (value == NULL) {
   10294           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->hashes");
   10295           0 :                 return -1;
   10296             :         }
   10297           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   10298             :         {
   10299           0 :                 int hashes_cntr_0;
   10300           0 :                 object->hashes = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->hashes, PyList_GET_SIZE(value));
   10301           0 :                 if (!object->hashes) { return -1; }
   10302           0 :                 talloc_set_name_const(object->hashes, "ARRAY: object->hashes");
   10303           0 :                 for (hashes_cntr_0 = 0; hashes_cntr_0 < PyList_GET_SIZE(value); hashes_cntr_0++) {
   10304           0 :                         if (PyList_GET_ITEM(value, hashes_cntr_0) == NULL) {
   10305           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->hashes)[hashes_cntr_0]");
   10306           0 :                                 return -1;
   10307             :                         }
   10308           0 :                         PY_CHECK_TYPE(&package_PrimaryWDigestHash_Type, PyList_GET_ITEM(value, hashes_cntr_0), return -1;);
   10309           0 :                         if (talloc_reference(object->hashes, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, hashes_cntr_0))) == NULL) {
   10310           0 :                                 PyErr_NoMemory();
   10311           0 :                                 return -1;
   10312             :                         }
   10313           0 :                         (object->hashes)[hashes_cntr_0] = *(struct package_PrimaryWDigestHash *)pytalloc_get_ptr(PyList_GET_ITEM(value, hashes_cntr_0));
   10314             :                 }
   10315             :         }
   10316           0 :         return 0;
   10317             : }
   10318             : 
   10319             : static PyGetSetDef py_package_PrimaryWDigestBlob_getsetters[] = {
   10320             :         {
   10321             :                 .name = discard_const_p(char, "unknown1"),
   10322             :                 .get = py_package_PrimaryWDigestBlob_get_unknown1,
   10323             :                 .set = py_package_PrimaryWDigestBlob_set_unknown1,
   10324             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   10325             :         },
   10326             :         {
   10327             :                 .name = discard_const_p(char, "unknown2"),
   10328             :                 .get = py_package_PrimaryWDigestBlob_get_unknown2,
   10329             :                 .set = py_package_PrimaryWDigestBlob_set_unknown2,
   10330             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10331             :         },
   10332             :         {
   10333             :                 .name = discard_const_p(char, "num_hashes"),
   10334             :                 .get = py_package_PrimaryWDigestBlob_get_num_hashes,
   10335             :                 .set = py_package_PrimaryWDigestBlob_set_num_hashes,
   10336             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10337             :         },
   10338             :         {
   10339             :                 .name = discard_const_p(char, "unknown3"),
   10340             :                 .get = py_package_PrimaryWDigestBlob_get_unknown3,
   10341             :                 .set = py_package_PrimaryWDigestBlob_set_unknown3,
   10342             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10343             :         },
   10344             :         {
   10345             :                 .name = discard_const_p(char, "uuknown4"),
   10346             :                 .get = py_package_PrimaryWDigestBlob_get_uuknown4,
   10347             :                 .set = py_package_PrimaryWDigestBlob_set_uuknown4,
   10348             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
   10349             :         },
   10350             :         {
   10351             :                 .name = discard_const_p(char, "hashes"),
   10352             :                 .get = py_package_PrimaryWDigestBlob_get_hashes,
   10353             :                 .set = py_package_PrimaryWDigestBlob_set_hashes,
   10354             :                 .doc = discard_const_p(char, "PIDL-generated element of base type package_PrimaryWDigestHash")
   10355             :         },
   10356             :         { .name = NULL }
   10357             : };
   10358             : 
   10359         109 : static PyObject *py_package_PrimaryWDigestBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10360             : {
   10361         109 :         return pytalloc_new(struct package_PrimaryWDigestBlob, type);
   10362             : }
   10363             : 
   10364           0 : static PyObject *py_package_PrimaryWDigestBlob_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   10365             : {
   10366           0 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(py_obj);
   10367           0 :         PyObject *ret = NULL;
   10368           0 :         DATA_BLOB blob;
   10369           0 :         enum ndr_err_code err;
   10370           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   10371           0 :         if (tmp_ctx == NULL) {
   10372           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10373           0 :                 return NULL;
   10374             :         }
   10375           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_package_PrimaryWDigestBlob);
   10376           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10377           0 :                 TALLOC_FREE(tmp_ctx);
   10378           0 :                 PyErr_SetNdrError(err);
   10379           0 :                 return NULL;
   10380             :         }
   10381             : 
   10382           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   10383           0 :         TALLOC_FREE(tmp_ctx);
   10384           0 :         return ret;
   10385             : }
   10386             : 
   10387         109 : static PyObject *py_package_PrimaryWDigestBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10388             : {
   10389         109 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(py_obj);
   10390         109 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   10391         109 :         Py_ssize_t blob_length = 0;
   10392           0 :         enum ndr_err_code err;
   10393         109 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   10394         109 :         PyObject *allow_remaining_obj = NULL;
   10395         109 :         bool allow_remaining = false;
   10396             : 
   10397         109 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   10398             :                 discard_const_p(char *, kwnames),
   10399             :                 &blob.data, &blob_length,
   10400             :                 &allow_remaining_obj)) {
   10401           0 :                 return NULL;
   10402             :         }
   10403         109 :         blob.length = blob_length;
   10404             : 
   10405         109 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10406           0 :                 allow_remaining = true;
   10407             :         }
   10408             : 
   10409         109 :         if (allow_remaining) {
   10410           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimaryWDigestBlob);
   10411             :         } else {
   10412         109 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimaryWDigestBlob);
   10413             :         }
   10414         109 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10415           0 :                 PyErr_SetNdrError(err);
   10416           0 :                 return NULL;
   10417             :         }
   10418             : 
   10419         109 :         Py_RETURN_NONE;
   10420             : }
   10421             : 
   10422           0 : static PyObject *py_package_PrimaryWDigestBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10423             : {
   10424           0 :         struct package_PrimaryWDigestBlob *object = pytalloc_get_ptr(py_obj);
   10425           0 :         PyObject *ret;
   10426           0 :         char *retstr;
   10427             : 
   10428           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_package_PrimaryWDigestBlob, "package_PrimaryWDigestBlob", object);
   10429           0 :         ret = PyUnicode_FromString(retstr);
   10430           0 :         talloc_free(retstr);
   10431             : 
   10432           0 :         return ret;
   10433             : }
   10434             : 
   10435             : static PyMethodDef py_package_PrimaryWDigestBlob_methods[] = {
   10436             :         { "__ndr_pack__", (PyCFunction)py_package_PrimaryWDigestBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   10437             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_package_PrimaryWDigestBlob_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   10438             :         { "__ndr_print__", (PyCFunction)py_package_PrimaryWDigestBlob_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   10439             :         { NULL, NULL, 0, NULL }
   10440             : };
   10441             : 
   10442             : 
   10443             : static PyTypeObject package_PrimaryWDigestBlob_Type = {
   10444             :         PyVarObject_HEAD_INIT(NULL, 0)
   10445             :         .tp_name = "drsblobs.package_PrimaryWDigestBlob",
   10446             :         .tp_getset = py_package_PrimaryWDigestBlob_getsetters,
   10447             :         .tp_methods = py_package_PrimaryWDigestBlob_methods,
   10448             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10449             :         .tp_new = py_package_PrimaryWDigestBlob_new,
   10450             : };
   10451             : 
   10452             : 
   10453           0 : static PyObject *py_package_PrimarySambaGPGBlob_get_gpg_blob(PyObject *obj, void *closure)
   10454             : {
   10455           0 :         struct package_PrimarySambaGPGBlob *object = pytalloc_get_ptr(obj);
   10456           0 :         PyObject *py_gpg_blob;
   10457           0 :         py_gpg_blob = PyBytes_FromStringAndSize((char *)(object->gpg_blob).data, (object->gpg_blob).length);
   10458           0 :         return py_gpg_blob;
   10459             : }
   10460             : 
   10461           0 : static int py_package_PrimarySambaGPGBlob_set_gpg_blob(PyObject *py_obj, PyObject *value, void *closure)
   10462             : {
   10463           0 :         struct package_PrimarySambaGPGBlob *object = pytalloc_get_ptr(py_obj);
   10464           0 :         if (value == NULL) {
   10465           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->gpg_blob");
   10466           0 :                 return -1;
   10467             :         }
   10468           0 :         object->gpg_blob = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   10469           0 :         return 0;
   10470             : }
   10471             : 
   10472             : static PyGetSetDef py_package_PrimarySambaGPGBlob_getsetters[] = {
   10473             :         {
   10474             :                 .name = discard_const_p(char, "gpg_blob"),
   10475             :                 .get = py_package_PrimarySambaGPGBlob_get_gpg_blob,
   10476             :                 .set = py_package_PrimarySambaGPGBlob_set_gpg_blob,
   10477             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   10478             :         },
   10479             :         { .name = NULL }
   10480             : };
   10481             : 
   10482           0 : static PyObject *py_package_PrimarySambaGPGBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10483             : {
   10484           0 :         return pytalloc_new(struct package_PrimarySambaGPGBlob, type);
   10485             : }
   10486             : 
   10487           0 : static PyObject *py_package_PrimarySambaGPGBlob_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   10488             : {
   10489           0 :         struct package_PrimarySambaGPGBlob *object = pytalloc_get_ptr(py_obj);
   10490           0 :         PyObject *ret = NULL;
   10491           0 :         DATA_BLOB blob;
   10492           0 :         enum ndr_err_code err;
   10493           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   10494           0 :         if (tmp_ctx == NULL) {
   10495           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10496           0 :                 return NULL;
   10497             :         }
   10498           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_package_PrimarySambaGPGBlob);
   10499           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10500           0 :                 TALLOC_FREE(tmp_ctx);
   10501           0 :                 PyErr_SetNdrError(err);
   10502           0 :                 return NULL;
   10503             :         }
   10504             : 
   10505           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   10506           0 :         TALLOC_FREE(tmp_ctx);
   10507           0 :         return ret;
   10508             : }
   10509             : 
   10510           0 : static PyObject *py_package_PrimarySambaGPGBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10511             : {
   10512           0 :         struct package_PrimarySambaGPGBlob *object = pytalloc_get_ptr(py_obj);
   10513           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   10514           0 :         Py_ssize_t blob_length = 0;
   10515           0 :         enum ndr_err_code err;
   10516           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   10517           0 :         PyObject *allow_remaining_obj = NULL;
   10518           0 :         bool allow_remaining = false;
   10519             : 
   10520           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   10521             :                 discard_const_p(char *, kwnames),
   10522             :                 &blob.data, &blob_length,
   10523             :                 &allow_remaining_obj)) {
   10524           0 :                 return NULL;
   10525             :         }
   10526           0 :         blob.length = blob_length;
   10527             : 
   10528           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10529           0 :                 allow_remaining = true;
   10530             :         }
   10531             : 
   10532           0 :         if (allow_remaining) {
   10533           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimarySambaGPGBlob);
   10534             :         } else {
   10535           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimarySambaGPGBlob);
   10536             :         }
   10537           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10538           0 :                 PyErr_SetNdrError(err);
   10539           0 :                 return NULL;
   10540             :         }
   10541             : 
   10542           0 :         Py_RETURN_NONE;
   10543             : }
   10544             : 
   10545           0 : static PyObject *py_package_PrimarySambaGPGBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10546             : {
   10547           0 :         struct package_PrimarySambaGPGBlob *object = pytalloc_get_ptr(py_obj);
   10548           0 :         PyObject *ret;
   10549           0 :         char *retstr;
   10550             : 
   10551           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_package_PrimarySambaGPGBlob, "package_PrimarySambaGPGBlob", object);
   10552           0 :         ret = PyUnicode_FromString(retstr);
   10553           0 :         talloc_free(retstr);
   10554             : 
   10555           0 :         return ret;
   10556             : }
   10557             : 
   10558             : static PyMethodDef py_package_PrimarySambaGPGBlob_methods[] = {
   10559             :         { "__ndr_pack__", (PyCFunction)py_package_PrimarySambaGPGBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   10560             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_package_PrimarySambaGPGBlob_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   10561             :         { "__ndr_print__", (PyCFunction)py_package_PrimarySambaGPGBlob_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   10562             :         { NULL, NULL, 0, NULL }
   10563             : };
   10564             : 
   10565             : 
   10566             : static PyTypeObject package_PrimarySambaGPGBlob_Type = {
   10567             :         PyVarObject_HEAD_INIT(NULL, 0)
   10568             :         .tp_name = "drsblobs.package_PrimarySambaGPGBlob",
   10569             :         .tp_getset = py_package_PrimarySambaGPGBlob_getsetters,
   10570             :         .tp_methods = py_package_PrimarySambaGPGBlob_methods,
   10571             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10572             :         .tp_new = py_package_PrimarySambaGPGBlob_new,
   10573             : };
   10574             : 
   10575             : 
   10576           0 : static PyObject *py_package_PrimaryUserPasswordValue_get_scheme_len(PyObject *obj, void *closure)
   10577             : {
   10578           0 :         struct package_PrimaryUserPasswordValue *object = pytalloc_get_ptr(obj);
   10579           0 :         PyObject *py_scheme_len;
   10580           0 :         py_scheme_len = PyLong_FromLong((uint16_t)(object->scheme_len));
   10581           0 :         return py_scheme_len;
   10582             : }
   10583             : 
   10584           0 : static int py_package_PrimaryUserPasswordValue_set_scheme_len(PyObject *py_obj, PyObject *value, void *closure)
   10585             : {
   10586           0 :         struct package_PrimaryUserPasswordValue *object = pytalloc_get_ptr(py_obj);
   10587           0 :         if (value == NULL) {
   10588           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->scheme_len");
   10589           0 :                 return -1;
   10590             :         }
   10591             :         {
   10592           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scheme_len));
   10593           0 :                 if (PyLong_Check(value)) {
   10594           0 :                         unsigned long long test_var;
   10595           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10596           0 :                         if (PyErr_Occurred() != NULL) {
   10597           0 :                                 return -1;
   10598             :                         }
   10599           0 :                         if (test_var > uint_max) {
   10600           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10601             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10602           0 :                                 return -1;
   10603             :                         }
   10604           0 :                         object->scheme_len = test_var;
   10605             :                 } else {
   10606           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10607             :                           PyLong_Type.tp_name);
   10608           0 :                         return -1;
   10609             :                 }
   10610             :         }
   10611           0 :         return 0;
   10612             : }
   10613             : 
   10614         607 : static PyObject *py_package_PrimaryUserPasswordValue_get_scheme(PyObject *obj, void *closure)
   10615             : {
   10616         607 :         struct package_PrimaryUserPasswordValue *object = pytalloc_get_ptr(obj);
   10617          73 :         PyObject *py_scheme;
   10618         607 :         if (object->scheme == NULL) {
   10619           0 :                 py_scheme = Py_None;
   10620           0 :                 Py_INCREF(py_scheme);
   10621             :         } else {
   10622         607 :                 py_scheme = PyUnicode_Decode(object->scheme, strlen(object->scheme), "utf-8", "ignore");
   10623             :         }
   10624         607 :         return py_scheme;
   10625             : }
   10626             : 
   10627           0 : static int py_package_PrimaryUserPasswordValue_set_scheme(PyObject *py_obj, PyObject *value, void *closure)
   10628             : {
   10629           0 :         struct package_PrimaryUserPasswordValue *object = pytalloc_get_ptr(py_obj);
   10630           0 :         if (value == NULL) {
   10631           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->scheme");
   10632           0 :                 return -1;
   10633             :         }
   10634             :         {
   10635           0 :                 const char *test_str;
   10636           0 :                 const char *talloc_str;
   10637           0 :                 PyObject *unicode = NULL;
   10638           0 :                 if (PyUnicode_Check(value)) {
   10639           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   10640           0 :                         if (unicode == NULL) {
   10641           0 :                                 return -1;
   10642             :                         }
   10643           0 :                         test_str = PyBytes_AS_STRING(unicode);
   10644           0 :                 } else if (PyBytes_Check(value)) {
   10645           0 :                         test_str = PyBytes_AS_STRING(value);
   10646             :                 } else {
   10647           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   10648           0 :                         return -1;
   10649             :                 }
   10650           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   10651           0 :                 if (unicode != NULL) {
   10652           0 :                         Py_DECREF(unicode);
   10653             :                 }
   10654           0 :                 if (talloc_str == NULL) {
   10655           0 :                         PyErr_NoMemory();
   10656           0 :                         return -1;
   10657             :                 }
   10658           0 :                 object->scheme = talloc_str;
   10659             :         }
   10660           0 :         return 0;
   10661             : }
   10662             : 
   10663           0 : static PyObject *py_package_PrimaryUserPasswordValue_get_value_len(PyObject *obj, void *closure)
   10664             : {
   10665           0 :         struct package_PrimaryUserPasswordValue *object = pytalloc_get_ptr(obj);
   10666           0 :         PyObject *py_value_len;
   10667           0 :         py_value_len = PyLong_FromUnsignedLongLong((uint32_t)(object->value_len));
   10668           0 :         return py_value_len;
   10669             : }
   10670             : 
   10671           0 : static int py_package_PrimaryUserPasswordValue_set_value_len(PyObject *py_obj, PyObject *value, void *closure)
   10672             : {
   10673           0 :         struct package_PrimaryUserPasswordValue *object = pytalloc_get_ptr(py_obj);
   10674           0 :         if (value == NULL) {
   10675           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->value_len");
   10676           0 :                 return -1;
   10677             :         }
   10678             :         {
   10679           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->value_len));
   10680           0 :                 if (PyLong_Check(value)) {
   10681           0 :                         unsigned long long test_var;
   10682           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10683           0 :                         if (PyErr_Occurred() != NULL) {
   10684           0 :                                 return -1;
   10685             :                         }
   10686           0 :                         if (test_var > uint_max) {
   10687           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10688             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10689           0 :                                 return -1;
   10690             :                         }
   10691           0 :                         object->value_len = test_var;
   10692             :                 } else {
   10693           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10694             :                           PyLong_Type.tp_name);
   10695           0 :                         return -1;
   10696             :                 }
   10697             :         }
   10698           0 :         return 0;
   10699             : }
   10700             : 
   10701         418 : static PyObject *py_package_PrimaryUserPasswordValue_get_value(PyObject *obj, void *closure)
   10702             : {
   10703         418 :         struct package_PrimaryUserPasswordValue *object = pytalloc_get_ptr(obj);
   10704          46 :         PyObject *py_value;
   10705         418 :         if (object->value == NULL) {
   10706           0 :                 Py_RETURN_NONE;
   10707             :         }
   10708         418 :         if (object->value == NULL) {
   10709           0 :                 py_value = Py_None;
   10710           0 :                 Py_INCREF(py_value);
   10711             :         } else {
   10712         418 :                 py_value = PyBytes_FromStringAndSize((char *)(*object->value).data, (*object->value).length);
   10713             :         }
   10714         418 :         return py_value;
   10715             : }
   10716             : 
   10717           0 : static int py_package_PrimaryUserPasswordValue_set_value(PyObject *py_obj, PyObject *value, void *closure)
   10718             : {
   10719           0 :         struct package_PrimaryUserPasswordValue *object = pytalloc_get_ptr(py_obj);
   10720           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->value));
   10721           0 :         if (value == NULL) {
   10722           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->value");
   10723           0 :                 return -1;
   10724             :         }
   10725           0 :         if (value == Py_None) {
   10726           0 :                 object->value = NULL;
   10727             :         } else {
   10728           0 :                 object->value = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->value);
   10729           0 :                 if (object->value == NULL) {
   10730           0 :                         PyErr_NoMemory();
   10731           0 :                         return -1;
   10732             :                 }
   10733           0 :                 *object->value = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   10734             :         }
   10735           0 :         return 0;
   10736             : }
   10737             : 
   10738             : static PyGetSetDef py_package_PrimaryUserPasswordValue_getsetters[] = {
   10739             :         {
   10740             :                 .name = discard_const_p(char, "scheme_len"),
   10741             :                 .get = py_package_PrimaryUserPasswordValue_get_scheme_len,
   10742             :                 .set = py_package_PrimaryUserPasswordValue_set_scheme_len,
   10743             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   10744             :         },
   10745             :         {
   10746             :                 .name = discard_const_p(char, "scheme"),
   10747             :                 .get = py_package_PrimaryUserPasswordValue_get_scheme,
   10748             :                 .set = py_package_PrimaryUserPasswordValue_set_scheme,
   10749             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10750             :         },
   10751             :         {
   10752             :                 .name = discard_const_p(char, "value_len"),
   10753             :                 .get = py_package_PrimaryUserPasswordValue_get_value_len,
   10754             :                 .set = py_package_PrimaryUserPasswordValue_set_value_len,
   10755             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10756             :         },
   10757             :         {
   10758             :                 .name = discard_const_p(char, "value"),
   10759             :                 .get = py_package_PrimaryUserPasswordValue_get_value,
   10760             :                 .set = py_package_PrimaryUserPasswordValue_set_value,
   10761             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   10762             :         },
   10763             :         { .name = NULL }
   10764             : };
   10765             : 
   10766           0 : static PyObject *py_package_PrimaryUserPasswordValue_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10767             : {
   10768           0 :         return pytalloc_new(struct package_PrimaryUserPasswordValue, type);
   10769             : }
   10770             : 
   10771             : 
   10772             : static PyTypeObject package_PrimaryUserPasswordValue_Type = {
   10773             :         PyVarObject_HEAD_INIT(NULL, 0)
   10774             :         .tp_name = "drsblobs.package_PrimaryUserPasswordValue",
   10775             :         .tp_getset = py_package_PrimaryUserPasswordValue_getsetters,
   10776             :         .tp_methods = NULL,
   10777             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10778             :         .tp_new = py_package_PrimaryUserPasswordValue_new,
   10779             : };
   10780             : 
   10781             : 
   10782         148 : static PyObject *py_package_PrimaryUserPasswordBlob_get_current_nt_hash(PyObject *obj, void *closure)
   10783             : {
   10784         148 :         struct package_PrimaryUserPasswordBlob *object = pytalloc_get_ptr(obj);
   10785          18 :         PyObject *py_current_nt_hash;
   10786         148 :         py_current_nt_hash = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->current_nt_hash);
   10787         148 :         return py_current_nt_hash;
   10788             : }
   10789             : 
   10790           0 : static int py_package_PrimaryUserPasswordBlob_set_current_nt_hash(PyObject *py_obj, PyObject *value, void *closure)
   10791             : {
   10792           0 :         struct package_PrimaryUserPasswordBlob *object = pytalloc_get_ptr(py_obj);
   10793           0 :         if (value == NULL) {
   10794           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->current_nt_hash");
   10795           0 :                 return -1;
   10796             :         }
   10797           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   10798           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10799           0 :                 PyErr_NoMemory();
   10800           0 :                 return -1;
   10801             :         }
   10802           0 :         object->current_nt_hash = *(struct samr_Password *)pytalloc_get_ptr(value);
   10803           0 :         return 0;
   10804             : }
   10805             : 
   10806          10 : static PyObject *py_package_PrimaryUserPasswordBlob_get_num_hashes(PyObject *obj, void *closure)
   10807             : {
   10808          10 :         struct package_PrimaryUserPasswordBlob *object = pytalloc_get_ptr(obj);
   10809           0 :         PyObject *py_num_hashes;
   10810          10 :         py_num_hashes = PyLong_FromLong((uint16_t)(object->num_hashes));
   10811          10 :         return py_num_hashes;
   10812             : }
   10813             : 
   10814           0 : static int py_package_PrimaryUserPasswordBlob_set_num_hashes(PyObject *py_obj, PyObject *value, void *closure)
   10815             : {
   10816           0 :         struct package_PrimaryUserPasswordBlob *object = pytalloc_get_ptr(py_obj);
   10817           0 :         if (value == NULL) {
   10818           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_hashes");
   10819           0 :                 return -1;
   10820             :         }
   10821             :         {
   10822           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_hashes));
   10823           0 :                 if (PyLong_Check(value)) {
   10824           0 :                         unsigned long long test_var;
   10825           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10826           0 :                         if (PyErr_Occurred() != NULL) {
   10827           0 :                                 return -1;
   10828             :                         }
   10829           0 :                         if (test_var > uint_max) {
   10830           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10831             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10832           0 :                                 return -1;
   10833             :                         }
   10834           0 :                         object->num_hashes = test_var;
   10835             :                 } else {
   10836           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10837             :                           PyLong_Type.tp_name);
   10838           0 :                         return -1;
   10839             :                 }
   10840             :         }
   10841           0 :         return 0;
   10842             : }
   10843             : 
   10844         192 : static PyObject *py_package_PrimaryUserPasswordBlob_get_hashes(PyObject *obj, void *closure)
   10845             : {
   10846         192 :         struct package_PrimaryUserPasswordBlob *object = pytalloc_get_ptr(obj);
   10847          18 :         PyObject *py_hashes;
   10848         192 :         py_hashes = PyList_New(object->num_hashes);
   10849         192 :         if (py_hashes == NULL) {
   10850           0 :                 return NULL;
   10851             :         }
   10852             :         {
   10853             :                 int hashes_cntr_0;
   10854         758 :                 for (hashes_cntr_0 = 0; hashes_cntr_0 < (object->num_hashes); hashes_cntr_0++) {
   10855          56 :                         PyObject *py_hashes_0;
   10856         566 :                         py_hashes_0 = pytalloc_reference_ex(&package_PrimaryUserPasswordValue_Type, object->hashes, &(object->hashes)[hashes_cntr_0]);
   10857         566 :                         PyList_SetItem(py_hashes, hashes_cntr_0, py_hashes_0);
   10858             :                 }
   10859             :         }
   10860         174 :         return py_hashes;
   10861             : }
   10862             : 
   10863           0 : static int py_package_PrimaryUserPasswordBlob_set_hashes(PyObject *py_obj, PyObject *value, void *closure)
   10864             : {
   10865           0 :         struct package_PrimaryUserPasswordBlob *object = pytalloc_get_ptr(py_obj);
   10866           0 :         if (value == NULL) {
   10867           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->hashes");
   10868           0 :                 return -1;
   10869             :         }
   10870           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   10871             :         {
   10872           0 :                 int hashes_cntr_0;
   10873           0 :                 object->hashes = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->hashes, PyList_GET_SIZE(value));
   10874           0 :                 if (!object->hashes) { return -1; }
   10875           0 :                 talloc_set_name_const(object->hashes, "ARRAY: object->hashes");
   10876           0 :                 for (hashes_cntr_0 = 0; hashes_cntr_0 < PyList_GET_SIZE(value); hashes_cntr_0++) {
   10877           0 :                         if (PyList_GET_ITEM(value, hashes_cntr_0) == NULL) {
   10878           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->hashes)[hashes_cntr_0]");
   10879           0 :                                 return -1;
   10880             :                         }
   10881           0 :                         PY_CHECK_TYPE(&package_PrimaryUserPasswordValue_Type, PyList_GET_ITEM(value, hashes_cntr_0), return -1;);
   10882           0 :                         if (talloc_reference(object->hashes, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, hashes_cntr_0))) == NULL) {
   10883           0 :                                 PyErr_NoMemory();
   10884           0 :                                 return -1;
   10885             :                         }
   10886           0 :                         (object->hashes)[hashes_cntr_0] = *(struct package_PrimaryUserPasswordValue *)pytalloc_get_ptr(PyList_GET_ITEM(value, hashes_cntr_0));
   10887             :                 }
   10888             :         }
   10889           0 :         return 0;
   10890             : }
   10891             : 
   10892             : static PyGetSetDef py_package_PrimaryUserPasswordBlob_getsetters[] = {
   10893             :         {
   10894             :                 .name = discard_const_p(char, "current_nt_hash"),
   10895             :                 .get = py_package_PrimaryUserPasswordBlob_get_current_nt_hash,
   10896             :                 .set = py_package_PrimaryUserPasswordBlob_set_current_nt_hash,
   10897             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   10898             :         },
   10899             :         {
   10900             :                 .name = discard_const_p(char, "num_hashes"),
   10901             :                 .get = py_package_PrimaryUserPasswordBlob_get_num_hashes,
   10902             :                 .set = py_package_PrimaryUserPasswordBlob_set_num_hashes,
   10903             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   10904             :         },
   10905             :         {
   10906             :                 .name = discard_const_p(char, "hashes"),
   10907             :                 .get = py_package_PrimaryUserPasswordBlob_get_hashes,
   10908             :                 .set = py_package_PrimaryUserPasswordBlob_set_hashes,
   10909             :                 .doc = discard_const_p(char, "PIDL-generated element of base type package_PrimaryUserPasswordValue")
   10910             :         },
   10911             :         { .name = NULL }
   10912             : };
   10913             : 
   10914         148 : static PyObject *py_package_PrimaryUserPasswordBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10915             : {
   10916         148 :         return pytalloc_new(struct package_PrimaryUserPasswordBlob, type);
   10917             : }
   10918             : 
   10919           0 : static PyObject *py_package_PrimaryUserPasswordBlob_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   10920             : {
   10921           0 :         struct package_PrimaryUserPasswordBlob *object = pytalloc_get_ptr(py_obj);
   10922           0 :         PyObject *ret = NULL;
   10923           0 :         DATA_BLOB blob;
   10924           0 :         enum ndr_err_code err;
   10925           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   10926           0 :         if (tmp_ctx == NULL) {
   10927           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10928           0 :                 return NULL;
   10929             :         }
   10930           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_package_PrimaryUserPasswordBlob);
   10931           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10932           0 :                 TALLOC_FREE(tmp_ctx);
   10933           0 :                 PyErr_SetNdrError(err);
   10934           0 :                 return NULL;
   10935             :         }
   10936             : 
   10937           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   10938           0 :         TALLOC_FREE(tmp_ctx);
   10939           0 :         return ret;
   10940             : }
   10941             : 
   10942         148 : static PyObject *py_package_PrimaryUserPasswordBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10943             : {
   10944         148 :         struct package_PrimaryUserPasswordBlob *object = pytalloc_get_ptr(py_obj);
   10945         148 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   10946         148 :         Py_ssize_t blob_length = 0;
   10947          18 :         enum ndr_err_code err;
   10948         148 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   10949         148 :         PyObject *allow_remaining_obj = NULL;
   10950         148 :         bool allow_remaining = false;
   10951             : 
   10952         148 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   10953             :                 discard_const_p(char *, kwnames),
   10954             :                 &blob.data, &blob_length,
   10955             :                 &allow_remaining_obj)) {
   10956           0 :                 return NULL;
   10957             :         }
   10958         148 :         blob.length = blob_length;
   10959             : 
   10960         148 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10961           0 :                 allow_remaining = true;
   10962             :         }
   10963             : 
   10964         130 :         if (allow_remaining) {
   10965           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimaryUserPasswordBlob);
   10966             :         } else {
   10967         148 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_package_PrimaryUserPasswordBlob);
   10968             :         }
   10969         148 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10970           0 :                 PyErr_SetNdrError(err);
   10971           0 :                 return NULL;
   10972             :         }
   10973             : 
   10974         148 :         Py_RETURN_NONE;
   10975             : }
   10976             : 
   10977           0 : static PyObject *py_package_PrimaryUserPasswordBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10978             : {
   10979           0 :         struct package_PrimaryUserPasswordBlob *object = pytalloc_get_ptr(py_obj);
   10980           0 :         PyObject *ret;
   10981           0 :         char *retstr;
   10982             : 
   10983           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_package_PrimaryUserPasswordBlob, "package_PrimaryUserPasswordBlob", object);
   10984           0 :         ret = PyUnicode_FromString(retstr);
   10985           0 :         talloc_free(retstr);
   10986             : 
   10987           0 :         return ret;
   10988             : }
   10989             : 
   10990             : static PyMethodDef py_package_PrimaryUserPasswordBlob_methods[] = {
   10991             :         { "__ndr_pack__", (PyCFunction)py_package_PrimaryUserPasswordBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   10992             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_package_PrimaryUserPasswordBlob_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   10993             :         { "__ndr_print__", (PyCFunction)py_package_PrimaryUserPasswordBlob_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   10994             :         { NULL, NULL, 0, NULL }
   10995             : };
   10996             : 
   10997             : 
   10998             : static PyTypeObject package_PrimaryUserPasswordBlob_Type = {
   10999             :         PyVarObject_HEAD_INIT(NULL, 0)
   11000             :         .tp_name = "drsblobs.package_PrimaryUserPasswordBlob",
   11001             :         .tp_getset = py_package_PrimaryUserPasswordBlob_getsetters,
   11002             :         .tp_methods = py_package_PrimaryUserPasswordBlob_methods,
   11003             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11004             :         .tp_new = py_package_PrimaryUserPasswordBlob_new,
   11005             : };
   11006             : 
   11007             : 
   11008           0 : static PyObject *py_AuthInfoNone_get_size(PyObject *obj, void *closure)
   11009             : {
   11010           0 :         struct AuthInfoNone *object = pytalloc_get_ptr(obj);
   11011           0 :         PyObject *py_size;
   11012           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
   11013           0 :         return py_size;
   11014             : }
   11015             : 
   11016           0 : static int py_AuthInfoNone_set_size(PyObject *py_obj, PyObject *value, void *closure)
   11017             : {
   11018           0 :         struct AuthInfoNone *object = pytalloc_get_ptr(py_obj);
   11019           0 :         if (value == NULL) {
   11020           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   11021           0 :                 return -1;
   11022             :         }
   11023             :         {
   11024           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   11025           0 :                 if (PyLong_Check(value)) {
   11026           0 :                         unsigned long long test_var;
   11027           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11028           0 :                         if (PyErr_Occurred() != NULL) {
   11029           0 :                                 return -1;
   11030             :                         }
   11031           0 :                         if (test_var > uint_max) {
   11032           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11033             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11034           0 :                                 return -1;
   11035             :                         }
   11036           0 :                         object->size = test_var;
   11037             :                 } else {
   11038           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11039             :                           PyLong_Type.tp_name);
   11040           0 :                         return -1;
   11041             :                 }
   11042             :         }
   11043           0 :         return 0;
   11044             : }
   11045             : 
   11046             : static PyGetSetDef py_AuthInfoNone_getsetters[] = {
   11047             :         {
   11048             :                 .name = discard_const_p(char, "size"),
   11049             :                 .get = py_AuthInfoNone_get_size,
   11050             :                 .set = py_AuthInfoNone_set_size,
   11051             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11052             :         },
   11053             :         { .name = NULL }
   11054             : };
   11055             : 
   11056           0 : static PyObject *py_AuthInfoNone_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11057             : {
   11058           0 :         return pytalloc_new(struct AuthInfoNone, type);
   11059             : }
   11060             : 
   11061             : 
   11062             : static PyTypeObject AuthInfoNone_Type = {
   11063             :         PyVarObject_HEAD_INIT(NULL, 0)
   11064             :         .tp_name = "drsblobs.AuthInfoNone",
   11065             :         .tp_getset = py_AuthInfoNone_getsetters,
   11066             :         .tp_methods = NULL,
   11067             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11068             :         .tp_new = py_AuthInfoNone_new,
   11069             : };
   11070             : 
   11071             : 
   11072           0 : static PyObject *py_AuthInfoNT4Owf_get_size(PyObject *obj, void *closure)
   11073             : {
   11074           0 :         struct AuthInfoNT4Owf *object = pytalloc_get_ptr(obj);
   11075           0 :         PyObject *py_size;
   11076           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
   11077           0 :         return py_size;
   11078             : }
   11079             : 
   11080           0 : static int py_AuthInfoNT4Owf_set_size(PyObject *py_obj, PyObject *value, void *closure)
   11081             : {
   11082           0 :         struct AuthInfoNT4Owf *object = pytalloc_get_ptr(py_obj);
   11083           0 :         if (value == NULL) {
   11084           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   11085           0 :                 return -1;
   11086             :         }
   11087             :         {
   11088           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   11089           0 :                 if (PyLong_Check(value)) {
   11090           0 :                         unsigned long long test_var;
   11091           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11092           0 :                         if (PyErr_Occurred() != NULL) {
   11093           0 :                                 return -1;
   11094             :                         }
   11095           0 :                         if (test_var > uint_max) {
   11096           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11097             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11098           0 :                                 return -1;
   11099             :                         }
   11100           0 :                         object->size = test_var;
   11101             :                 } else {
   11102           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11103             :                           PyLong_Type.tp_name);
   11104           0 :                         return -1;
   11105             :                 }
   11106             :         }
   11107           0 :         return 0;
   11108             : }
   11109             : 
   11110           0 : static PyObject *py_AuthInfoNT4Owf_get_password(PyObject *obj, void *closure)
   11111             : {
   11112           0 :         struct AuthInfoNT4Owf *object = pytalloc_get_ptr(obj);
   11113           0 :         PyObject *py_password;
   11114           0 :         py_password = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->password);
   11115           0 :         return py_password;
   11116             : }
   11117             : 
   11118           0 : static int py_AuthInfoNT4Owf_set_password(PyObject *py_obj, PyObject *value, void *closure)
   11119             : {
   11120           0 :         struct AuthInfoNT4Owf *object = pytalloc_get_ptr(py_obj);
   11121           0 :         if (value == NULL) {
   11122           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password");
   11123           0 :                 return -1;
   11124             :         }
   11125           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   11126           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11127           0 :                 PyErr_NoMemory();
   11128           0 :                 return -1;
   11129             :         }
   11130           0 :         object->password = *(struct samr_Password *)pytalloc_get_ptr(value);
   11131           0 :         return 0;
   11132             : }
   11133             : 
   11134             : static PyGetSetDef py_AuthInfoNT4Owf_getsetters[] = {
   11135             :         {
   11136             :                 .name = discard_const_p(char, "size"),
   11137             :                 .get = py_AuthInfoNT4Owf_get_size,
   11138             :                 .set = py_AuthInfoNT4Owf_set_size,
   11139             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11140             :         },
   11141             :         {
   11142             :                 .name = discard_const_p(char, "password"),
   11143             :                 .get = py_AuthInfoNT4Owf_get_password,
   11144             :                 .set = py_AuthInfoNT4Owf_set_password,
   11145             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   11146             :         },
   11147             :         { .name = NULL }
   11148             : };
   11149             : 
   11150           0 : static PyObject *py_AuthInfoNT4Owf_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11151             : {
   11152           0 :         return pytalloc_new(struct AuthInfoNT4Owf, type);
   11153             : }
   11154             : 
   11155             : 
   11156             : static PyTypeObject AuthInfoNT4Owf_Type = {
   11157             :         PyVarObject_HEAD_INIT(NULL, 0)
   11158             :         .tp_name = "drsblobs.AuthInfoNT4Owf",
   11159             :         .tp_getset = py_AuthInfoNT4Owf_getsetters,
   11160             :         .tp_methods = NULL,
   11161             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11162             :         .tp_new = py_AuthInfoNT4Owf_new,
   11163             : };
   11164             : 
   11165             : 
   11166           0 : static PyObject *py_AuthInfoClear_get_size(PyObject *obj, void *closure)
   11167             : {
   11168           0 :         struct AuthInfoClear *object = pytalloc_get_ptr(obj);
   11169           0 :         PyObject *py_size;
   11170           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
   11171           0 :         return py_size;
   11172             : }
   11173             : 
   11174          21 : static int py_AuthInfoClear_set_size(PyObject *py_obj, PyObject *value, void *closure)
   11175             : {
   11176          21 :         struct AuthInfoClear *object = pytalloc_get_ptr(py_obj);
   11177          21 :         if (value == NULL) {
   11178           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   11179           0 :                 return -1;
   11180             :         }
   11181             :         {
   11182          21 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   11183          21 :                 if (PyLong_Check(value)) {
   11184           0 :                         unsigned long long test_var;
   11185          21 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11186          21 :                         if (PyErr_Occurred() != NULL) {
   11187           0 :                                 return -1;
   11188             :                         }
   11189          21 :                         if (test_var > uint_max) {
   11190           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11191             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11192           0 :                                 return -1;
   11193             :                         }
   11194          21 :                         object->size = test_var;
   11195             :                 } else {
   11196           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11197             :                           PyLong_Type.tp_name);
   11198           0 :                         return -1;
   11199             :                 }
   11200             :         }
   11201          21 :         return 0;
   11202             : }
   11203             : 
   11204           0 : static PyObject *py_AuthInfoClear_get_password(PyObject *obj, void *closure)
   11205             : {
   11206           0 :         struct AuthInfoClear *object = pytalloc_get_ptr(obj);
   11207           0 :         PyObject *py_password;
   11208           0 :         py_password = PyList_New(object->size);
   11209           0 :         if (py_password == NULL) {
   11210           0 :                 return NULL;
   11211             :         }
   11212             :         {
   11213             :                 int password_cntr_0;
   11214           0 :                 for (password_cntr_0 = 0; password_cntr_0 < (object->size); password_cntr_0++) {
   11215           0 :                         PyObject *py_password_0;
   11216           0 :                         py_password_0 = PyLong_FromLong((uint16_t)((object->password)[password_cntr_0]));
   11217           0 :                         PyList_SetItem(py_password, password_cntr_0, py_password_0);
   11218             :                 }
   11219             :         }
   11220           0 :         return py_password;
   11221             : }
   11222             : 
   11223          21 : static int py_AuthInfoClear_set_password(PyObject *py_obj, PyObject *value, void *closure)
   11224             : {
   11225          21 :         struct AuthInfoClear *object = pytalloc_get_ptr(py_obj);
   11226          21 :         if (value == NULL) {
   11227           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password");
   11228           0 :                 return -1;
   11229             :         }
   11230          21 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   11231             :         {
   11232           0 :                 int password_cntr_0;
   11233          21 :                 object->password = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->password, PyList_GET_SIZE(value));
   11234          21 :                 if (!object->password) { return -1; }
   11235          21 :                 talloc_set_name_const(object->password, "ARRAY: object->password");
   11236        4613 :                 for (password_cntr_0 = 0; password_cntr_0 < PyList_GET_SIZE(value); password_cntr_0++) {
   11237        4592 :                         if (PyList_GET_ITEM(value, password_cntr_0) == NULL) {
   11238           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->password)[password_cntr_0]");
   11239           0 :                                 return -1;
   11240             :                         }
   11241             :                         {
   11242        4592 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->password)[password_cntr_0]));
   11243        4592 :                                 if (PyLong_Check(PyList_GET_ITEM(value, password_cntr_0))) {
   11244           0 :                                         unsigned long long test_var;
   11245        4592 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, password_cntr_0));
   11246        4592 :                                         if (PyErr_Occurred() != NULL) {
   11247           0 :                                                 return -1;
   11248             :                                         }
   11249        4592 :                                         if (test_var > uint_max) {
   11250           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11251             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   11252           0 :                                                 return -1;
   11253             :                                         }
   11254        4592 :                                         (object->password)[password_cntr_0] = test_var;
   11255             :                                 } else {
   11256           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11257             :                                           PyLong_Type.tp_name);
   11258           0 :                                         return -1;
   11259             :                                 }
   11260             :                         }
   11261             :                 }
   11262             :         }
   11263          21 :         return 0;
   11264             : }
   11265             : 
   11266             : static PyGetSetDef py_AuthInfoClear_getsetters[] = {
   11267             :         {
   11268             :                 .name = discard_const_p(char, "size"),
   11269             :                 .get = py_AuthInfoClear_get_size,
   11270             :                 .set = py_AuthInfoClear_set_size,
   11271             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11272             :         },
   11273             :         {
   11274             :                 .name = discard_const_p(char, "password"),
   11275             :                 .get = py_AuthInfoClear_get_password,
   11276             :                 .set = py_AuthInfoClear_set_password,
   11277             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   11278             :         },
   11279             :         { .name = NULL }
   11280             : };
   11281             : 
   11282          21 : static PyObject *py_AuthInfoClear_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11283             : {
   11284          21 :         return pytalloc_new(struct AuthInfoClear, type);
   11285             : }
   11286             : 
   11287             : 
   11288             : static PyTypeObject AuthInfoClear_Type = {
   11289             :         PyVarObject_HEAD_INIT(NULL, 0)
   11290             :         .tp_name = "drsblobs.AuthInfoClear",
   11291             :         .tp_getset = py_AuthInfoClear_getsetters,
   11292             :         .tp_methods = NULL,
   11293             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11294             :         .tp_new = py_AuthInfoClear_new,
   11295             : };
   11296             : 
   11297             : 
   11298           0 : static PyObject *py_AuthInfoVersion_get_size(PyObject *obj, void *closure)
   11299             : {
   11300           0 :         struct AuthInfoVersion *object = pytalloc_get_ptr(obj);
   11301           0 :         PyObject *py_size;
   11302           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
   11303           0 :         return py_size;
   11304             : }
   11305             : 
   11306           0 : static int py_AuthInfoVersion_set_size(PyObject *py_obj, PyObject *value, void *closure)
   11307             : {
   11308           0 :         struct AuthInfoVersion *object = pytalloc_get_ptr(py_obj);
   11309           0 :         if (value == NULL) {
   11310           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   11311           0 :                 return -1;
   11312             :         }
   11313             :         {
   11314           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   11315           0 :                 if (PyLong_Check(value)) {
   11316           0 :                         unsigned long long test_var;
   11317           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11318           0 :                         if (PyErr_Occurred() != NULL) {
   11319           0 :                                 return -1;
   11320             :                         }
   11321           0 :                         if (test_var > uint_max) {
   11322           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11323             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11324           0 :                                 return -1;
   11325             :                         }
   11326           0 :                         object->size = test_var;
   11327             :                 } else {
   11328           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11329             :                           PyLong_Type.tp_name);
   11330           0 :                         return -1;
   11331             :                 }
   11332             :         }
   11333           0 :         return 0;
   11334             : }
   11335             : 
   11336           0 : static PyObject *py_AuthInfoVersion_get_version(PyObject *obj, void *closure)
   11337             : {
   11338           0 :         struct AuthInfoVersion *object = pytalloc_get_ptr(obj);
   11339           0 :         PyObject *py_version;
   11340           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
   11341           0 :         return py_version;
   11342             : }
   11343             : 
   11344           0 : static int py_AuthInfoVersion_set_version(PyObject *py_obj, PyObject *value, void *closure)
   11345             : {
   11346           0 :         struct AuthInfoVersion *object = pytalloc_get_ptr(py_obj);
   11347           0 :         if (value == NULL) {
   11348           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
   11349           0 :                 return -1;
   11350             :         }
   11351             :         {
   11352           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
   11353           0 :                 if (PyLong_Check(value)) {
   11354           0 :                         unsigned long long test_var;
   11355           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11356           0 :                         if (PyErr_Occurred() != NULL) {
   11357           0 :                                 return -1;
   11358             :                         }
   11359           0 :                         if (test_var > uint_max) {
   11360           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11361             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11362           0 :                                 return -1;
   11363             :                         }
   11364           0 :                         object->version = test_var;
   11365             :                 } else {
   11366           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11367             :                           PyLong_Type.tp_name);
   11368           0 :                         return -1;
   11369             :                 }
   11370             :         }
   11371           0 :         return 0;
   11372             : }
   11373             : 
   11374             : static PyGetSetDef py_AuthInfoVersion_getsetters[] = {
   11375             :         {
   11376             :                 .name = discard_const_p(char, "size"),
   11377             :                 .get = py_AuthInfoVersion_get_size,
   11378             :                 .set = py_AuthInfoVersion_set_size,
   11379             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11380             :         },
   11381             :         {
   11382             :                 .name = discard_const_p(char, "version"),
   11383             :                 .get = py_AuthInfoVersion_get_version,
   11384             :                 .set = py_AuthInfoVersion_set_version,
   11385             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11386             :         },
   11387             :         { .name = NULL }
   11388             : };
   11389             : 
   11390           0 : static PyObject *py_AuthInfoVersion_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11391             : {
   11392           0 :         return pytalloc_new(struct AuthInfoVersion, type);
   11393             : }
   11394             : 
   11395             : 
   11396             : static PyTypeObject AuthInfoVersion_Type = {
   11397             :         PyVarObject_HEAD_INIT(NULL, 0)
   11398             :         .tp_name = "drsblobs.AuthInfoVersion",
   11399             :         .tp_getset = py_AuthInfoVersion_getsetters,
   11400             :         .tp_methods = NULL,
   11401             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11402             :         .tp_new = py_AuthInfoVersion_new,
   11403             : };
   11404             : 
   11405           0 : static PyObject *py_import_AuthInfo(TALLOC_CTX *mem_ctx, int level, union AuthInfo *in)
   11406             : {
   11407           0 :         PyObject *ret;
   11408             : 
   11409           0 :         switch (level) {
   11410           0 :                 case TRUST_AUTH_TYPE_NONE:
   11411           0 :                         ret = pytalloc_reference_ex(&AuthInfoNone_Type, mem_ctx, &in->none);
   11412           0 :                         return ret;
   11413             : 
   11414           0 :                 case TRUST_AUTH_TYPE_NT4OWF:
   11415           0 :                         ret = pytalloc_reference_ex(&AuthInfoNT4Owf_Type, mem_ctx, &in->nt4owf);
   11416           0 :                         return ret;
   11417             : 
   11418           0 :                 case TRUST_AUTH_TYPE_CLEAR:
   11419           0 :                         ret = pytalloc_reference_ex(&AuthInfoClear_Type, mem_ctx, &in->clear);
   11420           0 :                         return ret;
   11421             : 
   11422           0 :                 case TRUST_AUTH_TYPE_VERSION:
   11423           0 :                         ret = pytalloc_reference_ex(&AuthInfoVersion_Type, mem_ctx, &in->version);
   11424           0 :                         return ret;
   11425             : 
   11426             :         }
   11427           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   11428           0 :         return NULL;
   11429             : }
   11430             : 
   11431          21 : static union AuthInfo *py_export_AuthInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   11432             : {
   11433          21 :         union AuthInfo *ret = talloc_zero(mem_ctx, union AuthInfo);
   11434          21 :         switch (level) {
   11435           0 :                 case TRUST_AUTH_TYPE_NONE:
   11436           0 :                         if (in == NULL) {
   11437           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->none");
   11438           0 :                                 talloc_free(ret); return NULL;
   11439             :                         }
   11440           0 :                         PY_CHECK_TYPE(&AuthInfoNone_Type, in, talloc_free(ret); return NULL;);
   11441           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   11442           0 :                                 PyErr_NoMemory();
   11443           0 :                                 talloc_free(ret); return NULL;
   11444             :                         }
   11445           0 :                         ret->none = *(struct AuthInfoNone *)pytalloc_get_ptr(in);
   11446           0 :                         break;
   11447             : 
   11448           0 :                 case TRUST_AUTH_TYPE_NT4OWF:
   11449           0 :                         if (in == NULL) {
   11450           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->nt4owf");
   11451           0 :                                 talloc_free(ret); return NULL;
   11452             :                         }
   11453           0 :                         PY_CHECK_TYPE(&AuthInfoNT4Owf_Type, in, talloc_free(ret); return NULL;);
   11454           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   11455           0 :                                 PyErr_NoMemory();
   11456           0 :                                 talloc_free(ret); return NULL;
   11457             :                         }
   11458           0 :                         ret->nt4owf = *(struct AuthInfoNT4Owf *)pytalloc_get_ptr(in);
   11459           0 :                         break;
   11460             : 
   11461          21 :                 case TRUST_AUTH_TYPE_CLEAR:
   11462          21 :                         if (in == NULL) {
   11463           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->clear");
   11464           0 :                                 talloc_free(ret); return NULL;
   11465             :                         }
   11466          21 :                         PY_CHECK_TYPE(&AuthInfoClear_Type, in, talloc_free(ret); return NULL;);
   11467          21 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   11468           0 :                                 PyErr_NoMemory();
   11469           0 :                                 talloc_free(ret); return NULL;
   11470             :                         }
   11471          21 :                         ret->clear = *(struct AuthInfoClear *)pytalloc_get_ptr(in);
   11472          21 :                         break;
   11473             : 
   11474           0 :                 case TRUST_AUTH_TYPE_VERSION:
   11475           0 :                         if (in == NULL) {
   11476           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->version");
   11477           0 :                                 talloc_free(ret); return NULL;
   11478             :                         }
   11479           0 :                         PY_CHECK_TYPE(&AuthInfoVersion_Type, in, talloc_free(ret); return NULL;);
   11480           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   11481           0 :                                 PyErr_NoMemory();
   11482           0 :                                 talloc_free(ret); return NULL;
   11483             :                         }
   11484           0 :                         ret->version = *(struct AuthInfoVersion *)pytalloc_get_ptr(in);
   11485           0 :                         break;
   11486             : 
   11487           0 :                 default:
   11488           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   11489           0 :                         talloc_free(ret);
   11490           0 :                         ret = NULL;
   11491             :         }
   11492             : 
   11493          21 :         return ret;
   11494             : }
   11495             : 
   11496           0 : static PyObject *py_AuthInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11497             : {
   11498           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   11499           0 :         PyObject *mem_ctx_obj = NULL;
   11500           0 :         TALLOC_CTX *mem_ctx = NULL;
   11501           0 :         int level = 0;
   11502           0 :         PyObject *in_obj = NULL;
   11503           0 :         union AuthInfo *in = NULL;
   11504             : 
   11505           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   11506             :                 discard_const_p(char *, kwnames),
   11507             :                 &mem_ctx_obj,
   11508             :                 &level,
   11509             :                 &in_obj)) {
   11510           0 :                 return NULL;
   11511             :         }
   11512           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   11513           0 :         if (mem_ctx == NULL) {
   11514           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   11515           0 :                 return NULL;
   11516             :         }
   11517           0 :         in = (union AuthInfo *)pytalloc_get_ptr(in_obj);
   11518           0 :         if (in == NULL) {
   11519           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union AuthInfo!");
   11520           0 :                 return NULL;
   11521             :         }
   11522             : 
   11523           0 :         return py_import_AuthInfo(mem_ctx, level, in);
   11524             : }
   11525             : 
   11526          21 : static PyObject *py_AuthInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11527             : {
   11528          21 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   11529          21 :         PyObject *mem_ctx_obj = NULL;
   11530          21 :         TALLOC_CTX *mem_ctx = NULL;
   11531          21 :         int level = 0;
   11532          21 :         PyObject *in = NULL;
   11533          21 :         union AuthInfo *out = NULL;
   11534             : 
   11535          21 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   11536             :                 discard_const_p(char *, kwnames),
   11537             :                 &mem_ctx_obj,
   11538             :                 &level,
   11539             :                 &in)) {
   11540           0 :                 return NULL;
   11541             :         }
   11542          21 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   11543          21 :         if (mem_ctx == NULL) {
   11544           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   11545           0 :                 return NULL;
   11546             :         }
   11547             : 
   11548          21 :         out = py_export_AuthInfo(mem_ctx, level, in);
   11549          21 :         if (out == NULL) {
   11550           0 :                 return NULL;
   11551             :         }
   11552             : 
   11553          21 :         return pytalloc_GenericObject_reference(out);
   11554             : }
   11555             : 
   11556             : static PyMethodDef py_AuthInfo_methods[] = {
   11557             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_AuthInfo_import),
   11558             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   11559             :                 "T.__import__(mem_ctx, level, in) => ret." },
   11560             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_AuthInfo_export),
   11561             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   11562             :                 "T.__export__(mem_ctx, level, in) => ret." },
   11563             :         { NULL, NULL, 0, NULL }
   11564             : };
   11565             : 
   11566           0 : static PyObject *py_AuthInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11567             : {
   11568           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   11569           0 :         return NULL;
   11570             : }
   11571             : 
   11572             : 
   11573             : static PyTypeObject AuthInfo_Type = {
   11574             :         PyVarObject_HEAD_INIT(NULL, 0)
   11575             :         .tp_name = "drsblobs.AuthInfo",
   11576             :         .tp_getset = NULL,
   11577             :         .tp_methods = py_AuthInfo_methods,
   11578             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11579             :         .tp_new = py_AuthInfo_new,
   11580             : };
   11581             : 
   11582             : 
   11583           0 : static PyObject *py_AuthenticationInformation_get_LastUpdateTime(PyObject *obj, void *closure)
   11584             : {
   11585           0 :         struct AuthenticationInformation *object = pytalloc_get_ptr(obj);
   11586           0 :         PyObject *py_LastUpdateTime;
   11587           0 :         py_LastUpdateTime = PyLong_FromUnsignedLongLong(object->LastUpdateTime);
   11588           0 :         return py_LastUpdateTime;
   11589             : }
   11590             : 
   11591          21 : static int py_AuthenticationInformation_set_LastUpdateTime(PyObject *py_obj, PyObject *value, void *closure)
   11592             : {
   11593          21 :         struct AuthenticationInformation *object = pytalloc_get_ptr(py_obj);
   11594          21 :         if (value == NULL) {
   11595           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->LastUpdateTime");
   11596           0 :                 return -1;
   11597             :         }
   11598             :         {
   11599          21 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->LastUpdateTime));
   11600          21 :                 if (PyLong_Check(value)) {
   11601           0 :                         unsigned long long test_var;
   11602          21 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11603          21 :                         if (PyErr_Occurred() != NULL) {
   11604           0 :                                 return -1;
   11605             :                         }
   11606          21 :                         if (test_var > uint_max) {
   11607           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11608             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11609           0 :                                 return -1;
   11610             :                         }
   11611          21 :                         object->LastUpdateTime = test_var;
   11612             :                 } else {
   11613           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11614             :                           PyLong_Type.tp_name);
   11615           0 :                         return -1;
   11616             :                 }
   11617             :         }
   11618          21 :         return 0;
   11619             : }
   11620             : 
   11621           0 : static PyObject *py_AuthenticationInformation_get_AuthType(PyObject *obj, void *closure)
   11622             : {
   11623           0 :         struct AuthenticationInformation *object = pytalloc_get_ptr(obj);
   11624           0 :         PyObject *py_AuthType;
   11625           0 :         py_AuthType = PyLong_FromUnsignedLongLong((uint32_t)(object->AuthType));
   11626           0 :         return py_AuthType;
   11627             : }
   11628             : 
   11629          21 : static int py_AuthenticationInformation_set_AuthType(PyObject *py_obj, PyObject *value, void *closure)
   11630             : {
   11631          21 :         struct AuthenticationInformation *object = pytalloc_get_ptr(py_obj);
   11632          21 :         if (value == NULL) {
   11633           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->AuthType");
   11634           0 :                 return -1;
   11635             :         }
   11636             :         {
   11637          21 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->AuthType));
   11638          21 :                 if (PyLong_Check(value)) {
   11639           0 :                         unsigned long long test_var;
   11640          21 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11641          21 :                         if (PyErr_Occurred() != NULL) {
   11642           0 :                                 return -1;
   11643             :                         }
   11644          21 :                         if (test_var > uint_max) {
   11645           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11646             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11647           0 :                                 return -1;
   11648             :                         }
   11649          21 :                         object->AuthType = test_var;
   11650             :                 } else {
   11651           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11652             :                           PyLong_Type.tp_name);
   11653           0 :                         return -1;
   11654             :                 }
   11655             :         }
   11656          21 :         return 0;
   11657             : }
   11658             : 
   11659           0 : static PyObject *py_AuthenticationInformation_get_AuthInfo(PyObject *obj, void *closure)
   11660             : {
   11661           0 :         struct AuthenticationInformation *object = pytalloc_get_ptr(obj);
   11662           0 :         PyObject *py_AuthInfo;
   11663           0 :         py_AuthInfo = pyrpc_import_union(&AuthInfo_Type, pytalloc_get_mem_ctx(obj), object->AuthType, &object->AuthInfo, "union AuthInfo");
   11664           0 :         if (py_AuthInfo == NULL) {
   11665           0 :                 return NULL;
   11666             :         }
   11667           0 :         return py_AuthInfo;
   11668             : }
   11669             : 
   11670          21 : static int py_AuthenticationInformation_set_AuthInfo(PyObject *py_obj, PyObject *value, void *closure)
   11671             : {
   11672          21 :         struct AuthenticationInformation *object = pytalloc_get_ptr(py_obj);
   11673          21 :         if (value == NULL) {
   11674           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->AuthInfo");
   11675           0 :                 return -1;
   11676             :         }
   11677             :         {
   11678           0 :                 union AuthInfo *AuthInfo_switch_0;
   11679          21 :                 AuthInfo_switch_0 = (union AuthInfo *)pyrpc_export_union(&AuthInfo_Type, pytalloc_get_mem_ctx(py_obj), object->AuthType, value, "union AuthInfo");
   11680          21 :                 if (AuthInfo_switch_0 == NULL) {
   11681           0 :                         return -1;
   11682             :                 }
   11683          21 :                 object->AuthInfo = *AuthInfo_switch_0;
   11684             :         }
   11685          21 :         return 0;
   11686             : }
   11687             : 
   11688           0 : static PyObject *py_AuthenticationInformation_get__pad(PyObject *obj, void *closure)
   11689             : {
   11690           0 :         struct AuthenticationInformation *object = pytalloc_get_ptr(obj);
   11691           0 :         PyObject *py__pad;
   11692           0 :         py__pad = PyBytes_FromStringAndSize((char *)(object->_pad).data, (object->_pad).length);
   11693           0 :         return py__pad;
   11694             : }
   11695             : 
   11696           0 : static int py_AuthenticationInformation_set__pad(PyObject *py_obj, PyObject *value, void *closure)
   11697             : {
   11698           0 :         struct AuthenticationInformation *object = pytalloc_get_ptr(py_obj);
   11699           0 :         if (value == NULL) {
   11700           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->_pad");
   11701           0 :                 return -1;
   11702             :         }
   11703           0 :         object->_pad = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   11704           0 :         return 0;
   11705             : }
   11706             : 
   11707             : static PyGetSetDef py_AuthenticationInformation_getsetters[] = {
   11708             :         {
   11709             :                 .name = discard_const_p(char, "LastUpdateTime"),
   11710             :                 .get = py_AuthenticationInformation_get_LastUpdateTime,
   11711             :                 .set = py_AuthenticationInformation_set_LastUpdateTime,
   11712             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   11713             :         },
   11714             :         {
   11715             :                 .name = discard_const_p(char, "AuthType"),
   11716             :                 .get = py_AuthenticationInformation_get_AuthType,
   11717             :                 .set = py_AuthenticationInformation_set_AuthType,
   11718             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustAuthType")
   11719             :         },
   11720             :         {
   11721             :                 .name = discard_const_p(char, "AuthInfo"),
   11722             :                 .get = py_AuthenticationInformation_get_AuthInfo,
   11723             :                 .set = py_AuthenticationInformation_set_AuthInfo,
   11724             :                 .doc = discard_const_p(char, "PIDL-generated element of base type AuthInfo")
   11725             :         },
   11726             :         {
   11727             :                 .name = discard_const_p(char, "_pad"),
   11728             :                 .get = py_AuthenticationInformation_get__pad,
   11729             :                 .set = py_AuthenticationInformation_set__pad,
   11730             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   11731             :         },
   11732             :         { .name = NULL }
   11733             : };
   11734             : 
   11735          21 : static PyObject *py_AuthenticationInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11736             : {
   11737          21 :         return pytalloc_new(struct AuthenticationInformation, type);
   11738             : }
   11739             : 
   11740           0 : static PyObject *py_AuthenticationInformation_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   11741             : {
   11742           0 :         struct AuthenticationInformation *object = pytalloc_get_ptr(py_obj);
   11743           0 :         PyObject *ret = NULL;
   11744           0 :         DATA_BLOB blob;
   11745           0 :         enum ndr_err_code err;
   11746           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   11747           0 :         if (tmp_ctx == NULL) {
   11748           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11749           0 :                 return NULL;
   11750             :         }
   11751           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_AuthenticationInformation);
   11752           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11753           0 :                 TALLOC_FREE(tmp_ctx);
   11754           0 :                 PyErr_SetNdrError(err);
   11755           0 :                 return NULL;
   11756             :         }
   11757             : 
   11758           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11759           0 :         TALLOC_FREE(tmp_ctx);
   11760           0 :         return ret;
   11761             : }
   11762             : 
   11763           0 : static PyObject *py_AuthenticationInformation_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11764             : {
   11765           0 :         struct AuthenticationInformation *object = pytalloc_get_ptr(py_obj);
   11766           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   11767           0 :         Py_ssize_t blob_length = 0;
   11768           0 :         enum ndr_err_code err;
   11769           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   11770           0 :         PyObject *allow_remaining_obj = NULL;
   11771           0 :         bool allow_remaining = false;
   11772             : 
   11773           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   11774             :                 discard_const_p(char *, kwnames),
   11775             :                 &blob.data, &blob_length,
   11776             :                 &allow_remaining_obj)) {
   11777           0 :                 return NULL;
   11778             :         }
   11779           0 :         blob.length = blob_length;
   11780             : 
   11781           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11782           0 :                 allow_remaining = true;
   11783             :         }
   11784             : 
   11785           0 :         if (allow_remaining) {
   11786           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_AuthenticationInformation);
   11787             :         } else {
   11788           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_AuthenticationInformation);
   11789             :         }
   11790           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11791           0 :                 PyErr_SetNdrError(err);
   11792           0 :                 return NULL;
   11793             :         }
   11794             : 
   11795           0 :         Py_RETURN_NONE;
   11796             : }
   11797             : 
   11798           0 : static PyObject *py_AuthenticationInformation_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11799             : {
   11800           0 :         struct AuthenticationInformation *object = pytalloc_get_ptr(py_obj);
   11801           0 :         PyObject *ret;
   11802           0 :         char *retstr;
   11803             : 
   11804           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_AuthenticationInformation, "AuthenticationInformation", object);
   11805           0 :         ret = PyUnicode_FromString(retstr);
   11806           0 :         talloc_free(retstr);
   11807             : 
   11808           0 :         return ret;
   11809             : }
   11810             : 
   11811             : static PyMethodDef py_AuthenticationInformation_methods[] = {
   11812             :         { "__ndr_pack__", (PyCFunction)py_AuthenticationInformation_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   11813             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_AuthenticationInformation_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   11814             :         { "__ndr_print__", (PyCFunction)py_AuthenticationInformation_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   11815             :         { NULL, NULL, 0, NULL }
   11816             : };
   11817             : 
   11818             : 
   11819             : static PyTypeObject AuthenticationInformation_Type = {
   11820             :         PyVarObject_HEAD_INIT(NULL, 0)
   11821             :         .tp_name = "drsblobs.AuthenticationInformation",
   11822             :         .tp_getset = py_AuthenticationInformation_getsetters,
   11823             :         .tp_methods = py_AuthenticationInformation_methods,
   11824             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11825             :         .tp_new = py_AuthenticationInformation_new,
   11826             : };
   11827             : 
   11828             : 
   11829           0 : static PyObject *py_AuthenticationInformationArray_get_count(PyObject *obj, void *closure)
   11830             : {
   11831           0 :         struct AuthenticationInformationArray *object = pytalloc_get_ptr(obj);
   11832           0 :         PyObject *py_count;
   11833           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   11834           0 :         return py_count;
   11835             : }
   11836             : 
   11837          21 : static int py_AuthenticationInformationArray_set_count(PyObject *py_obj, PyObject *value, void *closure)
   11838             : {
   11839          21 :         struct AuthenticationInformationArray *object = pytalloc_get_ptr(py_obj);
   11840          21 :         if (value == NULL) {
   11841           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   11842           0 :                 return -1;
   11843             :         }
   11844             :         {
   11845          21 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   11846          21 :                 if (PyLong_Check(value)) {
   11847           0 :                         unsigned long long test_var;
   11848          21 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11849          21 :                         if (PyErr_Occurred() != NULL) {
   11850           0 :                                 return -1;
   11851             :                         }
   11852          21 :                         if (test_var > uint_max) {
   11853           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11854             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11855           0 :                                 return -1;
   11856             :                         }
   11857          21 :                         object->count = test_var;
   11858             :                 } else {
   11859           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11860             :                           PyLong_Type.tp_name);
   11861           0 :                         return -1;
   11862             :                 }
   11863             :         }
   11864          21 :         return 0;
   11865             : }
   11866             : 
   11867           0 : static PyObject *py_AuthenticationInformationArray_get_array(PyObject *obj, void *closure)
   11868             : {
   11869           0 :         struct AuthenticationInformationArray *object = pytalloc_get_ptr(obj);
   11870           0 :         PyObject *py_array;
   11871           0 :         py_array = PyList_New(object->count);
   11872           0 :         if (py_array == NULL) {
   11873           0 :                 return NULL;
   11874             :         }
   11875             :         {
   11876             :                 int array_cntr_0;
   11877           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   11878           0 :                         PyObject *py_array_0;
   11879           0 :                         py_array_0 = pytalloc_reference_ex(&AuthenticationInformation_Type, object->array, &(object->array)[array_cntr_0]);
   11880           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   11881             :                 }
   11882             :         }
   11883           0 :         return py_array;
   11884             : }
   11885             : 
   11886          21 : static int py_AuthenticationInformationArray_set_array(PyObject *py_obj, PyObject *value, void *closure)
   11887             : {
   11888          21 :         struct AuthenticationInformationArray *object = pytalloc_get_ptr(py_obj);
   11889          21 :         if (value == NULL) {
   11890           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   11891           0 :                 return -1;
   11892             :         }
   11893          21 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   11894             :         {
   11895           0 :                 int array_cntr_0;
   11896          21 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   11897          21 :                 if (!object->array) { return -1; }
   11898          21 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   11899          42 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   11900          21 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   11901           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   11902           0 :                                 return -1;
   11903             :                         }
   11904          21 :                         PY_CHECK_TYPE(&AuthenticationInformation_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   11905          21 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   11906           0 :                                 PyErr_NoMemory();
   11907           0 :                                 return -1;
   11908             :                         }
   11909          21 :                         (object->array)[array_cntr_0] = *(struct AuthenticationInformation *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   11910             :                 }
   11911             :         }
   11912          21 :         return 0;
   11913             : }
   11914             : 
   11915             : static PyGetSetDef py_AuthenticationInformationArray_getsetters[] = {
   11916             :         {
   11917             :                 .name = discard_const_p(char, "count"),
   11918             :                 .get = py_AuthenticationInformationArray_get_count,
   11919             :                 .set = py_AuthenticationInformationArray_set_count,
   11920             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11921             :         },
   11922             :         {
   11923             :                 .name = discard_const_p(char, "array"),
   11924             :                 .get = py_AuthenticationInformationArray_get_array,
   11925             :                 .set = py_AuthenticationInformationArray_set_array,
   11926             :                 .doc = discard_const_p(char, "PIDL-generated element of base type AuthenticationInformation")
   11927             :         },
   11928             :         { .name = NULL }
   11929             : };
   11930             : 
   11931          21 : static PyObject *py_AuthenticationInformationArray_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11932             : {
   11933          21 :         return pytalloc_new(struct AuthenticationInformationArray, type);
   11934             : }
   11935             : 
   11936           0 : static PyObject *py_AuthenticationInformationArray_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   11937             : {
   11938           0 :         struct AuthenticationInformationArray *object = pytalloc_get_ptr(py_obj);
   11939           0 :         PyObject *ret = NULL;
   11940           0 :         DATA_BLOB blob;
   11941           0 :         enum ndr_err_code err;
   11942           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   11943           0 :         if (tmp_ctx == NULL) {
   11944           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11945           0 :                 return NULL;
   11946             :         }
   11947           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_AuthenticationInformationArray);
   11948           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11949           0 :                 TALLOC_FREE(tmp_ctx);
   11950           0 :                 PyErr_SetNdrError(err);
   11951           0 :                 return NULL;
   11952             :         }
   11953             : 
   11954           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11955           0 :         TALLOC_FREE(tmp_ctx);
   11956           0 :         return ret;
   11957             : }
   11958             : 
   11959           0 : static PyObject *py_AuthenticationInformationArray_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11960             : {
   11961           0 :         struct AuthenticationInformationArray *object = pytalloc_get_ptr(py_obj);
   11962           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   11963           0 :         Py_ssize_t blob_length = 0;
   11964           0 :         enum ndr_err_code err;
   11965           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   11966           0 :         PyObject *allow_remaining_obj = NULL;
   11967           0 :         bool allow_remaining = false;
   11968             : 
   11969           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   11970             :                 discard_const_p(char *, kwnames),
   11971             :                 &blob.data, &blob_length,
   11972             :                 &allow_remaining_obj)) {
   11973           0 :                 return NULL;
   11974             :         }
   11975           0 :         blob.length = blob_length;
   11976             : 
   11977           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11978           0 :                 allow_remaining = true;
   11979             :         }
   11980             : 
   11981           0 :         if (allow_remaining) {
   11982           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_AuthenticationInformationArray);
   11983             :         } else {
   11984           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_AuthenticationInformationArray);
   11985             :         }
   11986           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11987           0 :                 PyErr_SetNdrError(err);
   11988           0 :                 return NULL;
   11989             :         }
   11990             : 
   11991           0 :         Py_RETURN_NONE;
   11992             : }
   11993             : 
   11994           0 : static PyObject *py_AuthenticationInformationArray_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11995             : {
   11996           0 :         struct AuthenticationInformationArray *object = pytalloc_get_ptr(py_obj);
   11997           0 :         PyObject *ret;
   11998           0 :         char *retstr;
   11999             : 
   12000           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_AuthenticationInformationArray, "AuthenticationInformationArray", object);
   12001           0 :         ret = PyUnicode_FromString(retstr);
   12002           0 :         talloc_free(retstr);
   12003             : 
   12004           0 :         return ret;
   12005             : }
   12006             : 
   12007             : static PyMethodDef py_AuthenticationInformationArray_methods[] = {
   12008             :         { "__ndr_pack__", (PyCFunction)py_AuthenticationInformationArray_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   12009             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_AuthenticationInformationArray_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   12010             :         { "__ndr_print__", (PyCFunction)py_AuthenticationInformationArray_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   12011             :         { NULL, NULL, 0, NULL }
   12012             : };
   12013             : 
   12014             : 
   12015             : static PyTypeObject AuthenticationInformationArray_Type = {
   12016             :         PyVarObject_HEAD_INIT(NULL, 0)
   12017             :         .tp_name = "drsblobs.AuthenticationInformationArray",
   12018             :         .tp_getset = py_AuthenticationInformationArray_getsetters,
   12019             :         .tp_methods = py_AuthenticationInformationArray_methods,
   12020             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12021             :         .tp_new = py_AuthenticationInformationArray_new,
   12022             : };
   12023             : 
   12024             : 
   12025           0 : static PyObject *py_trustAuthInOutBlob_get_count(PyObject *obj, void *closure)
   12026             : {
   12027           0 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(obj);
   12028           0 :         PyObject *py_count;
   12029           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   12030           0 :         return py_count;
   12031             : }
   12032             : 
   12033          24 : static int py_trustAuthInOutBlob_set_count(PyObject *py_obj, PyObject *value, void *closure)
   12034             : {
   12035          24 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(py_obj);
   12036          24 :         if (value == NULL) {
   12037           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   12038           0 :                 return -1;
   12039             :         }
   12040             :         {
   12041          24 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   12042          24 :                 if (PyLong_Check(value)) {
   12043           0 :                         unsigned long long test_var;
   12044          24 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12045          24 :                         if (PyErr_Occurred() != NULL) {
   12046           0 :                                 return -1;
   12047             :                         }
   12048          24 :                         if (test_var > uint_max) {
   12049           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12050             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12051           0 :                                 return -1;
   12052             :                         }
   12053          24 :                         object->count = test_var;
   12054             :                 } else {
   12055           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12056             :                           PyLong_Type.tp_name);
   12057           0 :                         return -1;
   12058             :                 }
   12059             :         }
   12060          24 :         return 0;
   12061             : }
   12062             : 
   12063           0 : static PyObject *py_trustAuthInOutBlob_get_current_offset(PyObject *obj, void *closure)
   12064             : {
   12065           0 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(obj);
   12066           0 :         PyObject *py_current_offset;
   12067           0 :         py_current_offset = PyLong_FromUnsignedLongLong((uint32_t)(object->current_offset));
   12068           0 :         return py_current_offset;
   12069             : }
   12070             : 
   12071           0 : static int py_trustAuthInOutBlob_set_current_offset(PyObject *py_obj, PyObject *value, void *closure)
   12072             : {
   12073           0 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(py_obj);
   12074           0 :         if (value == NULL) {
   12075           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->current_offset");
   12076           0 :                 return -1;
   12077             :         }
   12078             :         {
   12079           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_offset));
   12080           0 :                 if (PyLong_Check(value)) {
   12081           0 :                         unsigned long long test_var;
   12082           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12083           0 :                         if (PyErr_Occurred() != NULL) {
   12084           0 :                                 return -1;
   12085             :                         }
   12086           0 :                         if (test_var > uint_max) {
   12087           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12088             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12089           0 :                                 return -1;
   12090             :                         }
   12091           0 :                         object->current_offset = test_var;
   12092             :                 } else {
   12093           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12094             :                           PyLong_Type.tp_name);
   12095           0 :                         return -1;
   12096             :                 }
   12097             :         }
   12098           0 :         return 0;
   12099             : }
   12100             : 
   12101           0 : static PyObject *py_trustAuthInOutBlob_get_previous_offset(PyObject *obj, void *closure)
   12102             : {
   12103           0 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(obj);
   12104           0 :         PyObject *py_previous_offset;
   12105           0 :         py_previous_offset = PyLong_FromUnsignedLongLong((uint32_t)(object->previous_offset));
   12106           0 :         return py_previous_offset;
   12107             : }
   12108             : 
   12109           0 : static int py_trustAuthInOutBlob_set_previous_offset(PyObject *py_obj, PyObject *value, void *closure)
   12110             : {
   12111           0 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(py_obj);
   12112           0 :         if (value == NULL) {
   12113           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->previous_offset");
   12114           0 :                 return -1;
   12115             :         }
   12116             :         {
   12117           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->previous_offset));
   12118           0 :                 if (PyLong_Check(value)) {
   12119           0 :                         unsigned long long test_var;
   12120           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12121           0 :                         if (PyErr_Occurred() != NULL) {
   12122           0 :                                 return -1;
   12123             :                         }
   12124           0 :                         if (test_var > uint_max) {
   12125           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12126             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12127           0 :                                 return -1;
   12128             :                         }
   12129           0 :                         object->previous_offset = test_var;
   12130             :                 } else {
   12131           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12132             :                           PyLong_Type.tp_name);
   12133           0 :                         return -1;
   12134             :                 }
   12135             :         }
   12136           0 :         return 0;
   12137             : }
   12138             : 
   12139           0 : static PyObject *py_trustAuthInOutBlob_get_current(PyObject *obj, void *closure)
   12140             : {
   12141           0 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(obj);
   12142           0 :         PyObject *py_current;
   12143           0 :         py_current = pytalloc_reference_ex(&AuthenticationInformationArray_Type, pytalloc_get_mem_ctx(obj), &object->current);
   12144           0 :         return py_current;
   12145             : }
   12146             : 
   12147          21 : static int py_trustAuthInOutBlob_set_current(PyObject *py_obj, PyObject *value, void *closure)
   12148             : {
   12149          21 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(py_obj);
   12150          21 :         if (value == NULL) {
   12151           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->current");
   12152           0 :                 return -1;
   12153             :         }
   12154          21 :         PY_CHECK_TYPE(&AuthenticationInformationArray_Type, value, return -1;);
   12155          21 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12156           0 :                 PyErr_NoMemory();
   12157           0 :                 return -1;
   12158             :         }
   12159          21 :         object->current = *(struct AuthenticationInformationArray *)pytalloc_get_ptr(value);
   12160          21 :         return 0;
   12161             : }
   12162             : 
   12163           0 : static PyObject *py_trustAuthInOutBlob_get_previous(PyObject *obj, void *closure)
   12164             : {
   12165           0 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(obj);
   12166           0 :         PyObject *py_previous;
   12167           0 :         py_previous = pytalloc_reference_ex(&AuthenticationInformationArray_Type, pytalloc_get_mem_ctx(obj), &object->previous);
   12168           0 :         return py_previous;
   12169             : }
   12170             : 
   12171           0 : static int py_trustAuthInOutBlob_set_previous(PyObject *py_obj, PyObject *value, void *closure)
   12172             : {
   12173           0 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(py_obj);
   12174           0 :         if (value == NULL) {
   12175           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->previous");
   12176           0 :                 return -1;
   12177             :         }
   12178           0 :         PY_CHECK_TYPE(&AuthenticationInformationArray_Type, value, return -1;);
   12179           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12180           0 :                 PyErr_NoMemory();
   12181           0 :                 return -1;
   12182             :         }
   12183           0 :         object->previous = *(struct AuthenticationInformationArray *)pytalloc_get_ptr(value);
   12184           0 :         return 0;
   12185             : }
   12186             : 
   12187             : static PyGetSetDef py_trustAuthInOutBlob_getsetters[] = {
   12188             :         {
   12189             :                 .name = discard_const_p(char, "count"),
   12190             :                 .get = py_trustAuthInOutBlob_get_count,
   12191             :                 .set = py_trustAuthInOutBlob_set_count,
   12192             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12193             :         },
   12194             :         {
   12195             :                 .name = discard_const_p(char, "current_offset"),
   12196             :                 .get = py_trustAuthInOutBlob_get_current_offset,
   12197             :                 .set = py_trustAuthInOutBlob_set_current_offset,
   12198             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12199             :         },
   12200             :         {
   12201             :                 .name = discard_const_p(char, "previous_offset"),
   12202             :                 .get = py_trustAuthInOutBlob_get_previous_offset,
   12203             :                 .set = py_trustAuthInOutBlob_set_previous_offset,
   12204             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12205             :         },
   12206             :         {
   12207             :                 .name = discard_const_p(char, "current"),
   12208             :                 .get = py_trustAuthInOutBlob_get_current,
   12209             :                 .set = py_trustAuthInOutBlob_set_current,
   12210             :                 .doc = discard_const_p(char, "PIDL-generated element of base type AuthenticationInformationArray")
   12211             :         },
   12212             :         {
   12213             :                 .name = discard_const_p(char, "previous"),
   12214             :                 .get = py_trustAuthInOutBlob_get_previous,
   12215             :                 .set = py_trustAuthInOutBlob_set_previous,
   12216             :                 .doc = discard_const_p(char, "PIDL-generated element of base type AuthenticationInformationArray")
   12217             :         },
   12218             :         { .name = NULL }
   12219             : };
   12220             : 
   12221          24 : static PyObject *py_trustAuthInOutBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12222             : {
   12223          24 :         return pytalloc_new(struct trustAuthInOutBlob, type);
   12224             : }
   12225             : 
   12226           0 : static PyObject *py_trustAuthInOutBlob_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   12227             : {
   12228           0 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(py_obj);
   12229           0 :         PyObject *ret = NULL;
   12230           0 :         DATA_BLOB blob;
   12231           0 :         enum ndr_err_code err;
   12232           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   12233           0 :         if (tmp_ctx == NULL) {
   12234           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   12235           0 :                 return NULL;
   12236             :         }
   12237           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob);
   12238           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12239           0 :                 TALLOC_FREE(tmp_ctx);
   12240           0 :                 PyErr_SetNdrError(err);
   12241           0 :                 return NULL;
   12242             :         }
   12243             : 
   12244           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   12245           0 :         TALLOC_FREE(tmp_ctx);
   12246           0 :         return ret;
   12247             : }
   12248             : 
   12249           0 : static PyObject *py_trustAuthInOutBlob_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12250             : {
   12251           0 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(py_obj);
   12252           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   12253           0 :         Py_ssize_t blob_length = 0;
   12254           0 :         enum ndr_err_code err;
   12255           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   12256           0 :         PyObject *allow_remaining_obj = NULL;
   12257           0 :         bool allow_remaining = false;
   12258             : 
   12259           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   12260             :                 discard_const_p(char *, kwnames),
   12261             :                 &blob.data, &blob_length,
   12262             :                 &allow_remaining_obj)) {
   12263           0 :                 return NULL;
   12264             :         }
   12265           0 :         blob.length = blob_length;
   12266             : 
   12267           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12268           0 :                 allow_remaining = true;
   12269             :         }
   12270             : 
   12271           0 :         if (allow_remaining) {
   12272           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_trustAuthInOutBlob);
   12273             :         } else {
   12274           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_trustAuthInOutBlob);
   12275             :         }
   12276           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12277           0 :                 PyErr_SetNdrError(err);
   12278           0 :                 return NULL;
   12279             :         }
   12280             : 
   12281           0 :         Py_RETURN_NONE;
   12282             : }
   12283             : 
   12284           0 : static PyObject *py_trustAuthInOutBlob_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12285             : {
   12286           0 :         struct trustAuthInOutBlob *object = pytalloc_get_ptr(py_obj);
   12287           0 :         PyObject *ret;
   12288           0 :         char *retstr;
   12289             : 
   12290           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_trustAuthInOutBlob, "trustAuthInOutBlob", object);
   12291           0 :         ret = PyUnicode_FromString(retstr);
   12292           0 :         talloc_free(retstr);
   12293             : 
   12294           0 :         return ret;
   12295             : }
   12296             : 
   12297             : static PyMethodDef py_trustAuthInOutBlob_methods[] = {
   12298             :         { "__ndr_pack__", (PyCFunction)py_trustAuthInOutBlob_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   12299             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_trustAuthInOutBlob_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   12300             :         { "__ndr_print__", (PyCFunction)py_trustAuthInOutBlob_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   12301             :         { NULL, NULL, 0, NULL }
   12302             : };
   12303             : 
   12304             : 
   12305             : static PyTypeObject trustAuthInOutBlob_Type = {
   12306             :         PyVarObject_HEAD_INIT(NULL, 0)
   12307             :         .tp_name = "drsblobs.trustAuthInOutBlob",
   12308             :         .tp_getset = py_trustAuthInOutBlob_getsetters,
   12309             :         .tp_methods = py_trustAuthInOutBlob_methods,
   12310             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12311             :         .tp_new = py_trustAuthInOutBlob_new,
   12312             : };
   12313             : 
   12314             : 
   12315           0 : static PyObject *py_trustDomainPasswords_get_confounder(PyObject *obj, void *closure)
   12316             : {
   12317           0 :         struct trustDomainPasswords *object = pytalloc_get_ptr(obj);
   12318           0 :         PyObject *py_confounder;
   12319           0 :         py_confounder = PyList_New(512);
   12320           0 :         if (py_confounder == NULL) {
   12321           0 :                 return NULL;
   12322             :         }
   12323             :         {
   12324             :                 int confounder_cntr_0;
   12325           0 :                 for (confounder_cntr_0 = 0; confounder_cntr_0 < (512); confounder_cntr_0++) {
   12326           0 :                         PyObject *py_confounder_0;
   12327           0 :                         py_confounder_0 = PyLong_FromLong((uint16_t)((object->confounder)[confounder_cntr_0]));
   12328           0 :                         PyList_SetItem(py_confounder, confounder_cntr_0, py_confounder_0);
   12329             :                 }
   12330             :         }
   12331           0 :         return py_confounder;
   12332             : }
   12333             : 
   12334          24 : static int py_trustDomainPasswords_set_confounder(PyObject *py_obj, PyObject *value, void *closure)
   12335             : {
   12336          24 :         struct trustDomainPasswords *object = pytalloc_get_ptr(py_obj);
   12337          24 :         if (value == NULL) {
   12338           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->confounder");
   12339           0 :                 return -1;
   12340             :         }
   12341          24 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   12342             :         {
   12343           0 :                 int confounder_cntr_0;
   12344          24 :                 if (ARRAY_SIZE(object->confounder) != PyList_GET_SIZE(value)) {
   12345           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->confounder),  PyList_GET_SIZE(value));
   12346           0 :                         return -1;
   12347             :                 }
   12348       12312 :                 for (confounder_cntr_0 = 0; confounder_cntr_0 < PyList_GET_SIZE(value); confounder_cntr_0++) {
   12349       12288 :                         if (PyList_GET_ITEM(value, confounder_cntr_0) == NULL) {
   12350           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->confounder)[confounder_cntr_0]");
   12351           0 :                                 return -1;
   12352             :                         }
   12353             :                         {
   12354       12288 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->confounder)[confounder_cntr_0]));
   12355       12288 :                                 if (PyLong_Check(PyList_GET_ITEM(value, confounder_cntr_0))) {
   12356           0 :                                         unsigned long long test_var;
   12357       12288 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, confounder_cntr_0));
   12358       12288 :                                         if (PyErr_Occurred() != NULL) {
   12359           0 :                                                 return -1;
   12360             :                                         }
   12361       12288 :                                         if (test_var > uint_max) {
   12362           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12363             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   12364           0 :                                                 return -1;
   12365             :                                         }
   12366       12288 :                                         (object->confounder)[confounder_cntr_0] = test_var;
   12367             :                                 } else {
   12368           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12369             :                                           PyLong_Type.tp_name);
   12370           0 :                                         return -1;
   12371             :                                 }
   12372             :                         }
   12373             :                 }
   12374             :         }
   12375          24 :         return 0;
   12376             : }
   12377             : 
   12378           0 : static PyObject *py_trustDomainPasswords_get_outgoing(PyObject *obj, void *closure)
   12379             : {
   12380           0 :         struct trustDomainPasswords *object = pytalloc_get_ptr(obj);
   12381           0 :         PyObject *py_outgoing;
   12382           0 :         py_outgoing = pytalloc_reference_ex(&trustAuthInOutBlob_Type, pytalloc_get_mem_ctx(obj), &object->outgoing);
   12383           0 :         return py_outgoing;
   12384             : }
   12385             : 
   12386          24 : static int py_trustDomainPasswords_set_outgoing(PyObject *py_obj, PyObject *value, void *closure)
   12387             : {
   12388          24 :         struct trustDomainPasswords *object = pytalloc_get_ptr(py_obj);
   12389          24 :         if (value == NULL) {
   12390           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->outgoing");
   12391           0 :                 return -1;
   12392             :         }
   12393          24 :         PY_CHECK_TYPE(&trustAuthInOutBlob_Type, value, return -1;);
   12394          24 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12395           0 :                 PyErr_NoMemory();
   12396           0 :                 return -1;
   12397             :         }
   12398          24 :         object->outgoing = *(struct trustAuthInOutBlob *)pytalloc_get_ptr(value);
   12399          24 :         return 0;
   12400             : }
   12401             : 
   12402           0 : static PyObject *py_trustDomainPasswords_get_incoming(PyObject *obj, void *closure)
   12403             : {
   12404           0 :         struct trustDomainPasswords *object = pytalloc_get_ptr(obj);
   12405           0 :         PyObject *py_incoming;
   12406           0 :         py_incoming = pytalloc_reference_ex(&trustAuthInOutBlob_Type, pytalloc_get_mem_ctx(obj), &object->incoming);
   12407           0 :         return py_incoming;
   12408             : }
   12409             : 
   12410          24 : static int py_trustDomainPasswords_set_incoming(PyObject *py_obj, PyObject *value, void *closure)
   12411             : {
   12412          24 :         struct trustDomainPasswords *object = pytalloc_get_ptr(py_obj);
   12413          24 :         if (value == NULL) {
   12414           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->incoming");
   12415           0 :                 return -1;
   12416             :         }
   12417          24 :         PY_CHECK_TYPE(&trustAuthInOutBlob_Type, value, return -1;);
   12418          24 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12419           0 :                 PyErr_NoMemory();
   12420           0 :                 return -1;
   12421             :         }
   12422          24 :         object->incoming = *(struct trustAuthInOutBlob *)pytalloc_get_ptr(value);
   12423          24 :         return 0;
   12424             : }
   12425             : 
   12426           0 : static PyObject *py_trustDomainPasswords_get_outgoing_size(PyObject *obj, void *closure)
   12427             : {
   12428           0 :         struct trustDomainPasswords *object = pytalloc_get_ptr(obj);
   12429           0 :         PyObject *py_outgoing_size;
   12430           0 :         py_outgoing_size = PyLong_FromUnsignedLongLong((uint32_t)(object->outgoing_size));
   12431           0 :         return py_outgoing_size;
   12432             : }
   12433             : 
   12434           0 : static int py_trustDomainPasswords_set_outgoing_size(PyObject *py_obj, PyObject *value, void *closure)
   12435             : {
   12436           0 :         struct trustDomainPasswords *object = pytalloc_get_ptr(py_obj);
   12437           0 :         if (value == NULL) {
   12438           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->outgoing_size");
   12439           0 :                 return -1;
   12440             :         }
   12441             :         {
   12442           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->outgoing_size));
   12443           0 :                 if (PyLong_Check(value)) {
   12444           0 :                         unsigned long long test_var;
   12445           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12446           0 :                         if (PyErr_Occurred() != NULL) {
   12447           0 :                                 return -1;
   12448             :                         }
   12449           0 :                         if (test_var > uint_max) {
   12450           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12451             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12452           0 :                                 return -1;
   12453             :                         }
   12454           0 :                         object->outgoing_size = test_var;
   12455             :                 } else {
   12456           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12457             :                           PyLong_Type.tp_name);
   12458           0 :                         return -1;
   12459             :                 }
   12460             :         }
   12461           0 :         return 0;
   12462             : }
   12463             : 
   12464           0 : static PyObject *py_trustDomainPasswords_get_incoming_size(PyObject *obj, void *closure)
   12465             : {
   12466           0 :         struct trustDomainPasswords *object = pytalloc_get_ptr(obj);
   12467           0 :         PyObject *py_incoming_size;
   12468           0 :         py_incoming_size = PyLong_FromUnsignedLongLong((uint32_t)(object->incoming_size));
   12469           0 :         return py_incoming_size;
   12470             : }
   12471             : 
   12472           0 : static int py_trustDomainPasswords_set_incoming_size(PyObject *py_obj, PyObject *value, void *closure)
   12473             : {
   12474           0 :         struct trustDomainPasswords *object = pytalloc_get_ptr(py_obj);
   12475           0 :         if (value == NULL) {
   12476           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->incoming_size");
   12477           0 :                 return -1;
   12478             :         }
   12479             :         {
   12480           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->incoming_size));
   12481           0 :                 if (PyLong_Check(value)) {
   12482           0 :                         unsigned long long test_var;
   12483           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12484           0 :                         if (PyErr_Occurred() != NULL) {
   12485           0 :                                 return -1;
   12486             :                         }
   12487           0 :                         if (test_var > uint_max) {
   12488           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12489             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12490           0 :                                 return -1;
   12491             :                         }
   12492           0 :                         object->incoming_size = test_var;
   12493             :                 } else {
   12494           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12495             :                           PyLong_Type.tp_name);
   12496           0 :                         return -1;
   12497             :                 }
   12498             :         }
   12499           0 :         return 0;
   12500             : }
   12501             : 
   12502             : static PyGetSetDef py_trustDomainPasswords_getsetters[] = {
   12503             :         {
   12504             :                 .name = discard_const_p(char, "confounder"),
   12505             :                 .get = py_trustDomainPasswords_get_confounder,
   12506             :                 .set = py_trustDomainPasswords_set_confounder,
   12507             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   12508             :         },
   12509             :         {
   12510             :                 .name = discard_const_p(char, "outgoing"),
   12511             :                 .get = py_trustDomainPasswords_get_outgoing,
   12512             :                 .set = py_trustDomainPasswords_set_outgoing,
   12513             :                 .doc = discard_const_p(char, "PIDL-generated element of base type trustAuthInOutBlob")
   12514             :         },
   12515             :         {
   12516             :                 .name = discard_const_p(char, "incoming"),
   12517             :                 .get = py_trustDomainPasswords_get_incoming,
   12518             :                 .set = py_trustDomainPasswords_set_incoming,
   12519             :                 .doc = discard_const_p(char, "PIDL-generated element of base type trustAuthInOutBlob")
   12520             :         },
   12521             :         {
   12522             :                 .name = discard_const_p(char, "outgoing_size"),
   12523             :                 .get = py_trustDomainPasswords_get_outgoing_size,
   12524             :                 .set = py_trustDomainPasswords_set_outgoing_size,
   12525             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12526             :         },
   12527             :         {
   12528             :                 .name = discard_const_p(char, "incoming_size"),
   12529             :                 .get = py_trustDomainPasswords_get_incoming_size,
   12530             :                 .set = py_trustDomainPasswords_set_incoming_size,
   12531             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12532             :         },
   12533             :         { .name = NULL }
   12534             : };
   12535             : 
   12536          24 : static PyObject *py_trustDomainPasswords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12537             : {
   12538          24 :         return pytalloc_new(struct trustDomainPasswords, type);
   12539             : }
   12540             : 
   12541          24 : static PyObject *py_trustDomainPasswords_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   12542             : {
   12543          24 :         struct trustDomainPasswords *object = pytalloc_get_ptr(py_obj);
   12544          24 :         PyObject *ret = NULL;
   12545           0 :         DATA_BLOB blob;
   12546           0 :         enum ndr_err_code err;
   12547          24 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   12548          24 :         if (tmp_ctx == NULL) {
   12549           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   12550           0 :                 return NULL;
   12551             :         }
   12552          24 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_trustDomainPasswords);
   12553          24 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12554           0 :                 TALLOC_FREE(tmp_ctx);
   12555           0 :                 PyErr_SetNdrError(err);
   12556           0 :                 return NULL;
   12557             :         }
   12558             : 
   12559          24 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   12560          24 :         TALLOC_FREE(tmp_ctx);
   12561          24 :         return ret;
   12562             : }
   12563             : 
   12564           0 : static PyObject *py_trustDomainPasswords_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12565             : {
   12566           0 :         struct trustDomainPasswords *object = pytalloc_get_ptr(py_obj);
   12567           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   12568           0 :         Py_ssize_t blob_length = 0;
   12569           0 :         enum ndr_err_code err;
   12570           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   12571           0 :         PyObject *allow_remaining_obj = NULL;
   12572           0 :         bool allow_remaining = false;
   12573             : 
   12574           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   12575             :                 discard_const_p(char *, kwnames),
   12576             :                 &blob.data, &blob_length,
   12577             :                 &allow_remaining_obj)) {
   12578           0 :                 return NULL;
   12579             :         }
   12580           0 :         blob.length = blob_length;
   12581             : 
   12582           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12583           0 :                 allow_remaining = true;
   12584             :         }
   12585             : 
   12586           0 :         if (allow_remaining) {
   12587           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_trustDomainPasswords);
   12588             :         } else {
   12589           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_trustDomainPasswords);
   12590             :         }
   12591           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12592           0 :                 PyErr_SetNdrError(err);
   12593           0 :                 return NULL;
   12594             :         }
   12595             : 
   12596           0 :         Py_RETURN_NONE;
   12597             : }
   12598             : 
   12599           0 : static PyObject *py_trustDomainPasswords_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12600             : {
   12601           0 :         struct trustDomainPasswords *object = pytalloc_get_ptr(py_obj);
   12602           0 :         PyObject *ret;
   12603           0 :         char *retstr;
   12604             : 
   12605           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_trustDomainPasswords, "trustDomainPasswords", object);
   12606           0 :         ret = PyUnicode_FromString(retstr);
   12607           0 :         talloc_free(retstr);
   12608             : 
   12609           0 :         return ret;
   12610             : }
   12611             : 
   12612             : static PyMethodDef py_trustDomainPasswords_methods[] = {
   12613             :         { "__ndr_pack__", (PyCFunction)py_trustDomainPasswords_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   12614             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_trustDomainPasswords_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   12615             :         { "__ndr_print__", (PyCFunction)py_trustDomainPasswords_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   12616             :         { NULL, NULL, 0, NULL }
   12617             : };
   12618             : 
   12619             : 
   12620             : static PyTypeObject trustDomainPasswords_Type = {
   12621             :         PyVarObject_HEAD_INIT(NULL, 0)
   12622             :         .tp_name = "drsblobs.trustDomainPasswords",
   12623             :         .tp_getset = py_trustDomainPasswords_getsetters,
   12624             :         .tp_methods = py_trustDomainPasswords_methods,
   12625             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12626             :         .tp_new = py_trustDomainPasswords_new,
   12627             : };
   12628             : 
   12629             : 
   12630           0 : static PyObject *py_DsCompressedChunk_get_marker(PyObject *obj, void *closure)
   12631             : {
   12632           0 :         struct DsCompressedChunk *object = pytalloc_get_ptr(obj);
   12633           0 :         PyObject *py_marker;
   12634           0 :         py_marker = PyLong_FromUnsignedLongLong((uint32_t)(object->marker));
   12635           0 :         return py_marker;
   12636             : }
   12637             : 
   12638           0 : static int py_DsCompressedChunk_set_marker(PyObject *py_obj, PyObject *value, void *closure)
   12639             : {
   12640           0 :         struct DsCompressedChunk *object = pytalloc_get_ptr(py_obj);
   12641           0 :         if (value == NULL) {
   12642           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->marker");
   12643           0 :                 return -1;
   12644             :         }
   12645             :         {
   12646           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->marker));
   12647           0 :                 if (PyLong_Check(value)) {
   12648           0 :                         unsigned long long test_var;
   12649           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12650           0 :                         if (PyErr_Occurred() != NULL) {
   12651           0 :                                 return -1;
   12652             :                         }
   12653           0 :                         if (test_var > uint_max) {
   12654           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12655             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12656           0 :                                 return -1;
   12657             :                         }
   12658           0 :                         object->marker = test_var;
   12659             :                 } else {
   12660           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12661             :                           PyLong_Type.tp_name);
   12662           0 :                         return -1;
   12663             :                 }
   12664             :         }
   12665           0 :         return 0;
   12666             : }
   12667             : 
   12668           0 : static PyObject *py_DsCompressedChunk_get_data(PyObject *obj, void *closure)
   12669             : {
   12670           0 :         struct DsCompressedChunk *object = pytalloc_get_ptr(obj);
   12671           0 :         PyObject *py_data;
   12672           0 :         py_data = PyBytes_FromStringAndSize((char *)(object->data).data, (object->data).length);
   12673           0 :         return py_data;
   12674             : }
   12675             : 
   12676           0 : static int py_DsCompressedChunk_set_data(PyObject *py_obj, PyObject *value, void *closure)
   12677             : {
   12678           0 :         struct DsCompressedChunk *object = pytalloc_get_ptr(py_obj);
   12679           0 :         if (value == NULL) {
   12680           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
   12681           0 :                 return -1;
   12682             :         }
   12683           0 :         object->data = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   12684           0 :         return 0;
   12685             : }
   12686             : 
   12687             : static PyGetSetDef py_DsCompressedChunk_getsetters[] = {
   12688             :         {
   12689             :                 .name = discard_const_p(char, "marker"),
   12690             :                 .get = py_DsCompressedChunk_get_marker,
   12691             :                 .set = py_DsCompressedChunk_set_marker,
   12692             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12693             :         },
   12694             :         {
   12695             :                 .name = discard_const_p(char, "data"),
   12696             :                 .get = py_DsCompressedChunk_get_data,
   12697             :                 .set = py_DsCompressedChunk_set_data,
   12698             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   12699             :         },
   12700             :         { .name = NULL }
   12701             : };
   12702             : 
   12703           0 : static PyObject *py_DsCompressedChunk_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12704             : {
   12705           0 :         return pytalloc_new(struct DsCompressedChunk, type);
   12706             : }
   12707             : 
   12708           0 : static PyObject *py_DsCompressedChunk_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   12709             : {
   12710           0 :         struct DsCompressedChunk *object = pytalloc_get_ptr(py_obj);
   12711           0 :         PyObject *ret = NULL;
   12712           0 :         DATA_BLOB blob;
   12713           0 :         enum ndr_err_code err;
   12714           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   12715           0 :         if (tmp_ctx == NULL) {
   12716           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   12717           0 :                 return NULL;
   12718             :         }
   12719           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DsCompressedChunk);
   12720           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12721           0 :                 TALLOC_FREE(tmp_ctx);
   12722           0 :                 PyErr_SetNdrError(err);
   12723           0 :                 return NULL;
   12724             :         }
   12725             : 
   12726           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   12727           0 :         TALLOC_FREE(tmp_ctx);
   12728           0 :         return ret;
   12729             : }
   12730             : 
   12731           0 : static PyObject *py_DsCompressedChunk_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   12732             : {
   12733           0 :         struct DsCompressedChunk *object = pytalloc_get_ptr(py_obj);
   12734           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   12735           0 :         Py_ssize_t blob_length = 0;
   12736           0 :         enum ndr_err_code err;
   12737           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   12738           0 :         PyObject *allow_remaining_obj = NULL;
   12739           0 :         bool allow_remaining = false;
   12740             : 
   12741           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   12742             :                 discard_const_p(char *, kwnames),
   12743             :                 &blob.data, &blob_length,
   12744             :                 &allow_remaining_obj)) {
   12745           0 :                 return NULL;
   12746             :         }
   12747           0 :         blob.length = blob_length;
   12748             : 
   12749           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   12750           0 :                 allow_remaining = true;
   12751             :         }
   12752             : 
   12753           0 :         if (allow_remaining) {
   12754           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DsCompressedChunk);
   12755             :         } else {
   12756           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DsCompressedChunk);
   12757             :         }
   12758           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   12759           0 :                 PyErr_SetNdrError(err);
   12760           0 :                 return NULL;
   12761             :         }
   12762             : 
   12763           0 :         Py_RETURN_NONE;
   12764             : }
   12765             : 
   12766           0 : static PyObject *py_DsCompressedChunk_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   12767             : {
   12768           0 :         struct DsCompressedChunk *object = pytalloc_get_ptr(py_obj);
   12769           0 :         PyObject *ret;
   12770           0 :         char *retstr;
   12771             : 
   12772           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_DsCompressedChunk, "DsCompressedChunk", object);
   12773           0 :         ret = PyUnicode_FromString(retstr);
   12774           0 :         talloc_free(retstr);
   12775             : 
   12776           0 :         return ret;
   12777             : }
   12778             : 
   12779             : static PyMethodDef py_DsCompressedChunk_methods[] = {
   12780             :         { "__ndr_pack__", (PyCFunction)py_DsCompressedChunk_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   12781             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DsCompressedChunk_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   12782             :         { "__ndr_print__", (PyCFunction)py_DsCompressedChunk_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   12783             :         { NULL, NULL, 0, NULL }
   12784             : };
   12785             : 
   12786             : 
   12787             : static PyTypeObject DsCompressedChunk_Type = {
   12788             :         PyVarObject_HEAD_INIT(NULL, 0)
   12789             :         .tp_name = "drsblobs.DsCompressedChunk",
   12790             :         .tp_getset = py_DsCompressedChunk_getsetters,
   12791             :         .tp_methods = py_DsCompressedChunk_methods,
   12792             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12793             :         .tp_new = py_DsCompressedChunk_new,
   12794             : };
   12795             : 
   12796             : 
   12797           0 : static PyObject *py_ExtendedErrorAString_get___size(PyObject *obj, void *closure)
   12798             : {
   12799           0 :         struct ExtendedErrorAString *object = pytalloc_get_ptr(obj);
   12800           0 :         PyObject *py___size;
   12801           0 :         py___size = PyLong_FromLong((uint16_t)(object->__size));
   12802           0 :         return py___size;
   12803             : }
   12804             : 
   12805           0 : static int py_ExtendedErrorAString_set___size(PyObject *py_obj, PyObject *value, void *closure)
   12806             : {
   12807           0 :         struct ExtendedErrorAString *object = pytalloc_get_ptr(py_obj);
   12808           0 :         if (value == NULL) {
   12809           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__size");
   12810           0 :                 return -1;
   12811             :         }
   12812             :         {
   12813           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__size));
   12814           0 :                 if (PyLong_Check(value)) {
   12815           0 :                         unsigned long long test_var;
   12816           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12817           0 :                         if (PyErr_Occurred() != NULL) {
   12818           0 :                                 return -1;
   12819             :                         }
   12820           0 :                         if (test_var > uint_max) {
   12821           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12822             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12823           0 :                                 return -1;
   12824             :                         }
   12825           0 :                         object->__size = test_var;
   12826             :                 } else {
   12827           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12828             :                           PyLong_Type.tp_name);
   12829           0 :                         return -1;
   12830             :                 }
   12831             :         }
   12832           0 :         return 0;
   12833             : }
   12834             : 
   12835           0 : static PyObject *py_ExtendedErrorAString_get_string(PyObject *obj, void *closure)
   12836             : {
   12837           0 :         struct ExtendedErrorAString *object = pytalloc_get_ptr(obj);
   12838           0 :         PyObject *py_string;
   12839           0 :         if (object->string == NULL) {
   12840           0 :                 Py_RETURN_NONE;
   12841             :         }
   12842           0 :         if (object->string == NULL) {
   12843           0 :                 py_string = Py_None;
   12844           0 :                 Py_INCREF(py_string);
   12845             :         } else {
   12846           0 :                 if (object->string == NULL) {
   12847           0 :                         py_string = Py_None;
   12848           0 :                         Py_INCREF(py_string);
   12849             :                 } else {
   12850           0 :                         py_string = PyUnicode_Decode(object->string, strlen(object->string), "utf-8", "ignore");
   12851             :                 }
   12852             :         }
   12853           0 :         return py_string;
   12854             : }
   12855             : 
   12856           0 : static int py_ExtendedErrorAString_set_string(PyObject *py_obj, PyObject *value, void *closure)
   12857             : {
   12858           0 :         struct ExtendedErrorAString *object = pytalloc_get_ptr(py_obj);
   12859           0 :         if (value == NULL) {
   12860           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->string");
   12861           0 :                 return -1;
   12862             :         }
   12863           0 :         if (value == Py_None) {
   12864           0 :                 object->string = NULL;
   12865             :         } else {
   12866           0 :                 object->string = NULL;
   12867             :                 {
   12868           0 :                         const char *test_str;
   12869           0 :                         const char *talloc_str;
   12870           0 :                         PyObject *unicode = NULL;
   12871           0 :                         if (PyUnicode_Check(value)) {
   12872           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12873           0 :                                 if (unicode == NULL) {
   12874           0 :                                         return -1;
   12875             :                                 }
   12876           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12877           0 :                         } else if (PyBytes_Check(value)) {
   12878           0 :                                 test_str = PyBytes_AS_STRING(value);
   12879             :                         } else {
   12880           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12881           0 :                                 return -1;
   12882             :                         }
   12883           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12884           0 :                         if (unicode != NULL) {
   12885           0 :                                 Py_DECREF(unicode);
   12886             :                         }
   12887           0 :                         if (talloc_str == NULL) {
   12888           0 :                                 PyErr_NoMemory();
   12889           0 :                                 return -1;
   12890             :                         }
   12891           0 :                         object->string = talloc_str;
   12892             :                 }
   12893             :         }
   12894           0 :         return 0;
   12895             : }
   12896             : 
   12897             : static PyGetSetDef py_ExtendedErrorAString_getsetters[] = {
   12898             :         {
   12899             :                 .name = discard_const_p(char, "__size"),
   12900             :                 .get = py_ExtendedErrorAString_get___size,
   12901             :                 .set = py_ExtendedErrorAString_set___size,
   12902             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   12903             :         },
   12904             :         {
   12905             :                 .name = discard_const_p(char, "string"),
   12906             :                 .get = py_ExtendedErrorAString_get_string,
   12907             :                 .set = py_ExtendedErrorAString_set_string,
   12908             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   12909             :         },
   12910             :         { .name = NULL }
   12911             : };
   12912             : 
   12913           0 : static PyObject *py_ExtendedErrorAString_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12914             : {
   12915           0 :         return pytalloc_new(struct ExtendedErrorAString, type);
   12916             : }
   12917             : 
   12918             : 
   12919             : static PyTypeObject ExtendedErrorAString_Type = {
   12920             :         PyVarObject_HEAD_INIT(NULL, 0)
   12921             :         .tp_name = "drsblobs.ExtendedErrorAString",
   12922             :         .tp_getset = py_ExtendedErrorAString_getsetters,
   12923             :         .tp_methods = NULL,
   12924             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12925             :         .tp_new = py_ExtendedErrorAString_new,
   12926             : };
   12927             : 
   12928             : 
   12929           0 : static PyObject *py_ExtendedErrorUString_get___size(PyObject *obj, void *closure)
   12930             : {
   12931           0 :         struct ExtendedErrorUString *object = pytalloc_get_ptr(obj);
   12932           0 :         PyObject *py___size;
   12933           0 :         py___size = PyLong_FromLong((uint16_t)(object->__size));
   12934           0 :         return py___size;
   12935             : }
   12936             : 
   12937           0 : static int py_ExtendedErrorUString_set___size(PyObject *py_obj, PyObject *value, void *closure)
   12938             : {
   12939           0 :         struct ExtendedErrorUString *object = pytalloc_get_ptr(py_obj);
   12940           0 :         if (value == NULL) {
   12941           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__size");
   12942           0 :                 return -1;
   12943             :         }
   12944             :         {
   12945           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__size));
   12946           0 :                 if (PyLong_Check(value)) {
   12947           0 :                         unsigned long long test_var;
   12948           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12949           0 :                         if (PyErr_Occurred() != NULL) {
   12950           0 :                                 return -1;
   12951             :                         }
   12952           0 :                         if (test_var > uint_max) {
   12953           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12954             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12955           0 :                                 return -1;
   12956             :                         }
   12957           0 :                         object->__size = test_var;
   12958             :                 } else {
   12959           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12960             :                           PyLong_Type.tp_name);
   12961           0 :                         return -1;
   12962             :                 }
   12963             :         }
   12964           0 :         return 0;
   12965             : }
   12966             : 
   12967           0 : static PyObject *py_ExtendedErrorUString_get_string(PyObject *obj, void *closure)
   12968             : {
   12969           0 :         struct ExtendedErrorUString *object = pytalloc_get_ptr(obj);
   12970           0 :         PyObject *py_string;
   12971           0 :         if (object->string == NULL) {
   12972           0 :                 Py_RETURN_NONE;
   12973             :         }
   12974           0 :         if (object->string == NULL) {
   12975           0 :                 py_string = Py_None;
   12976           0 :                 Py_INCREF(py_string);
   12977             :         } else {
   12978           0 :                 if (object->string == NULL) {
   12979           0 :                         py_string = Py_None;
   12980           0 :                         Py_INCREF(py_string);
   12981             :                 } else {
   12982           0 :                         py_string = PyUnicode_Decode(object->string, strlen(object->string), "utf-8", "ignore");
   12983             :                 }
   12984             :         }
   12985           0 :         return py_string;
   12986             : }
   12987             : 
   12988           0 : static int py_ExtendedErrorUString_set_string(PyObject *py_obj, PyObject *value, void *closure)
   12989             : {
   12990           0 :         struct ExtendedErrorUString *object = pytalloc_get_ptr(py_obj);
   12991           0 :         if (value == NULL) {
   12992           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->string");
   12993           0 :                 return -1;
   12994             :         }
   12995           0 :         if (value == Py_None) {
   12996           0 :                 object->string = NULL;
   12997             :         } else {
   12998           0 :                 object->string = NULL;
   12999             :                 {
   13000           0 :                         const char *test_str;
   13001           0 :                         const char *talloc_str;
   13002           0 :                         PyObject *unicode = NULL;
   13003           0 :                         if (PyUnicode_Check(value)) {
   13004           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13005           0 :                                 if (unicode == NULL) {
   13006           0 :                                         return -1;
   13007             :                                 }
   13008           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   13009           0 :                         } else if (PyBytes_Check(value)) {
   13010           0 :                                 test_str = PyBytes_AS_STRING(value);
   13011             :                         } else {
   13012           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13013           0 :                                 return -1;
   13014             :                         }
   13015           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13016           0 :                         if (unicode != NULL) {
   13017           0 :                                 Py_DECREF(unicode);
   13018             :                         }
   13019           0 :                         if (talloc_str == NULL) {
   13020           0 :                                 PyErr_NoMemory();
   13021           0 :                                 return -1;
   13022             :                         }
   13023           0 :                         object->string = talloc_str;
   13024             :                 }
   13025             :         }
   13026           0 :         return 0;
   13027             : }
   13028             : 
   13029             : static PyGetSetDef py_ExtendedErrorUString_getsetters[] = {
   13030             :         {
   13031             :                 .name = discard_const_p(char, "__size"),
   13032             :                 .get = py_ExtendedErrorUString_get___size,
   13033             :                 .set = py_ExtendedErrorUString_set___size,
   13034             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   13035             :         },
   13036             :         {
   13037             :                 .name = discard_const_p(char, "string"),
   13038             :                 .get = py_ExtendedErrorUString_get_string,
   13039             :                 .set = py_ExtendedErrorUString_set_string,
   13040             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   13041             :         },
   13042             :         { .name = NULL }
   13043             : };
   13044             : 
   13045           0 : static PyObject *py_ExtendedErrorUString_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13046             : {
   13047           0 :         return pytalloc_new(struct ExtendedErrorUString, type);
   13048             : }
   13049             : 
   13050             : 
   13051             : static PyTypeObject ExtendedErrorUString_Type = {
   13052             :         PyVarObject_HEAD_INIT(NULL, 0)
   13053             :         .tp_name = "drsblobs.ExtendedErrorUString",
   13054             :         .tp_getset = py_ExtendedErrorUString_getsetters,
   13055             :         .tp_methods = NULL,
   13056             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13057             :         .tp_new = py_ExtendedErrorUString_new,
   13058             : };
   13059             : 
   13060             : 
   13061           0 : static PyObject *py_ExtendedErrorBlob_get_length(PyObject *obj, void *closure)
   13062             : {
   13063           0 :         struct ExtendedErrorBlob *object = pytalloc_get_ptr(obj);
   13064           0 :         PyObject *py_length;
   13065           0 :         py_length = PyLong_FromLong((uint16_t)(object->length));
   13066           0 :         return py_length;
   13067             : }
   13068             : 
   13069           0 : static int py_ExtendedErrorBlob_set_length(PyObject *py_obj, PyObject *value, void *closure)
   13070             : {
   13071           0 :         struct ExtendedErrorBlob *object = pytalloc_get_ptr(py_obj);
   13072           0 :         if (value == NULL) {
   13073           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   13074           0 :                 return -1;
   13075             :         }
   13076             :         {
   13077           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   13078           0 :                 if (PyLong_Check(value)) {
   13079           0 :                         unsigned long long test_var;
   13080           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13081           0 :                         if (PyErr_Occurred() != NULL) {
   13082           0 :                                 return -1;
   13083             :                         }
   13084           0 :                         if (test_var > uint_max) {
   13085           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13086             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13087           0 :                                 return -1;
   13088             :                         }
   13089           0 :                         object->length = test_var;
   13090             :                 } else {
   13091           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13092             :                           PyLong_Type.tp_name);
   13093           0 :                         return -1;
   13094             :                 }
   13095             :         }
   13096           0 :         return 0;
   13097             : }
   13098             : 
   13099           0 : static PyObject *py_ExtendedErrorBlob_get_data(PyObject *obj, void *closure)
   13100             : {
   13101           0 :         struct ExtendedErrorBlob *object = pytalloc_get_ptr(obj);
   13102           0 :         PyObject *py_data;
   13103           0 :         if (object->data == NULL) {
   13104           0 :                 Py_RETURN_NONE;
   13105             :         }
   13106           0 :         if (object->data == NULL) {
   13107           0 :                 py_data = Py_None;
   13108           0 :                 Py_INCREF(py_data);
   13109             :         } else {
   13110           0 :                 py_data = PyList_New(object->length);
   13111           0 :                 if (py_data == NULL) {
   13112           0 :                         return NULL;
   13113             :                 }
   13114             :                 {
   13115             :                         int data_cntr_1;
   13116           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
   13117           0 :                                 PyObject *py_data_1;
   13118           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_1]));
   13119           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
   13120             :                         }
   13121             :                 }
   13122             :         }
   13123           0 :         return py_data;
   13124             : }
   13125             : 
   13126           0 : static int py_ExtendedErrorBlob_set_data(PyObject *py_obj, PyObject *value, void *closure)
   13127             : {
   13128           0 :         struct ExtendedErrorBlob *object = pytalloc_get_ptr(py_obj);
   13129           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
   13130           0 :         if (value == NULL) {
   13131           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
   13132           0 :                 return -1;
   13133             :         }
   13134           0 :         if (value == Py_None) {
   13135           0 :                 object->data = NULL;
   13136             :         } else {
   13137           0 :                 object->data = NULL;
   13138           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13139             :                 {
   13140           0 :                         int data_cntr_1;
   13141           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
   13142           0 :                         if (!object->data) { return -1; }
   13143           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
   13144           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
   13145           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
   13146           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->data)[data_cntr_1]");
   13147           0 :                                         return -1;
   13148             :                                 }
   13149             :                                 {
   13150           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_1]));
   13151           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
   13152           0 :                                                 unsigned long long test_var;
   13153           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
   13154           0 :                                                 if (PyErr_Occurred() != NULL) {
   13155           0 :                                                         return -1;
   13156             :                                                 }
   13157           0 :                                                 if (test_var > uint_max) {
   13158           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13159             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   13160           0 :                                                         return -1;
   13161             :                                                 }
   13162           0 :                                                 (object->data)[data_cntr_1] = test_var;
   13163             :                                         } else {
   13164           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   13165             :                                                   PyLong_Type.tp_name);
   13166           0 :                                                 return -1;
   13167             :                                         }
   13168             :                                 }
   13169             :                         }
   13170             :                 }
   13171             :         }
   13172           0 :         return 0;
   13173             : }
   13174             : 
   13175             : static PyGetSetDef py_ExtendedErrorBlob_getsetters[] = {
   13176             :         {
   13177             :                 .name = discard_const_p(char, "length"),
   13178             :                 .get = py_ExtendedErrorBlob_get_length,
   13179             :                 .set = py_ExtendedErrorBlob_set_length,
   13180             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   13181             :         },
   13182             :         {
   13183             :                 .name = discard_const_p(char, "data"),
   13184             :                 .get = py_ExtendedErrorBlob_get_data,
   13185             :                 .set = py_ExtendedErrorBlob_set_data,
   13186             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   13187             :         },
   13188             :         { .name = NULL }
   13189             : };
   13190             : 
   13191           0 : static PyObject *py_ExtendedErrorBlob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13192             : {
   13193           0 :         return pytalloc_new(struct ExtendedErrorBlob, type);
   13194             : }
   13195             : 
   13196             : 
   13197             : static PyTypeObject ExtendedErrorBlob_Type = {
   13198             :         PyVarObject_HEAD_INIT(NULL, 0)
   13199             :         .tp_name = "drsblobs.ExtendedErrorBlob",
   13200             :         .tp_getset = py_ExtendedErrorBlob_getsetters,
   13201             :         .tp_methods = NULL,
   13202             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13203             :         .tp_new = py_ExtendedErrorBlob_new,
   13204             : };
   13205             : 
   13206           0 : static PyObject *py_import_ExtendedErrorComputerNameU(TALLOC_CTX *mem_ctx, int level, union ExtendedErrorComputerNameU *in)
   13207             : {
   13208           0 :         PyObject *ret;
   13209             : 
   13210           0 :         switch (level) {
   13211           0 :                 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
   13212           0 :                         ret = pytalloc_reference_ex(&ExtendedErrorUString_Type, mem_ctx, &in->name);
   13213           0 :                         return ret;
   13214             : 
   13215           0 :                 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
   13216           0 :                         ret = Py_None;
   13217           0 :                         Py_INCREF(ret);
   13218           0 :                         return ret;
   13219             : 
   13220             :         }
   13221           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   13222           0 :         return NULL;
   13223             : }
   13224             : 
   13225           0 : static union ExtendedErrorComputerNameU *py_export_ExtendedErrorComputerNameU(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   13226             : {
   13227           0 :         union ExtendedErrorComputerNameU *ret = talloc_zero(mem_ctx, union ExtendedErrorComputerNameU);
   13228           0 :         switch (level) {
   13229           0 :                 case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
   13230           0 :                         if (in == NULL) {
   13231           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
   13232           0 :                                 talloc_free(ret); return NULL;
   13233             :                         }
   13234           0 :                         PY_CHECK_TYPE(&ExtendedErrorUString_Type, in, talloc_free(ret); return NULL;);
   13235           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   13236           0 :                                 PyErr_NoMemory();
   13237           0 :                                 talloc_free(ret); return NULL;
   13238             :                         }
   13239           0 :                         ret->name = *(struct ExtendedErrorUString *)pytalloc_get_ptr(in);
   13240           0 :                         break;
   13241             : 
   13242           0 :                 case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
   13243           0 :                         break;
   13244             : 
   13245           0 :                 default:
   13246           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   13247           0 :                         talloc_free(ret);
   13248           0 :                         ret = NULL;
   13249             :         }
   13250             : 
   13251           0 :         return ret;
   13252             : }
   13253             : 
   13254           0 : static PyObject *py_ExtendedErrorComputerNameU_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13255             : {
   13256           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   13257           0 :         PyObject *mem_ctx_obj = NULL;
   13258           0 :         TALLOC_CTX *mem_ctx = NULL;
   13259           0 :         int level = 0;
   13260           0 :         PyObject *in_obj = NULL;
   13261           0 :         union ExtendedErrorComputerNameU *in = NULL;
   13262             : 
   13263           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   13264             :                 discard_const_p(char *, kwnames),
   13265             :                 &mem_ctx_obj,
   13266             :                 &level,
   13267             :                 &in_obj)) {
   13268           0 :                 return NULL;
   13269             :         }
   13270           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   13271           0 :         if (mem_ctx == NULL) {
   13272           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   13273           0 :                 return NULL;
   13274             :         }
   13275           0 :         in = (union ExtendedErrorComputerNameU *)pytalloc_get_ptr(in_obj);
   13276           0 :         if (in == NULL) {
   13277           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union ExtendedErrorComputerNameU!");
   13278           0 :                 return NULL;
   13279             :         }
   13280             : 
   13281           0 :         return py_import_ExtendedErrorComputerNameU(mem_ctx, level, in);
   13282             : }
   13283             : 
   13284           0 : static PyObject *py_ExtendedErrorComputerNameU_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13285             : {
   13286           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   13287           0 :         PyObject *mem_ctx_obj = NULL;
   13288           0 :         TALLOC_CTX *mem_ctx = NULL;
   13289           0 :         int level = 0;
   13290           0 :         PyObject *in = NULL;
   13291           0 :         union ExtendedErrorComputerNameU *out = NULL;
   13292             : 
   13293           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   13294             :                 discard_const_p(char *, kwnames),
   13295             :                 &mem_ctx_obj,
   13296             :                 &level,
   13297             :                 &in)) {
   13298           0 :                 return NULL;
   13299             :         }
   13300           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   13301           0 :         if (mem_ctx == NULL) {
   13302           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   13303           0 :                 return NULL;
   13304             :         }
   13305             : 
   13306           0 :         out = py_export_ExtendedErrorComputerNameU(mem_ctx, level, in);
   13307           0 :         if (out == NULL) {
   13308           0 :                 return NULL;
   13309             :         }
   13310             : 
   13311           0 :         return pytalloc_GenericObject_reference(out);
   13312             : }
   13313             : 
   13314             : static PyMethodDef py_ExtendedErrorComputerNameU_methods[] = {
   13315             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ExtendedErrorComputerNameU_import),
   13316             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   13317             :                 "T.__import__(mem_ctx, level, in) => ret." },
   13318             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ExtendedErrorComputerNameU_export),
   13319             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   13320             :                 "T.__export__(mem_ctx, level, in) => ret." },
   13321             :         { NULL, NULL, 0, NULL }
   13322             : };
   13323             : 
   13324           0 : static PyObject *py_ExtendedErrorComputerNameU_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13325             : {
   13326           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   13327           0 :         return NULL;
   13328             : }
   13329             : 
   13330             : 
   13331             : static PyTypeObject ExtendedErrorComputerNameU_Type = {
   13332             :         PyVarObject_HEAD_INIT(NULL, 0)
   13333             :         .tp_name = "drsblobs.ExtendedErrorComputerNameU",
   13334             :         .tp_getset = NULL,
   13335             :         .tp_methods = py_ExtendedErrorComputerNameU_methods,
   13336             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13337             :         .tp_new = py_ExtendedErrorComputerNameU_new,
   13338             : };
   13339             : 
   13340             : 
   13341           0 : static PyObject *py_ExtendedErrorComputerName_get_present(PyObject *obj, void *closure)
   13342             : {
   13343           0 :         struct ExtendedErrorComputerName *object = pytalloc_get_ptr(obj);
   13344           0 :         PyObject *py_present;
   13345           0 :         py_present = PyLong_FromLong((uint16_t)(object->present));
   13346           0 :         return py_present;
   13347             : }
   13348             : 
   13349           0 : static int py_ExtendedErrorComputerName_set_present(PyObject *py_obj, PyObject *value, void *closure)
   13350             : {
   13351           0 :         struct ExtendedErrorComputerName *object = pytalloc_get_ptr(py_obj);
   13352           0 :         if (value == NULL) {
   13353           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->present");
   13354           0 :                 return -1;
   13355             :         }
   13356             :         {
   13357           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->present));
   13358           0 :                 if (PyLong_Check(value)) {
   13359           0 :                         unsigned long long test_var;
   13360           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13361           0 :                         if (PyErr_Occurred() != NULL) {
   13362           0 :                                 return -1;
   13363             :                         }
   13364           0 :                         if (test_var > uint_max) {
   13365           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13366             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13367           0 :                                 return -1;
   13368             :                         }
   13369           0 :                         object->present = test_var;
   13370             :                 } else {
   13371           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13372             :                           PyLong_Type.tp_name);
   13373           0 :                         return -1;
   13374             :                 }
   13375             :         }
   13376           0 :         return 0;
   13377             : }
   13378             : 
   13379           0 : static PyObject *py_ExtendedErrorComputerName_get_n(PyObject *obj, void *closure)
   13380             : {
   13381           0 :         struct ExtendedErrorComputerName *object = pytalloc_get_ptr(obj);
   13382           0 :         PyObject *py_n;
   13383           0 :         py_n = pyrpc_import_union(&ExtendedErrorComputerNameU_Type, pytalloc_get_mem_ctx(obj), object->present, &object->n, "union ExtendedErrorComputerNameU");
   13384           0 :         if (py_n == NULL) {
   13385           0 :                 return NULL;
   13386             :         }
   13387           0 :         return py_n;
   13388             : }
   13389             : 
   13390           0 : static int py_ExtendedErrorComputerName_set_n(PyObject *py_obj, PyObject *value, void *closure)
   13391             : {
   13392           0 :         struct ExtendedErrorComputerName *object = pytalloc_get_ptr(py_obj);
   13393           0 :         if (value == NULL) {
   13394           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->n");
   13395           0 :                 return -1;
   13396             :         }
   13397             :         {
   13398           0 :                 union ExtendedErrorComputerNameU *n_switch_0;
   13399           0 :                 n_switch_0 = (union ExtendedErrorComputerNameU *)pyrpc_export_union(&ExtendedErrorComputerNameU_Type, pytalloc_get_mem_ctx(py_obj), object->present, value, "union ExtendedErrorComputerNameU");
   13400           0 :                 if (n_switch_0 == NULL) {
   13401           0 :                         return -1;
   13402             :                 }
   13403           0 :                 object->n = *n_switch_0;
   13404             :         }
   13405           0 :         return 0;
   13406             : }
   13407             : 
   13408             : static PyGetSetDef py_ExtendedErrorComputerName_getsetters[] = {
   13409             :         {
   13410             :                 .name = discard_const_p(char, "present"),
   13411             :                 .get = py_ExtendedErrorComputerName_get_present,
   13412             :                 .set = py_ExtendedErrorComputerName_set_present,
   13413             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ExtendedErrorComputerNamePresent")
   13414             :         },
   13415             :         {
   13416             :                 .name = discard_const_p(char, "n"),
   13417             :                 .get = py_ExtendedErrorComputerName_get_n,
   13418             :                 .set = py_ExtendedErrorComputerName_set_n,
   13419             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ExtendedErrorComputerNameU")
   13420             :         },
   13421             :         { .name = NULL }
   13422             : };
   13423             : 
   13424           0 : static PyObject *py_ExtendedErrorComputerName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13425             : {
   13426           0 :         return pytalloc_new(struct ExtendedErrorComputerName, type);
   13427             : }
   13428             : 
   13429             : 
   13430             : static PyTypeObject ExtendedErrorComputerName_Type = {
   13431             :         PyVarObject_HEAD_INIT(NULL, 0)
   13432             :         .tp_name = "drsblobs.ExtendedErrorComputerName",
   13433             :         .tp_getset = py_ExtendedErrorComputerName_getsetters,
   13434             :         .tp_methods = NULL,
   13435             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13436             :         .tp_new = py_ExtendedErrorComputerName_new,
   13437             : };
   13438             : 
   13439           0 : static PyObject *py_import_ExtendedErrorParamU(TALLOC_CTX *mem_ctx, int level, union ExtendedErrorParamU *in)
   13440             : {
   13441           0 :         PyObject *ret;
   13442             : 
   13443           0 :         switch (level) {
   13444           0 :                 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
   13445           0 :                         ret = pytalloc_reference_ex(&ExtendedErrorAString_Type, mem_ctx, &in->a_string);
   13446           0 :                         return ret;
   13447             : 
   13448           0 :                 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
   13449           0 :                         ret = pytalloc_reference_ex(&ExtendedErrorUString_Type, mem_ctx, &in->u_string);
   13450           0 :                         return ret;
   13451             : 
   13452           0 :                 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
   13453           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)(in->uint32));
   13454           0 :                         return ret;
   13455             : 
   13456           0 :                 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
   13457           0 :                         ret = PyLong_FromLong((uint16_t)(in->uint16));
   13458           0 :                         return ret;
   13459             : 
   13460           0 :                 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
   13461           0 :                         ret = PyLong_FromUnsignedLongLong(in->uint64);
   13462           0 :                         return ret;
   13463             : 
   13464           0 :                 case EXTENDED_ERROR_PARAM_TYPE_NONE:
   13465           0 :                         ret = Py_None;
   13466           0 :                         Py_INCREF(ret);
   13467           0 :                         return ret;
   13468             : 
   13469           0 :                 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
   13470           0 :                         ret = pytalloc_reference_ex(&ExtendedErrorBlob_Type, mem_ctx, &in->blob);
   13471           0 :                         return ret;
   13472             : 
   13473             :         }
   13474           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   13475           0 :         return NULL;
   13476             : }
   13477             : 
   13478           0 : static union ExtendedErrorParamU *py_export_ExtendedErrorParamU(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   13479             : {
   13480           0 :         union ExtendedErrorParamU *ret = talloc_zero(mem_ctx, union ExtendedErrorParamU);
   13481           0 :         switch (level) {
   13482           0 :                 case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
   13483           0 :                         if (in == NULL) {
   13484           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->a_string");
   13485           0 :                                 talloc_free(ret); return NULL;
   13486             :                         }
   13487           0 :                         PY_CHECK_TYPE(&ExtendedErrorAString_Type, in, talloc_free(ret); return NULL;);
   13488           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   13489           0 :                                 PyErr_NoMemory();
   13490           0 :                                 talloc_free(ret); return NULL;
   13491             :                         }
   13492           0 :                         ret->a_string = *(struct ExtendedErrorAString *)pytalloc_get_ptr(in);
   13493           0 :                         break;
   13494             : 
   13495           0 :                 case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
   13496           0 :                         if (in == NULL) {
   13497           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->u_string");
   13498           0 :                                 talloc_free(ret); return NULL;
   13499             :                         }
   13500           0 :                         PY_CHECK_TYPE(&ExtendedErrorUString_Type, in, talloc_free(ret); return NULL;);
   13501           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   13502           0 :                                 PyErr_NoMemory();
   13503           0 :                                 talloc_free(ret); return NULL;
   13504             :                         }
   13505           0 :                         ret->u_string = *(struct ExtendedErrorUString *)pytalloc_get_ptr(in);
   13506           0 :                         break;
   13507             : 
   13508           0 :                 case EXTENDED_ERROR_PARAM_TYPE_UINT32:
   13509           0 :                         if (in == NULL) {
   13510           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->uint32");
   13511           0 :                                 talloc_free(ret); return NULL;
   13512             :                         }
   13513             :                         {
   13514           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->uint32));
   13515           0 :                                 if (PyLong_Check(in)) {
   13516           0 :                                         unsigned long long test_var;
   13517           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   13518           0 :                                         if (PyErr_Occurred() != NULL) {
   13519           0 :                                                 talloc_free(ret); return NULL;
   13520             :                                         }
   13521           0 :                                         if (test_var > uint_max) {
   13522           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13523             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   13524           0 :                                                 talloc_free(ret); return NULL;
   13525             :                                         }
   13526           0 :                                         ret->uint32 = test_var;
   13527             :                                 } else {
   13528           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13529             :                                           PyLong_Type.tp_name);
   13530           0 :                                         talloc_free(ret); return NULL;
   13531             :                                 }
   13532             :                         }
   13533           0 :                         break;
   13534             : 
   13535           0 :                 case EXTENDED_ERROR_PARAM_TYPE_UINT16:
   13536           0 :                         if (in == NULL) {
   13537           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->uint16");
   13538           0 :                                 talloc_free(ret); return NULL;
   13539             :                         }
   13540             :                         {
   13541           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->uint16));
   13542           0 :                                 if (PyLong_Check(in)) {
   13543           0 :                                         unsigned long long test_var;
   13544           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   13545           0 :                                         if (PyErr_Occurred() != NULL) {
   13546           0 :                                                 talloc_free(ret); return NULL;
   13547             :                                         }
   13548           0 :                                         if (test_var > uint_max) {
   13549           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13550             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   13551           0 :                                                 talloc_free(ret); return NULL;
   13552             :                                         }
   13553           0 :                                         ret->uint16 = test_var;
   13554             :                                 } else {
   13555           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13556             :                                           PyLong_Type.tp_name);
   13557           0 :                                         talloc_free(ret); return NULL;
   13558             :                                 }
   13559             :                         }
   13560           0 :                         break;
   13561             : 
   13562           0 :                 case EXTENDED_ERROR_PARAM_TYPE_UINT64:
   13563           0 :                         if (in == NULL) {
   13564           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->uint64");
   13565           0 :                                 talloc_free(ret); return NULL;
   13566             :                         }
   13567             :                         {
   13568           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->uint64));
   13569           0 :                                 if (PyLong_Check(in)) {
   13570           0 :                                         unsigned long long test_var;
   13571           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   13572           0 :                                         if (PyErr_Occurred() != NULL) {
   13573           0 :                                                 talloc_free(ret); return NULL;
   13574             :                                         }
   13575           0 :                                         if (test_var > uint_max) {
   13576           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13577             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   13578           0 :                                                 talloc_free(ret); return NULL;
   13579             :                                         }
   13580           0 :                                         ret->uint64 = test_var;
   13581             :                                 } else {
   13582           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13583             :                                           PyLong_Type.tp_name);
   13584           0 :                                         talloc_free(ret); return NULL;
   13585             :                                 }
   13586             :                         }
   13587           0 :                         break;
   13588             : 
   13589           0 :                 case EXTENDED_ERROR_PARAM_TYPE_NONE:
   13590           0 :                         break;
   13591             : 
   13592           0 :                 case EXTENDED_ERROR_PARAM_TYPE_BLOB:
   13593           0 :                         if (in == NULL) {
   13594           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->blob");
   13595           0 :                                 talloc_free(ret); return NULL;
   13596             :                         }
   13597           0 :                         PY_CHECK_TYPE(&ExtendedErrorBlob_Type, in, talloc_free(ret); return NULL;);
   13598           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   13599           0 :                                 PyErr_NoMemory();
   13600           0 :                                 talloc_free(ret); return NULL;
   13601             :                         }
   13602           0 :                         ret->blob = *(struct ExtendedErrorBlob *)pytalloc_get_ptr(in);
   13603           0 :                         break;
   13604             : 
   13605           0 :                 default:
   13606           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   13607           0 :                         talloc_free(ret);
   13608           0 :                         ret = NULL;
   13609             :         }
   13610             : 
   13611           0 :         return ret;
   13612             : }
   13613             : 
   13614           0 : static PyObject *py_ExtendedErrorParamU_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13615             : {
   13616           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   13617           0 :         PyObject *mem_ctx_obj = NULL;
   13618           0 :         TALLOC_CTX *mem_ctx = NULL;
   13619           0 :         int level = 0;
   13620           0 :         PyObject *in_obj = NULL;
   13621           0 :         union ExtendedErrorParamU *in = NULL;
   13622             : 
   13623           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   13624             :                 discard_const_p(char *, kwnames),
   13625             :                 &mem_ctx_obj,
   13626             :                 &level,
   13627             :                 &in_obj)) {
   13628           0 :                 return NULL;
   13629             :         }
   13630           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   13631           0 :         if (mem_ctx == NULL) {
   13632           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   13633           0 :                 return NULL;
   13634             :         }
   13635           0 :         in = (union ExtendedErrorParamU *)pytalloc_get_ptr(in_obj);
   13636           0 :         if (in == NULL) {
   13637           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union ExtendedErrorParamU!");
   13638           0 :                 return NULL;
   13639             :         }
   13640             : 
   13641           0 :         return py_import_ExtendedErrorParamU(mem_ctx, level, in);
   13642             : }
   13643             : 
   13644           0 : static PyObject *py_ExtendedErrorParamU_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13645             : {
   13646           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   13647           0 :         PyObject *mem_ctx_obj = NULL;
   13648           0 :         TALLOC_CTX *mem_ctx = NULL;
   13649           0 :         int level = 0;
   13650           0 :         PyObject *in = NULL;
   13651           0 :         union ExtendedErrorParamU *out = NULL;
   13652             : 
   13653           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   13654             :                 discard_const_p(char *, kwnames),
   13655             :                 &mem_ctx_obj,
   13656             :                 &level,
   13657             :                 &in)) {
   13658           0 :                 return NULL;
   13659             :         }
   13660           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   13661           0 :         if (mem_ctx == NULL) {
   13662           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   13663           0 :                 return NULL;
   13664             :         }
   13665             : 
   13666           0 :         out = py_export_ExtendedErrorParamU(mem_ctx, level, in);
   13667           0 :         if (out == NULL) {
   13668           0 :                 return NULL;
   13669             :         }
   13670             : 
   13671           0 :         return pytalloc_GenericObject_reference(out);
   13672             : }
   13673             : 
   13674             : static PyMethodDef py_ExtendedErrorParamU_methods[] = {
   13675             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ExtendedErrorParamU_import),
   13676             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   13677             :                 "T.__import__(mem_ctx, level, in) => ret." },
   13678             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ExtendedErrorParamU_export),
   13679             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   13680             :                 "T.__export__(mem_ctx, level, in) => ret." },
   13681             :         { NULL, NULL, 0, NULL }
   13682             : };
   13683             : 
   13684           0 : static PyObject *py_ExtendedErrorParamU_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13685             : {
   13686           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   13687           0 :         return NULL;
   13688             : }
   13689             : 
   13690             : 
   13691             : static PyTypeObject ExtendedErrorParamU_Type = {
   13692             :         PyVarObject_HEAD_INIT(NULL, 0)
   13693             :         .tp_name = "drsblobs.ExtendedErrorParamU",
   13694             :         .tp_getset = NULL,
   13695             :         .tp_methods = py_ExtendedErrorParamU_methods,
   13696             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13697             :         .tp_new = py_ExtendedErrorParamU_new,
   13698             : };
   13699             : 
   13700             : 
   13701           0 : static PyObject *py_ExtendedErrorParam_get_type(PyObject *obj, void *closure)
   13702             : {
   13703           0 :         struct ExtendedErrorParam *object = pytalloc_get_ptr(obj);
   13704           0 :         PyObject *py_type;
   13705           0 :         py_type = PyLong_FromLong((uint16_t)(object->type));
   13706           0 :         return py_type;
   13707             : }
   13708             : 
   13709           0 : static int py_ExtendedErrorParam_set_type(PyObject *py_obj, PyObject *value, void *closure)
   13710             : {
   13711           0 :         struct ExtendedErrorParam *object = pytalloc_get_ptr(py_obj);
   13712           0 :         if (value == NULL) {
   13713           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
   13714           0 :                 return -1;
   13715             :         }
   13716             :         {
   13717           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
   13718           0 :                 if (PyLong_Check(value)) {
   13719           0 :                         unsigned long long test_var;
   13720           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13721           0 :                         if (PyErr_Occurred() != NULL) {
   13722           0 :                                 return -1;
   13723             :                         }
   13724           0 :                         if (test_var > uint_max) {
   13725           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13726             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13727           0 :                                 return -1;
   13728             :                         }
   13729           0 :                         object->type = test_var;
   13730             :                 } else {
   13731           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13732             :                           PyLong_Type.tp_name);
   13733           0 :                         return -1;
   13734             :                 }
   13735             :         }
   13736           0 :         return 0;
   13737             : }
   13738             : 
   13739           0 : static PyObject *py_ExtendedErrorParam_get_p(PyObject *obj, void *closure)
   13740             : {
   13741           0 :         struct ExtendedErrorParam *object = pytalloc_get_ptr(obj);
   13742           0 :         PyObject *py_p;
   13743           0 :         py_p = pyrpc_import_union(&ExtendedErrorParamU_Type, pytalloc_get_mem_ctx(obj), object->type, &object->p, "union ExtendedErrorParamU");
   13744           0 :         if (py_p == NULL) {
   13745           0 :                 return NULL;
   13746             :         }
   13747           0 :         return py_p;
   13748             : }
   13749             : 
   13750           0 : static int py_ExtendedErrorParam_set_p(PyObject *py_obj, PyObject *value, void *closure)
   13751             : {
   13752           0 :         struct ExtendedErrorParam *object = pytalloc_get_ptr(py_obj);
   13753           0 :         if (value == NULL) {
   13754           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->p");
   13755           0 :                 return -1;
   13756             :         }
   13757             :         {
   13758           0 :                 union ExtendedErrorParamU *p_switch_0;
   13759           0 :                 p_switch_0 = (union ExtendedErrorParamU *)pyrpc_export_union(&ExtendedErrorParamU_Type, pytalloc_get_mem_ctx(py_obj), object->type, value, "union ExtendedErrorParamU");
   13760           0 :                 if (p_switch_0 == NULL) {
   13761           0 :                         return -1;
   13762             :                 }
   13763           0 :                 object->p = *p_switch_0;
   13764             :         }
   13765           0 :         return 0;
   13766             : }
   13767             : 
   13768             : static PyGetSetDef py_ExtendedErrorParam_getsetters[] = {
   13769             :         {
   13770             :                 .name = discard_const_p(char, "type"),
   13771             :                 .get = py_ExtendedErrorParam_get_type,
   13772             :                 .set = py_ExtendedErrorParam_set_type,
   13773             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ExtendedErrorParamType")
   13774             :         },
   13775             :         {
   13776             :                 .name = discard_const_p(char, "p"),
   13777             :                 .get = py_ExtendedErrorParam_get_p,
   13778             :                 .set = py_ExtendedErrorParam_set_p,
   13779             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ExtendedErrorParamU")
   13780             :         },
   13781             :         { .name = NULL }
   13782             : };
   13783             : 
   13784           0 : static PyObject *py_ExtendedErrorParam_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13785             : {
   13786           0 :         return pytalloc_new(struct ExtendedErrorParam, type);
   13787             : }
   13788             : 
   13789             : 
   13790             : static PyTypeObject ExtendedErrorParam_Type = {
   13791             :         PyVarObject_HEAD_INIT(NULL, 0)
   13792             :         .tp_name = "drsblobs.ExtendedErrorParam",
   13793             :         .tp_getset = py_ExtendedErrorParam_getsetters,
   13794             :         .tp_methods = NULL,
   13795             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13796             :         .tp_new = py_ExtendedErrorParam_new,
   13797             : };
   13798             : 
   13799             : 
   13800           0 : static PyObject *py_ExtendedErrorInfo_get_next(PyObject *obj, void *closure)
   13801             : {
   13802           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(obj);
   13803           0 :         PyObject *py_next;
   13804           0 :         if (object->next == NULL) {
   13805           0 :                 Py_RETURN_NONE;
   13806             :         }
   13807           0 :         if (object->next == NULL) {
   13808           0 :                 py_next = Py_None;
   13809           0 :                 Py_INCREF(py_next);
   13810             :         } else {
   13811           0 :                 py_next = pytalloc_reference_ex(&ExtendedErrorInfo_Type, object->next, object->next);
   13812             :         }
   13813           0 :         return py_next;
   13814             : }
   13815             : 
   13816           0 : static int py_ExtendedErrorInfo_set_next(PyObject *py_obj, PyObject *value, void *closure)
   13817             : {
   13818           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   13819           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->next));
   13820           0 :         if (value == NULL) {
   13821           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next");
   13822           0 :                 return -1;
   13823             :         }
   13824           0 :         if (value == Py_None) {
   13825           0 :                 object->next = NULL;
   13826             :         } else {
   13827           0 :                 object->next = NULL;
   13828           0 :                 PY_CHECK_TYPE(&ExtendedErrorInfo_Type, value, return -1;);
   13829           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13830           0 :                         PyErr_NoMemory();
   13831           0 :                         return -1;
   13832             :                 }
   13833           0 :                 object->next = (struct ExtendedErrorInfo *)pytalloc_get_ptr(value);
   13834             :         }
   13835           0 :         return 0;
   13836             : }
   13837             : 
   13838           0 : static PyObject *py_ExtendedErrorInfo_get_computer_name(PyObject *obj, void *closure)
   13839             : {
   13840           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(obj);
   13841           0 :         PyObject *py_computer_name;
   13842           0 :         py_computer_name = pytalloc_reference_ex(&ExtendedErrorComputerName_Type, pytalloc_get_mem_ctx(obj), &object->computer_name);
   13843           0 :         return py_computer_name;
   13844             : }
   13845             : 
   13846           0 : static int py_ExtendedErrorInfo_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   13847             : {
   13848           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   13849           0 :         if (value == NULL) {
   13850           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_name");
   13851           0 :                 return -1;
   13852             :         }
   13853           0 :         PY_CHECK_TYPE(&ExtendedErrorComputerName_Type, value, return -1;);
   13854           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13855           0 :                 PyErr_NoMemory();
   13856           0 :                 return -1;
   13857             :         }
   13858           0 :         object->computer_name = *(struct ExtendedErrorComputerName *)pytalloc_get_ptr(value);
   13859           0 :         return 0;
   13860             : }
   13861             : 
   13862           0 : static PyObject *py_ExtendedErrorInfo_get_pid(PyObject *obj, void *closure)
   13863             : {
   13864           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(obj);
   13865           0 :         PyObject *py_pid;
   13866           0 :         py_pid = PyLong_FromUnsignedLongLong(object->pid);
   13867           0 :         return py_pid;
   13868             : }
   13869             : 
   13870           0 : static int py_ExtendedErrorInfo_set_pid(PyObject *py_obj, PyObject *value, void *closure)
   13871             : {
   13872           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   13873           0 :         if (value == NULL) {
   13874           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pid");
   13875           0 :                 return -1;
   13876             :         }
   13877             :         {
   13878           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pid));
   13879           0 :                 if (PyLong_Check(value)) {
   13880           0 :                         unsigned long long test_var;
   13881           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13882           0 :                         if (PyErr_Occurred() != NULL) {
   13883           0 :                                 return -1;
   13884             :                         }
   13885           0 :                         if (test_var > uint_max) {
   13886           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13887             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13888           0 :                                 return -1;
   13889             :                         }
   13890           0 :                         object->pid = test_var;
   13891             :                 } else {
   13892           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13893             :                           PyLong_Type.tp_name);
   13894           0 :                         return -1;
   13895             :                 }
   13896             :         }
   13897           0 :         return 0;
   13898             : }
   13899             : 
   13900           0 : static PyObject *py_ExtendedErrorInfo_get_time(PyObject *obj, void *closure)
   13901             : {
   13902           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(obj);
   13903           0 :         PyObject *py_time;
   13904           0 :         py_time = PyLong_FromUnsignedLongLong(object->time);
   13905           0 :         return py_time;
   13906             : }
   13907             : 
   13908           0 : static int py_ExtendedErrorInfo_set_time(PyObject *py_obj, PyObject *value, void *closure)
   13909             : {
   13910           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   13911           0 :         if (value == NULL) {
   13912           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
   13913           0 :                 return -1;
   13914             :         }
   13915             :         {
   13916           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
   13917           0 :                 if (PyLong_Check(value)) {
   13918           0 :                         unsigned long long test_var;
   13919           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13920           0 :                         if (PyErr_Occurred() != NULL) {
   13921           0 :                                 return -1;
   13922             :                         }
   13923           0 :                         if (test_var > uint_max) {
   13924           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13925             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13926           0 :                                 return -1;
   13927             :                         }
   13928           0 :                         object->time = test_var;
   13929             :                 } else {
   13930           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13931             :                           PyLong_Type.tp_name);
   13932           0 :                         return -1;
   13933             :                 }
   13934             :         }
   13935           0 :         return 0;
   13936             : }
   13937             : 
   13938           0 : static PyObject *py_ExtendedErrorInfo_get_generating_component(PyObject *obj, void *closure)
   13939             : {
   13940           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(obj);
   13941           0 :         PyObject *py_generating_component;
   13942           0 :         py_generating_component = PyLong_FromUnsignedLongLong((uint32_t)(object->generating_component));
   13943           0 :         return py_generating_component;
   13944             : }
   13945             : 
   13946           0 : static int py_ExtendedErrorInfo_set_generating_component(PyObject *py_obj, PyObject *value, void *closure)
   13947             : {
   13948           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   13949           0 :         if (value == NULL) {
   13950           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->generating_component");
   13951           0 :                 return -1;
   13952             :         }
   13953             :         {
   13954           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->generating_component));
   13955           0 :                 if (PyLong_Check(value)) {
   13956           0 :                         unsigned long long test_var;
   13957           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13958           0 :                         if (PyErr_Occurred() != NULL) {
   13959           0 :                                 return -1;
   13960             :                         }
   13961           0 :                         if (test_var > uint_max) {
   13962           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13963             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13964           0 :                                 return -1;
   13965             :                         }
   13966           0 :                         object->generating_component = test_var;
   13967             :                 } else {
   13968           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13969             :                           PyLong_Type.tp_name);
   13970           0 :                         return -1;
   13971             :                 }
   13972             :         }
   13973           0 :         return 0;
   13974             : }
   13975             : 
   13976           0 : static PyObject *py_ExtendedErrorInfo_get_status(PyObject *obj, void *closure)
   13977             : {
   13978           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(obj);
   13979           0 :         PyObject *py_status;
   13980           0 :         py_status = PyErr_FromWERROR(object->status);
   13981           0 :         return py_status;
   13982             : }
   13983             : 
   13984           0 : static int py_ExtendedErrorInfo_set_status(PyObject *py_obj, PyObject *value, void *closure)
   13985             : {
   13986           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   13987           0 :         if (value == NULL) {
   13988           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
   13989           0 :                 return -1;
   13990             :         }
   13991           0 :         object->status = W_ERROR(PyLong_AsLong(value));
   13992           0 :         return 0;
   13993             : }
   13994             : 
   13995           0 : static PyObject *py_ExtendedErrorInfo_get_detection_location(PyObject *obj, void *closure)
   13996             : {
   13997           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(obj);
   13998           0 :         PyObject *py_detection_location;
   13999           0 :         py_detection_location = PyLong_FromLong((uint16_t)(object->detection_location));
   14000           0 :         return py_detection_location;
   14001             : }
   14002             : 
   14003           0 : static int py_ExtendedErrorInfo_set_detection_location(PyObject *py_obj, PyObject *value, void *closure)
   14004             : {
   14005           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   14006           0 :         if (value == NULL) {
   14007           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->detection_location");
   14008           0 :                 return -1;
   14009             :         }
   14010             :         {
   14011           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->detection_location));
   14012           0 :                 if (PyLong_Check(value)) {
   14013           0 :                         unsigned long long test_var;
   14014           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14015           0 :                         if (PyErr_Occurred() != NULL) {
   14016           0 :                                 return -1;
   14017             :                         }
   14018           0 :                         if (test_var > uint_max) {
   14019           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14020             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14021           0 :                                 return -1;
   14022             :                         }
   14023           0 :                         object->detection_location = test_var;
   14024             :                 } else {
   14025           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14026             :                           PyLong_Type.tp_name);
   14027           0 :                         return -1;
   14028             :                 }
   14029             :         }
   14030           0 :         return 0;
   14031             : }
   14032             : 
   14033           0 : static PyObject *py_ExtendedErrorInfo_get_flags(PyObject *obj, void *closure)
   14034             : {
   14035           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(obj);
   14036           0 :         PyObject *py_flags;
   14037           0 :         py_flags = PyLong_FromLong((uint16_t)(object->flags));
   14038           0 :         return py_flags;
   14039             : }
   14040             : 
   14041           0 : static int py_ExtendedErrorInfo_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   14042             : {
   14043           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   14044           0 :         if (value == NULL) {
   14045           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   14046           0 :                 return -1;
   14047             :         }
   14048             :         {
   14049           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   14050           0 :                 if (PyLong_Check(value)) {
   14051           0 :                         unsigned long long test_var;
   14052           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14053           0 :                         if (PyErr_Occurred() != NULL) {
   14054           0 :                                 return -1;
   14055             :                         }
   14056           0 :                         if (test_var > uint_max) {
   14057           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14058             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14059           0 :                                 return -1;
   14060             :                         }
   14061           0 :                         object->flags = test_var;
   14062             :                 } else {
   14063           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14064             :                           PyLong_Type.tp_name);
   14065           0 :                         return -1;
   14066             :                 }
   14067             :         }
   14068           0 :         return 0;
   14069             : }
   14070             : 
   14071           0 : static PyObject *py_ExtendedErrorInfo_get_num_params(PyObject *obj, void *closure)
   14072             : {
   14073           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(obj);
   14074           0 :         PyObject *py_num_params;
   14075           0 :         py_num_params = PyLong_FromLong((uint16_t)(object->num_params));
   14076           0 :         return py_num_params;
   14077             : }
   14078             : 
   14079           0 : static int py_ExtendedErrorInfo_set_num_params(PyObject *py_obj, PyObject *value, void *closure)
   14080             : {
   14081           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   14082           0 :         if (value == NULL) {
   14083           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_params");
   14084           0 :                 return -1;
   14085             :         }
   14086             :         {
   14087           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_params));
   14088           0 :                 if (PyLong_Check(value)) {
   14089           0 :                         unsigned long long test_var;
   14090           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14091           0 :                         if (PyErr_Occurred() != NULL) {
   14092           0 :                                 return -1;
   14093             :                         }
   14094           0 :                         if (test_var > uint_max) {
   14095           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14096             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14097           0 :                                 return -1;
   14098             :                         }
   14099           0 :                         object->num_params = test_var;
   14100             :                 } else {
   14101           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14102             :                           PyLong_Type.tp_name);
   14103           0 :                         return -1;
   14104             :                 }
   14105             :         }
   14106           0 :         return 0;
   14107             : }
   14108             : 
   14109           0 : static PyObject *py_ExtendedErrorInfo_get_params(PyObject *obj, void *closure)
   14110             : {
   14111           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(obj);
   14112           0 :         PyObject *py_params;
   14113           0 :         py_params = PyList_New(object->num_params);
   14114           0 :         if (py_params == NULL) {
   14115           0 :                 return NULL;
   14116             :         }
   14117             :         {
   14118             :                 int params_cntr_0;
   14119           0 :                 for (params_cntr_0 = 0; params_cntr_0 < (object->num_params); params_cntr_0++) {
   14120           0 :                         PyObject *py_params_0;
   14121           0 :                         py_params_0 = pytalloc_reference_ex(&ExtendedErrorParam_Type, object->params, &(object->params)[params_cntr_0]);
   14122           0 :                         PyList_SetItem(py_params, params_cntr_0, py_params_0);
   14123             :                 }
   14124             :         }
   14125           0 :         return py_params;
   14126             : }
   14127             : 
   14128           0 : static int py_ExtendedErrorInfo_set_params(PyObject *py_obj, PyObject *value, void *closure)
   14129             : {
   14130           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   14131           0 :         if (value == NULL) {
   14132           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->params");
   14133           0 :                 return -1;
   14134             :         }
   14135           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   14136             :         {
   14137           0 :                 int params_cntr_0;
   14138           0 :                 object->params = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->params, PyList_GET_SIZE(value));
   14139           0 :                 if (!object->params) { return -1; }
   14140           0 :                 talloc_set_name_const(object->params, "ARRAY: object->params");
   14141           0 :                 for (params_cntr_0 = 0; params_cntr_0 < PyList_GET_SIZE(value); params_cntr_0++) {
   14142           0 :                         if (PyList_GET_ITEM(value, params_cntr_0) == NULL) {
   14143           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->params)[params_cntr_0]");
   14144           0 :                                 return -1;
   14145             :                         }
   14146           0 :                         PY_CHECK_TYPE(&ExtendedErrorParam_Type, PyList_GET_ITEM(value, params_cntr_0), return -1;);
   14147           0 :                         if (talloc_reference(object->params, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, params_cntr_0))) == NULL) {
   14148           0 :                                 PyErr_NoMemory();
   14149           0 :                                 return -1;
   14150             :                         }
   14151           0 :                         (object->params)[params_cntr_0] = *(struct ExtendedErrorParam *)pytalloc_get_ptr(PyList_GET_ITEM(value, params_cntr_0));
   14152             :                 }
   14153             :         }
   14154           0 :         return 0;
   14155             : }
   14156             : 
   14157             : static PyGetSetDef py_ExtendedErrorInfo_getsetters[] = {
   14158             :         {
   14159             :                 .name = discard_const_p(char, "next"),
   14160             :                 .get = py_ExtendedErrorInfo_get_next,
   14161             :                 .set = py_ExtendedErrorInfo_set_next,
   14162             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ExtendedErrorInfo")
   14163             :         },
   14164             :         {
   14165             :                 .name = discard_const_p(char, "computer_name"),
   14166             :                 .get = py_ExtendedErrorInfo_get_computer_name,
   14167             :                 .set = py_ExtendedErrorInfo_set_computer_name,
   14168             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ExtendedErrorComputerName")
   14169             :         },
   14170             :         {
   14171             :                 .name = discard_const_p(char, "pid"),
   14172             :                 .get = py_ExtendedErrorInfo_get_pid,
   14173             :                 .set = py_ExtendedErrorInfo_set_pid,
   14174             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   14175             :         },
   14176             :         {
   14177             :                 .name = discard_const_p(char, "time"),
   14178             :                 .get = py_ExtendedErrorInfo_get_time,
   14179             :                 .set = py_ExtendedErrorInfo_set_time,
   14180             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   14181             :         },
   14182             :         {
   14183             :                 .name = discard_const_p(char, "generating_component"),
   14184             :                 .get = py_ExtendedErrorInfo_get_generating_component,
   14185             :                 .set = py_ExtendedErrorInfo_set_generating_component,
   14186             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14187             :         },
   14188             :         {
   14189             :                 .name = discard_const_p(char, "status"),
   14190             :                 .get = py_ExtendedErrorInfo_get_status,
   14191             :                 .set = py_ExtendedErrorInfo_set_status,
   14192             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   14193             :         },
   14194             :         {
   14195             :                 .name = discard_const_p(char, "detection_location"),
   14196             :                 .get = py_ExtendedErrorInfo_get_detection_location,
   14197             :                 .set = py_ExtendedErrorInfo_set_detection_location,
   14198             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   14199             :         },
   14200             :         {
   14201             :                 .name = discard_const_p(char, "flags"),
   14202             :                 .get = py_ExtendedErrorInfo_get_flags,
   14203             :                 .set = py_ExtendedErrorInfo_set_flags,
   14204             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   14205             :         },
   14206             :         {
   14207             :                 .name = discard_const_p(char, "num_params"),
   14208             :                 .get = py_ExtendedErrorInfo_get_num_params,
   14209             :                 .set = py_ExtendedErrorInfo_set_num_params,
   14210             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   14211             :         },
   14212             :         {
   14213             :                 .name = discard_const_p(char, "params"),
   14214             :                 .get = py_ExtendedErrorInfo_get_params,
   14215             :                 .set = py_ExtendedErrorInfo_set_params,
   14216             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ExtendedErrorParam")
   14217             :         },
   14218             :         { .name = NULL }
   14219             : };
   14220             : 
   14221           0 : static PyObject *py_ExtendedErrorInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14222             : {
   14223           0 :         return pytalloc_new(struct ExtendedErrorInfo, type);
   14224             : }
   14225             : 
   14226           0 : static PyObject *py_ExtendedErrorInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   14227             : {
   14228           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   14229           0 :         PyObject *ret = NULL;
   14230           0 :         DATA_BLOB blob;
   14231           0 :         enum ndr_err_code err;
   14232           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   14233           0 :         if (tmp_ctx == NULL) {
   14234           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   14235           0 :                 return NULL;
   14236             :         }
   14237           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_ExtendedErrorInfo);
   14238           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   14239           0 :                 TALLOC_FREE(tmp_ctx);
   14240           0 :                 PyErr_SetNdrError(err);
   14241           0 :                 return NULL;
   14242             :         }
   14243             : 
   14244           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   14245           0 :         TALLOC_FREE(tmp_ctx);
   14246           0 :         return ret;
   14247             : }
   14248             : 
   14249           0 : static PyObject *py_ExtendedErrorInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   14250             : {
   14251           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   14252           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   14253           0 :         Py_ssize_t blob_length = 0;
   14254           0 :         enum ndr_err_code err;
   14255           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   14256           0 :         PyObject *allow_remaining_obj = NULL;
   14257           0 :         bool allow_remaining = false;
   14258             : 
   14259           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   14260             :                 discard_const_p(char *, kwnames),
   14261             :                 &blob.data, &blob_length,
   14262             :                 &allow_remaining_obj)) {
   14263           0 :                 return NULL;
   14264             :         }
   14265           0 :         blob.length = blob_length;
   14266             : 
   14267           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   14268           0 :                 allow_remaining = true;
   14269             :         }
   14270             : 
   14271           0 :         if (allow_remaining) {
   14272           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ExtendedErrorInfo);
   14273             :         } else {
   14274           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ExtendedErrorInfo);
   14275             :         }
   14276           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   14277           0 :                 PyErr_SetNdrError(err);
   14278           0 :                 return NULL;
   14279             :         }
   14280             : 
   14281           0 :         Py_RETURN_NONE;
   14282             : }
   14283             : 
   14284           0 : static PyObject *py_ExtendedErrorInfo_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   14285             : {
   14286           0 :         struct ExtendedErrorInfo *object = pytalloc_get_ptr(py_obj);
   14287           0 :         PyObject *ret;
   14288           0 :         char *retstr;
   14289             : 
   14290           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_ExtendedErrorInfo, "ExtendedErrorInfo", object);
   14291           0 :         ret = PyUnicode_FromString(retstr);
   14292           0 :         talloc_free(retstr);
   14293             : 
   14294           0 :         return ret;
   14295             : }
   14296             : 
   14297             : static PyMethodDef py_ExtendedErrorInfo_methods[] = {
   14298             :         { "__ndr_pack__", (PyCFunction)py_ExtendedErrorInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   14299             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ExtendedErrorInfo_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   14300             :         { "__ndr_print__", (PyCFunction)py_ExtendedErrorInfo_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   14301             :         { NULL, NULL, 0, NULL }
   14302             : };
   14303             : 
   14304             : 
   14305             : static PyTypeObject ExtendedErrorInfo_Type = {
   14306             :         PyVarObject_HEAD_INIT(NULL, 0)
   14307             :         .tp_name = "drsblobs.ExtendedErrorInfo",
   14308             :         .tp_getset = py_ExtendedErrorInfo_getsetters,
   14309             :         .tp_methods = py_ExtendedErrorInfo_methods,
   14310             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14311             :         .tp_new = py_ExtendedErrorInfo_new,
   14312             : };
   14313             : 
   14314             : 
   14315           0 : static PyObject *py_ExtendedErrorInfoPtr_get_info(PyObject *obj, void *closure)
   14316             : {
   14317           0 :         struct ExtendedErrorInfoPtr *object = pytalloc_get_ptr(obj);
   14318           0 :         PyObject *py_info;
   14319           0 :         if (object->info == NULL) {
   14320           0 :                 Py_RETURN_NONE;
   14321             :         }
   14322           0 :         if (object->info == NULL) {
   14323           0 :                 py_info = Py_None;
   14324           0 :                 Py_INCREF(py_info);
   14325             :         } else {
   14326           0 :                 py_info = pytalloc_reference_ex(&ExtendedErrorInfo_Type, object->info, object->info);
   14327             :         }
   14328           0 :         return py_info;
   14329             : }
   14330             : 
   14331           0 : static int py_ExtendedErrorInfoPtr_set_info(PyObject *py_obj, PyObject *value, void *closure)
   14332             : {
   14333           0 :         struct ExtendedErrorInfoPtr *object = pytalloc_get_ptr(py_obj);
   14334           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info));
   14335           0 :         if (value == NULL) {
   14336           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info");
   14337           0 :                 return -1;
   14338             :         }
   14339           0 :         if (value == Py_None) {
   14340           0 :                 object->info = NULL;
   14341             :         } else {
   14342           0 :                 object->info = NULL;
   14343           0 :                 PY_CHECK_TYPE(&ExtendedErrorInfo_Type, value, return -1;);
   14344           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14345           0 :                         PyErr_NoMemory();
   14346           0 :                         return -1;
   14347             :                 }
   14348           0 :                 object->info = (struct ExtendedErrorInfo *)pytalloc_get_ptr(value);
   14349             :         }
   14350           0 :         return 0;
   14351             : }
   14352             : 
   14353             : static PyGetSetDef py_ExtendedErrorInfoPtr_getsetters[] = {
   14354             :         {
   14355             :                 .name = discard_const_p(char, "info"),
   14356             :                 .get = py_ExtendedErrorInfoPtr_get_info,
   14357             :                 .set = py_ExtendedErrorInfoPtr_set_info,
   14358             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ExtendedErrorInfo")
   14359             :         },
   14360             :         { .name = NULL }
   14361             : };
   14362             : 
   14363           0 : static PyObject *py_ExtendedErrorInfoPtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14364             : {
   14365           0 :         return pytalloc_new(struct ExtendedErrorInfoPtr, type);
   14366             : }
   14367             : 
   14368             : 
   14369             : static PyTypeObject ExtendedErrorInfoPtr_Type = {
   14370             :         PyVarObject_HEAD_INIT(NULL, 0)
   14371             :         .tp_name = "drsblobs.ExtendedErrorInfoPtr",
   14372             :         .tp_getset = py_ExtendedErrorInfoPtr_getsetters,
   14373             :         .tp_methods = NULL,
   14374             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14375             :         .tp_new = py_ExtendedErrorInfoPtr_new,
   14376             : };
   14377             : 
   14378             : 
   14379           0 : static PyObject *py_ForestTrustString_get_size(PyObject *obj, void *closure)
   14380             : {
   14381           0 :         struct ForestTrustString *object = pytalloc_get_ptr(obj);
   14382           0 :         PyObject *py_size;
   14383           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
   14384           0 :         return py_size;
   14385             : }
   14386             : 
   14387           0 : static int py_ForestTrustString_set_size(PyObject *py_obj, PyObject *value, void *closure)
   14388             : {
   14389           0 :         struct ForestTrustString *object = pytalloc_get_ptr(py_obj);
   14390           0 :         if (value == NULL) {
   14391           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   14392           0 :                 return -1;
   14393             :         }
   14394             :         {
   14395           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   14396           0 :                 if (PyLong_Check(value)) {
   14397           0 :                         unsigned long long test_var;
   14398           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14399           0 :                         if (PyErr_Occurred() != NULL) {
   14400           0 :                                 return -1;
   14401             :                         }
   14402           0 :                         if (test_var > uint_max) {
   14403           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14404             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14405           0 :                                 return -1;
   14406             :                         }
   14407           0 :                         object->size = test_var;
   14408             :                 } else {
   14409           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14410             :                           PyLong_Type.tp_name);
   14411           0 :                         return -1;
   14412             :                 }
   14413             :         }
   14414           0 :         return 0;
   14415             : }
   14416             : 
   14417           0 : static PyObject *py_ForestTrustString_get_string(PyObject *obj, void *closure)
   14418             : {
   14419           0 :         struct ForestTrustString *object = pytalloc_get_ptr(obj);
   14420           0 :         PyObject *py_string;
   14421           0 :         if (object->string == NULL) {
   14422           0 :                 py_string = Py_None;
   14423           0 :                 Py_INCREF(py_string);
   14424             :         } else {
   14425           0 :                 py_string = PyUnicode_Decode(object->string, strlen(object->string), "utf-8", "ignore");
   14426             :         }
   14427           0 :         return py_string;
   14428             : }
   14429             : 
   14430           0 : static int py_ForestTrustString_set_string(PyObject *py_obj, PyObject *value, void *closure)
   14431             : {
   14432           0 :         struct ForestTrustString *object = pytalloc_get_ptr(py_obj);
   14433           0 :         if (value == NULL) {
   14434           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->string");
   14435           0 :                 return -1;
   14436             :         }
   14437             :         {
   14438           0 :                 const char *test_str;
   14439           0 :                 const char *talloc_str;
   14440           0 :                 PyObject *unicode = NULL;
   14441           0 :                 if (PyUnicode_Check(value)) {
   14442           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   14443           0 :                         if (unicode == NULL) {
   14444           0 :                                 return -1;
   14445             :                         }
   14446           0 :                         test_str = PyBytes_AS_STRING(unicode);
   14447           0 :                 } else if (PyBytes_Check(value)) {
   14448           0 :                         test_str = PyBytes_AS_STRING(value);
   14449             :                 } else {
   14450           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   14451           0 :                         return -1;
   14452             :                 }
   14453           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   14454           0 :                 if (unicode != NULL) {
   14455           0 :                         Py_DECREF(unicode);
   14456             :                 }
   14457           0 :                 if (talloc_str == NULL) {
   14458           0 :                         PyErr_NoMemory();
   14459           0 :                         return -1;
   14460             :                 }
   14461           0 :                 object->string = talloc_str;
   14462             :         }
   14463           0 :         return 0;
   14464             : }
   14465             : 
   14466             : static PyGetSetDef py_ForestTrustString_getsetters[] = {
   14467             :         {
   14468             :                 .name = discard_const_p(char, "size"),
   14469             :                 .get = py_ForestTrustString_get_size,
   14470             :                 .set = py_ForestTrustString_set_size,
   14471             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14472             :         },
   14473             :         {
   14474             :                 .name = discard_const_p(char, "string"),
   14475             :                 .get = py_ForestTrustString_get_string,
   14476             :                 .set = py_ForestTrustString_set_string,
   14477             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14478             :         },
   14479             :         { .name = NULL }
   14480             : };
   14481             : 
   14482           0 : static PyObject *py_ForestTrustString_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14483             : {
   14484           0 :         return pytalloc_new(struct ForestTrustString, type);
   14485             : }
   14486             : 
   14487             : 
   14488             : static PyTypeObject ForestTrustString_Type = {
   14489             :         PyVarObject_HEAD_INIT(NULL, 0)
   14490             :         .tp_name = "drsblobs.ForestTrustString",
   14491             :         .tp_getset = py_ForestTrustString_getsetters,
   14492             :         .tp_methods = NULL,
   14493             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14494             :         .tp_new = py_ForestTrustString_new,
   14495             : };
   14496             : 
   14497             : 
   14498           0 : static PyObject *py_ForestTrustDataDomainInfo_get_sid_size(PyObject *obj, void *closure)
   14499             : {
   14500           0 :         struct ForestTrustDataDomainInfo *object = pytalloc_get_ptr(obj);
   14501           0 :         PyObject *py_sid_size;
   14502           0 :         py_sid_size = PyLong_FromUnsignedLongLong((uint32_t)(object->sid_size));
   14503           0 :         return py_sid_size;
   14504             : }
   14505             : 
   14506           0 : static int py_ForestTrustDataDomainInfo_set_sid_size(PyObject *py_obj, PyObject *value, void *closure)
   14507             : {
   14508           0 :         struct ForestTrustDataDomainInfo *object = pytalloc_get_ptr(py_obj);
   14509           0 :         if (value == NULL) {
   14510           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid_size");
   14511           0 :                 return -1;
   14512             :         }
   14513             :         {
   14514           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sid_size));
   14515           0 :                 if (PyLong_Check(value)) {
   14516           0 :                         unsigned long long test_var;
   14517           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14518           0 :                         if (PyErr_Occurred() != NULL) {
   14519           0 :                                 return -1;
   14520             :                         }
   14521           0 :                         if (test_var > uint_max) {
   14522           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14523             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14524           0 :                                 return -1;
   14525             :                         }
   14526           0 :                         object->sid_size = test_var;
   14527             :                 } else {
   14528           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14529             :                           PyLong_Type.tp_name);
   14530           0 :                         return -1;
   14531             :                 }
   14532             :         }
   14533           0 :         return 0;
   14534             : }
   14535             : 
   14536           0 : static PyObject *py_ForestTrustDataDomainInfo_get_sid(PyObject *obj, void *closure)
   14537             : {
   14538           0 :         struct ForestTrustDataDomainInfo *object = pytalloc_get_ptr(obj);
   14539           0 :         PyObject *py_sid;
   14540           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
   14541           0 :         return py_sid;
   14542             : }
   14543             : 
   14544           0 : static int py_ForestTrustDataDomainInfo_set_sid(PyObject *py_obj, PyObject *value, void *closure)
   14545             : {
   14546           0 :         struct ForestTrustDataDomainInfo *object = pytalloc_get_ptr(py_obj);
   14547           0 :         if (value == NULL) {
   14548           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
   14549           0 :                 return -1;
   14550             :         }
   14551           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   14552           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14553           0 :                 PyErr_NoMemory();
   14554           0 :                 return -1;
   14555             :         }
   14556           0 :         object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
   14557           0 :         return 0;
   14558             : }
   14559             : 
   14560           0 : static PyObject *py_ForestTrustDataDomainInfo_get_dns_name(PyObject *obj, void *closure)
   14561             : {
   14562           0 :         struct ForestTrustDataDomainInfo *object = pytalloc_get_ptr(obj);
   14563           0 :         PyObject *py_dns_name;
   14564           0 :         py_dns_name = pytalloc_reference_ex(&ForestTrustString_Type, pytalloc_get_mem_ctx(obj), &object->dns_name);
   14565           0 :         return py_dns_name;
   14566             : }
   14567             : 
   14568           0 : static int py_ForestTrustDataDomainInfo_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
   14569             : {
   14570           0 :         struct ForestTrustDataDomainInfo *object = pytalloc_get_ptr(py_obj);
   14571           0 :         if (value == NULL) {
   14572           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_name");
   14573           0 :                 return -1;
   14574             :         }
   14575           0 :         PY_CHECK_TYPE(&ForestTrustString_Type, value, return -1;);
   14576           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14577           0 :                 PyErr_NoMemory();
   14578           0 :                 return -1;
   14579             :         }
   14580           0 :         object->dns_name = *(struct ForestTrustString *)pytalloc_get_ptr(value);
   14581           0 :         return 0;
   14582             : }
   14583             : 
   14584           0 : static PyObject *py_ForestTrustDataDomainInfo_get_netbios_name(PyObject *obj, void *closure)
   14585             : {
   14586           0 :         struct ForestTrustDataDomainInfo *object = pytalloc_get_ptr(obj);
   14587           0 :         PyObject *py_netbios_name;
   14588           0 :         py_netbios_name = pytalloc_reference_ex(&ForestTrustString_Type, pytalloc_get_mem_ctx(obj), &object->netbios_name);
   14589           0 :         return py_netbios_name;
   14590             : }
   14591             : 
   14592           0 : static int py_ForestTrustDataDomainInfo_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
   14593             : {
   14594           0 :         struct ForestTrustDataDomainInfo *object = pytalloc_get_ptr(py_obj);
   14595           0 :         if (value == NULL) {
   14596           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netbios_name");
   14597           0 :                 return -1;
   14598             :         }
   14599           0 :         PY_CHECK_TYPE(&ForestTrustString_Type, value, return -1;);
   14600           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14601           0 :                 PyErr_NoMemory();
   14602           0 :                 return -1;
   14603             :         }
   14604           0 :         object->netbios_name = *(struct ForestTrustString *)pytalloc_get_ptr(value);
   14605           0 :         return 0;
   14606             : }
   14607             : 
   14608             : static PyGetSetDef py_ForestTrustDataDomainInfo_getsetters[] = {
   14609             :         {
   14610             :                 .name = discard_const_p(char, "sid_size"),
   14611             :                 .get = py_ForestTrustDataDomainInfo_get_sid_size,
   14612             :                 .set = py_ForestTrustDataDomainInfo_set_sid_size,
   14613             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14614             :         },
   14615             :         {
   14616             :                 .name = discard_const_p(char, "sid"),
   14617             :                 .get = py_ForestTrustDataDomainInfo_get_sid,
   14618             :                 .set = py_ForestTrustDataDomainInfo_set_sid,
   14619             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid")
   14620             :         },
   14621             :         {
   14622             :                 .name = discard_const_p(char, "dns_name"),
   14623             :                 .get = py_ForestTrustDataDomainInfo_get_dns_name,
   14624             :                 .set = py_ForestTrustDataDomainInfo_set_dns_name,
   14625             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ForestTrustString")
   14626             :         },
   14627             :         {
   14628             :                 .name = discard_const_p(char, "netbios_name"),
   14629             :                 .get = py_ForestTrustDataDomainInfo_get_netbios_name,
   14630             :                 .set = py_ForestTrustDataDomainInfo_set_netbios_name,
   14631             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ForestTrustString")
   14632             :         },
   14633             :         { .name = NULL }
   14634             : };
   14635             : 
   14636           0 : static PyObject *py_ForestTrustDataDomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14637             : {
   14638           0 :         return pytalloc_new(struct ForestTrustDataDomainInfo, type);
   14639             : }
   14640             : 
   14641             : 
   14642             : static PyTypeObject ForestTrustDataDomainInfo_Type = {
   14643             :         PyVarObject_HEAD_INIT(NULL, 0)
   14644             :         .tp_name = "drsblobs.ForestTrustDataDomainInfo",
   14645             :         .tp_getset = py_ForestTrustDataDomainInfo_getsetters,
   14646             :         .tp_methods = NULL,
   14647             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14648             :         .tp_new = py_ForestTrustDataDomainInfo_new,
   14649             : };
   14650             : 
   14651             : 
   14652           0 : static PyObject *py_ForestTrustDataBinaryData_get_size(PyObject *obj, void *closure)
   14653             : {
   14654           0 :         struct ForestTrustDataBinaryData *object = pytalloc_get_ptr(obj);
   14655           0 :         PyObject *py_size;
   14656           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
   14657           0 :         return py_size;
   14658             : }
   14659             : 
   14660           0 : static int py_ForestTrustDataBinaryData_set_size(PyObject *py_obj, PyObject *value, void *closure)
   14661             : {
   14662           0 :         struct ForestTrustDataBinaryData *object = pytalloc_get_ptr(py_obj);
   14663           0 :         if (value == NULL) {
   14664           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   14665           0 :                 return -1;
   14666             :         }
   14667             :         {
   14668           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   14669           0 :                 if (PyLong_Check(value)) {
   14670           0 :                         unsigned long long test_var;
   14671           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14672           0 :                         if (PyErr_Occurred() != NULL) {
   14673           0 :                                 return -1;
   14674             :                         }
   14675           0 :                         if (test_var > uint_max) {
   14676           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14677             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14678           0 :                                 return -1;
   14679             :                         }
   14680           0 :                         object->size = test_var;
   14681             :                 } else {
   14682           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14683             :                           PyLong_Type.tp_name);
   14684           0 :                         return -1;
   14685             :                 }
   14686             :         }
   14687           0 :         return 0;
   14688             : }
   14689             : 
   14690           0 : static PyObject *py_ForestTrustDataBinaryData_get_data(PyObject *obj, void *closure)
   14691             : {
   14692           0 :         struct ForestTrustDataBinaryData *object = pytalloc_get_ptr(obj);
   14693           0 :         PyObject *py_data;
   14694           0 :         py_data = PyList_New(object->size);
   14695           0 :         if (py_data == NULL) {
   14696           0 :                 return NULL;
   14697             :         }
   14698             :         {
   14699             :                 int data_cntr_0;
   14700           0 :                 for (data_cntr_0 = 0; data_cntr_0 < (object->size); data_cntr_0++) {
   14701           0 :                         PyObject *py_data_0;
   14702           0 :                         py_data_0 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_0]));
   14703           0 :                         PyList_SetItem(py_data, data_cntr_0, py_data_0);
   14704             :                 }
   14705             :         }
   14706           0 :         return py_data;
   14707             : }
   14708             : 
   14709           0 : static int py_ForestTrustDataBinaryData_set_data(PyObject *py_obj, PyObject *value, void *closure)
   14710             : {
   14711           0 :         struct ForestTrustDataBinaryData *object = pytalloc_get_ptr(py_obj);
   14712           0 :         if (value == NULL) {
   14713           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
   14714           0 :                 return -1;
   14715             :         }
   14716           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   14717             :         {
   14718           0 :                 int data_cntr_0;
   14719           0 :                 object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
   14720           0 :                 if (!object->data) { return -1; }
   14721           0 :                 talloc_set_name_const(object->data, "ARRAY: object->data");
   14722           0 :                 for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
   14723           0 :                         if (PyList_GET_ITEM(value, data_cntr_0) == NULL) {
   14724           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->data)[data_cntr_0]");
   14725           0 :                                 return -1;
   14726             :                         }
   14727             :                         {
   14728           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_0]));
   14729           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_0))) {
   14730           0 :                                         unsigned long long test_var;
   14731           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_0));
   14732           0 :                                         if (PyErr_Occurred() != NULL) {
   14733           0 :                                                 return -1;
   14734             :                                         }
   14735           0 :                                         if (test_var > uint_max) {
   14736           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14737             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   14738           0 :                                                 return -1;
   14739             :                                         }
   14740           0 :                                         (object->data)[data_cntr_0] = test_var;
   14741             :                                 } else {
   14742           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14743             :                                           PyLong_Type.tp_name);
   14744           0 :                                         return -1;
   14745             :                                 }
   14746             :                         }
   14747             :                 }
   14748             :         }
   14749           0 :         return 0;
   14750             : }
   14751             : 
   14752             : static PyGetSetDef py_ForestTrustDataBinaryData_getsetters[] = {
   14753             :         {
   14754             :                 .name = discard_const_p(char, "size"),
   14755             :                 .get = py_ForestTrustDataBinaryData_get_size,
   14756             :                 .set = py_ForestTrustDataBinaryData_set_size,
   14757             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14758             :         },
   14759             :         {
   14760             :                 .name = discard_const_p(char, "data"),
   14761             :                 .get = py_ForestTrustDataBinaryData_get_data,
   14762             :                 .set = py_ForestTrustDataBinaryData_set_data,
   14763             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14764             :         },
   14765             :         { .name = NULL }
   14766             : };
   14767             : 
   14768           0 : static PyObject *py_ForestTrustDataBinaryData_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14769             : {
   14770           0 :         return pytalloc_new(struct ForestTrustDataBinaryData, type);
   14771             : }
   14772             : 
   14773             : 
   14774             : static PyTypeObject ForestTrustDataBinaryData_Type = {
   14775             :         PyVarObject_HEAD_INIT(NULL, 0)
   14776             :         .tp_name = "drsblobs.ForestTrustDataBinaryData",
   14777             :         .tp_getset = py_ForestTrustDataBinaryData_getsetters,
   14778             :         .tp_methods = NULL,
   14779             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14780             :         .tp_new = py_ForestTrustDataBinaryData_new,
   14781             : };
   14782             : 
   14783           0 : static PyObject *py_import_ForestTrustData(TALLOC_CTX *mem_ctx, int level, union ForestTrustData *in)
   14784             : {
   14785           0 :         PyObject *ret;
   14786             : 
   14787           0 :         switch (level) {
   14788           0 :                 case FOREST_TRUST_TOP_LEVEL_NAME:
   14789           0 :                         ret = pytalloc_reference_ex(&ForestTrustString_Type, mem_ctx, &in->name);
   14790           0 :                         return ret;
   14791             : 
   14792           0 :                 case FOREST_TRUST_TOP_LEVEL_NAME_EX:
   14793           0 :                         ret = pytalloc_reference_ex(&ForestTrustString_Type, mem_ctx, &in->name);
   14794           0 :                         return ret;
   14795             : 
   14796           0 :                 case FOREST_TRUST_DOMAIN_INFO:
   14797           0 :                         ret = pytalloc_reference_ex(&ForestTrustDataDomainInfo_Type, mem_ctx, &in->info);
   14798           0 :                         return ret;
   14799             : 
   14800           0 :                 default:
   14801           0 :                         ret = pytalloc_reference_ex(&ForestTrustDataBinaryData_Type, mem_ctx, &in->data);
   14802           0 :                         return ret;
   14803             : 
   14804             :         }
   14805             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   14806             :         return NULL;
   14807             : }
   14808             : 
   14809           0 : static union ForestTrustData *py_export_ForestTrustData(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   14810             : {
   14811           0 :         union ForestTrustData *ret = talloc_zero(mem_ctx, union ForestTrustData);
   14812           0 :         switch (level) {
   14813           0 :                 case FOREST_TRUST_TOP_LEVEL_NAME:
   14814           0 :                         if (in == NULL) {
   14815           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
   14816           0 :                                 talloc_free(ret); return NULL;
   14817             :                         }
   14818           0 :                         PY_CHECK_TYPE(&ForestTrustString_Type, in, talloc_free(ret); return NULL;);
   14819           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   14820           0 :                                 PyErr_NoMemory();
   14821           0 :                                 talloc_free(ret); return NULL;
   14822             :                         }
   14823           0 :                         ret->name = *(struct ForestTrustString *)pytalloc_get_ptr(in);
   14824           0 :                         break;
   14825             : 
   14826           0 :                 case FOREST_TRUST_TOP_LEVEL_NAME_EX:
   14827           0 :                         if (in == NULL) {
   14828           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
   14829           0 :                                 talloc_free(ret); return NULL;
   14830             :                         }
   14831           0 :                         PY_CHECK_TYPE(&ForestTrustString_Type, in, talloc_free(ret); return NULL;);
   14832           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   14833           0 :                                 PyErr_NoMemory();
   14834           0 :                                 talloc_free(ret); return NULL;
   14835             :                         }
   14836           0 :                         ret->name = *(struct ForestTrustString *)pytalloc_get_ptr(in);
   14837           0 :                         break;
   14838             : 
   14839           0 :                 case FOREST_TRUST_DOMAIN_INFO:
   14840           0 :                         if (in == NULL) {
   14841           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info");
   14842           0 :                                 talloc_free(ret); return NULL;
   14843             :                         }
   14844           0 :                         PY_CHECK_TYPE(&ForestTrustDataDomainInfo_Type, in, talloc_free(ret); return NULL;);
   14845           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   14846           0 :                                 PyErr_NoMemory();
   14847           0 :                                 talloc_free(ret); return NULL;
   14848             :                         }
   14849           0 :                         ret->info = *(struct ForestTrustDataDomainInfo *)pytalloc_get_ptr(in);
   14850           0 :                         break;
   14851             : 
   14852           0 :                 default:
   14853           0 :                         if (in == NULL) {
   14854           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->data");
   14855           0 :                                 talloc_free(ret); return NULL;
   14856             :                         }
   14857           0 :                         PY_CHECK_TYPE(&ForestTrustDataBinaryData_Type, in, talloc_free(ret); return NULL;);
   14858           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   14859           0 :                                 PyErr_NoMemory();
   14860           0 :                                 talloc_free(ret); return NULL;
   14861             :                         }
   14862           0 :                         ret->data = *(struct ForestTrustDataBinaryData *)pytalloc_get_ptr(in);
   14863           0 :                         break;
   14864             : 
   14865             :         }
   14866             : 
   14867           0 :         return ret;
   14868             : }
   14869             : 
   14870           0 : static PyObject *py_ForestTrustData_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14871             : {
   14872           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   14873           0 :         PyObject *mem_ctx_obj = NULL;
   14874           0 :         TALLOC_CTX *mem_ctx = NULL;
   14875           0 :         int level = 0;
   14876           0 :         PyObject *in_obj = NULL;
   14877           0 :         union ForestTrustData *in = NULL;
   14878             : 
   14879           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   14880             :                 discard_const_p(char *, kwnames),
   14881             :                 &mem_ctx_obj,
   14882             :                 &level,
   14883             :                 &in_obj)) {
   14884           0 :                 return NULL;
   14885             :         }
   14886           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   14887           0 :         if (mem_ctx == NULL) {
   14888           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   14889           0 :                 return NULL;
   14890             :         }
   14891           0 :         in = (union ForestTrustData *)pytalloc_get_ptr(in_obj);
   14892           0 :         if (in == NULL) {
   14893           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union ForestTrustData!");
   14894           0 :                 return NULL;
   14895             :         }
   14896             : 
   14897           0 :         return py_import_ForestTrustData(mem_ctx, level, in);
   14898             : }
   14899             : 
   14900           0 : static PyObject *py_ForestTrustData_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14901             : {
   14902           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   14903           0 :         PyObject *mem_ctx_obj = NULL;
   14904           0 :         TALLOC_CTX *mem_ctx = NULL;
   14905           0 :         int level = 0;
   14906           0 :         PyObject *in = NULL;
   14907           0 :         union ForestTrustData *out = NULL;
   14908             : 
   14909           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   14910             :                 discard_const_p(char *, kwnames),
   14911             :                 &mem_ctx_obj,
   14912             :                 &level,
   14913             :                 &in)) {
   14914           0 :                 return NULL;
   14915             :         }
   14916           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   14917           0 :         if (mem_ctx == NULL) {
   14918           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   14919           0 :                 return NULL;
   14920             :         }
   14921             : 
   14922           0 :         out = py_export_ForestTrustData(mem_ctx, level, in);
   14923           0 :         if (out == NULL) {
   14924           0 :                 return NULL;
   14925             :         }
   14926             : 
   14927           0 :         return pytalloc_GenericObject_reference(out);
   14928             : }
   14929             : 
   14930             : static PyMethodDef py_ForestTrustData_methods[] = {
   14931             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ForestTrustData_import),
   14932             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   14933             :                 "T.__import__(mem_ctx, level, in) => ret." },
   14934             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ForestTrustData_export),
   14935             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   14936             :                 "T.__export__(mem_ctx, level, in) => ret." },
   14937             :         { NULL, NULL, 0, NULL }
   14938             : };
   14939             : 
   14940           0 : static PyObject *py_ForestTrustData_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14941             : {
   14942           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   14943           0 :         return NULL;
   14944             : }
   14945             : 
   14946             : 
   14947             : static PyTypeObject ForestTrustData_Type = {
   14948             :         PyVarObject_HEAD_INIT(NULL, 0)
   14949             :         .tp_name = "drsblobs.ForestTrustData",
   14950             :         .tp_getset = NULL,
   14951             :         .tp_methods = py_ForestTrustData_methods,
   14952             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14953             :         .tp_new = py_ForestTrustData_new,
   14954             : };
   14955             : 
   14956             : 
   14957           0 : static PyObject *py_ForestTrustInfoRecord_get_flags(PyObject *obj, void *closure)
   14958             : {
   14959           0 :         struct ForestTrustInfoRecord *object = pytalloc_get_ptr(obj);
   14960           0 :         PyObject *py_flags;
   14961           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
   14962           0 :         return py_flags;
   14963             : }
   14964             : 
   14965           0 : static int py_ForestTrustInfoRecord_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   14966             : {
   14967           0 :         struct ForestTrustInfoRecord *object = pytalloc_get_ptr(py_obj);
   14968           0 :         if (value == NULL) {
   14969           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   14970           0 :                 return -1;
   14971             :         }
   14972             :         {
   14973           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   14974           0 :                 if (PyLong_Check(value)) {
   14975           0 :                         unsigned long long test_var;
   14976           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14977           0 :                         if (PyErr_Occurred() != NULL) {
   14978           0 :                                 return -1;
   14979             :                         }
   14980           0 :                         if (test_var > uint_max) {
   14981           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14982             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14983           0 :                                 return -1;
   14984             :                         }
   14985           0 :                         object->flags = test_var;
   14986             :                 } else {
   14987           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14988             :                           PyLong_Type.tp_name);
   14989           0 :                         return -1;
   14990             :                 }
   14991             :         }
   14992           0 :         return 0;
   14993             : }
   14994             : 
   14995           0 : static PyObject *py_ForestTrustInfoRecord_get_timestamp(PyObject *obj, void *closure)
   14996             : {
   14997           0 :         struct ForestTrustInfoRecord *object = pytalloc_get_ptr(obj);
   14998           0 :         PyObject *py_timestamp;
   14999           0 :         py_timestamp = PyLong_FromUnsignedLongLong(object->timestamp);
   15000           0 :         return py_timestamp;
   15001             : }
   15002             : 
   15003           0 : static int py_ForestTrustInfoRecord_set_timestamp(PyObject *py_obj, PyObject *value, void *closure)
   15004             : {
   15005           0 :         struct ForestTrustInfoRecord *object = pytalloc_get_ptr(py_obj);
   15006           0 :         if (value == NULL) {
   15007           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timestamp");
   15008           0 :                 return -1;
   15009             :         }
   15010             :         {
   15011           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timestamp));
   15012           0 :                 if (PyLong_Check(value)) {
   15013           0 :                         unsigned long long test_var;
   15014           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15015           0 :                         if (PyErr_Occurred() != NULL) {
   15016           0 :                                 return -1;
   15017             :                         }
   15018           0 :                         if (test_var > uint_max) {
   15019           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15020             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15021           0 :                                 return -1;
   15022             :                         }
   15023           0 :                         object->timestamp = test_var;
   15024             :                 } else {
   15025           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15026             :                           PyLong_Type.tp_name);
   15027           0 :                         return -1;
   15028             :                 }
   15029             :         }
   15030           0 :         return 0;
   15031             : }
   15032             : 
   15033           0 : static PyObject *py_ForestTrustInfoRecord_get_type(PyObject *obj, void *closure)
   15034             : {
   15035           0 :         struct ForestTrustInfoRecord *object = pytalloc_get_ptr(obj);
   15036           0 :         PyObject *py_type;
   15037           0 :         py_type = PyLong_FromLong((uint16_t)(object->type));
   15038           0 :         return py_type;
   15039             : }
   15040             : 
   15041           0 : static int py_ForestTrustInfoRecord_set_type(PyObject *py_obj, PyObject *value, void *closure)
   15042             : {
   15043           0 :         struct ForestTrustInfoRecord *object = pytalloc_get_ptr(py_obj);
   15044           0 :         if (value == NULL) {
   15045           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
   15046           0 :                 return -1;
   15047             :         }
   15048             :         {
   15049           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
   15050           0 :                 if (PyLong_Check(value)) {
   15051           0 :                         unsigned long long test_var;
   15052           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15053           0 :                         if (PyErr_Occurred() != NULL) {
   15054           0 :                                 return -1;
   15055             :                         }
   15056           0 :                         if (test_var > uint_max) {
   15057           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15058             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15059           0 :                                 return -1;
   15060             :                         }
   15061           0 :                         object->type = test_var;
   15062             :                 } else {
   15063           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15064             :                           PyLong_Type.tp_name);
   15065           0 :                         return -1;
   15066             :                 }
   15067             :         }
   15068           0 :         return 0;
   15069             : }
   15070             : 
   15071           0 : static PyObject *py_ForestTrustInfoRecord_get_data(PyObject *obj, void *closure)
   15072             : {
   15073           0 :         struct ForestTrustInfoRecord *object = pytalloc_get_ptr(obj);
   15074           0 :         PyObject *py_data;
   15075           0 :         py_data = pyrpc_import_union(&ForestTrustData_Type, pytalloc_get_mem_ctx(obj), object->type, &object->data, "union ForestTrustData");
   15076           0 :         if (py_data == NULL) {
   15077           0 :                 return NULL;
   15078             :         }
   15079           0 :         return py_data;
   15080             : }
   15081             : 
   15082           0 : static int py_ForestTrustInfoRecord_set_data(PyObject *py_obj, PyObject *value, void *closure)
   15083             : {
   15084           0 :         struct ForestTrustInfoRecord *object = pytalloc_get_ptr(py_obj);
   15085           0 :         if (value == NULL) {
   15086           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
   15087           0 :                 return -1;
   15088             :         }
   15089             :         {
   15090           0 :                 union ForestTrustData *data_switch_0;
   15091           0 :                 data_switch_0 = (union ForestTrustData *)pyrpc_export_union(&ForestTrustData_Type, pytalloc_get_mem_ctx(py_obj), object->type, value, "union ForestTrustData");
   15092           0 :                 if (data_switch_0 == NULL) {
   15093           0 :                         return -1;
   15094             :                 }
   15095           0 :                 object->data = *data_switch_0;
   15096             :         }
   15097           0 :         return 0;
   15098             : }
   15099             : 
   15100             : static PyGetSetDef py_ForestTrustInfoRecord_getsetters[] = {
   15101             :         {
   15102             :                 .name = discard_const_p(char, "flags"),
   15103             :                 .get = py_ForestTrustInfoRecord_get_flags,
   15104             :                 .set = py_ForestTrustInfoRecord_set_flags,
   15105             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_ForestTrustRecordFlags")
   15106             :         },
   15107             :         {
   15108             :                 .name = discard_const_p(char, "timestamp"),
   15109             :                 .get = py_ForestTrustInfoRecord_get_timestamp,
   15110             :                 .set = py_ForestTrustInfoRecord_set_timestamp,
   15111             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   15112             :         },
   15113             :         {
   15114             :                 .name = discard_const_p(char, "type"),
   15115             :                 .get = py_ForestTrustInfoRecord_get_type,
   15116             :                 .set = py_ForestTrustInfoRecord_set_type,
   15117             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ForestTrustInfoRecordType")
   15118             :         },
   15119             :         {
   15120             :                 .name = discard_const_p(char, "data"),
   15121             :                 .get = py_ForestTrustInfoRecord_get_data,
   15122             :                 .set = py_ForestTrustInfoRecord_set_data,
   15123             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ForestTrustData")
   15124             :         },
   15125             :         { .name = NULL }
   15126             : };
   15127             : 
   15128           0 : static PyObject *py_ForestTrustInfoRecord_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15129             : {
   15130           0 :         return pytalloc_new(struct ForestTrustInfoRecord, type);
   15131             : }
   15132             : 
   15133           0 : static PyObject *py_ForestTrustInfoRecord_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   15134             : {
   15135           0 :         struct ForestTrustInfoRecord *object = pytalloc_get_ptr(py_obj);
   15136           0 :         PyObject *ret = NULL;
   15137           0 :         DATA_BLOB blob;
   15138           0 :         enum ndr_err_code err;
   15139           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   15140           0 :         if (tmp_ctx == NULL) {
   15141           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   15142           0 :                 return NULL;
   15143             :         }
   15144           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_ForestTrustInfoRecord);
   15145           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15146           0 :                 TALLOC_FREE(tmp_ctx);
   15147           0 :                 PyErr_SetNdrError(err);
   15148           0 :                 return NULL;
   15149             :         }
   15150             : 
   15151           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   15152           0 :         TALLOC_FREE(tmp_ctx);
   15153           0 :         return ret;
   15154             : }
   15155             : 
   15156           0 : static PyObject *py_ForestTrustInfoRecord_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15157             : {
   15158           0 :         struct ForestTrustInfoRecord *object = pytalloc_get_ptr(py_obj);
   15159           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   15160           0 :         Py_ssize_t blob_length = 0;
   15161           0 :         enum ndr_err_code err;
   15162           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   15163           0 :         PyObject *allow_remaining_obj = NULL;
   15164           0 :         bool allow_remaining = false;
   15165             : 
   15166           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   15167             :                 discard_const_p(char *, kwnames),
   15168             :                 &blob.data, &blob_length,
   15169             :                 &allow_remaining_obj)) {
   15170           0 :                 return NULL;
   15171             :         }
   15172           0 :         blob.length = blob_length;
   15173             : 
   15174           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   15175           0 :                 allow_remaining = true;
   15176             :         }
   15177             : 
   15178           0 :         if (allow_remaining) {
   15179           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ForestTrustInfoRecord);
   15180             :         } else {
   15181           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ForestTrustInfoRecord);
   15182             :         }
   15183           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15184           0 :                 PyErr_SetNdrError(err);
   15185           0 :                 return NULL;
   15186             :         }
   15187             : 
   15188           0 :         Py_RETURN_NONE;
   15189             : }
   15190             : 
   15191           0 : static PyObject *py_ForestTrustInfoRecord_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   15192             : {
   15193           0 :         struct ForestTrustInfoRecord *object = pytalloc_get_ptr(py_obj);
   15194           0 :         PyObject *ret;
   15195           0 :         char *retstr;
   15196             : 
   15197           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_ForestTrustInfoRecord, "ForestTrustInfoRecord", object);
   15198           0 :         ret = PyUnicode_FromString(retstr);
   15199           0 :         talloc_free(retstr);
   15200             : 
   15201           0 :         return ret;
   15202             : }
   15203             : 
   15204             : static PyMethodDef py_ForestTrustInfoRecord_methods[] = {
   15205             :         { "__ndr_pack__", (PyCFunction)py_ForestTrustInfoRecord_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   15206             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ForestTrustInfoRecord_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   15207             :         { "__ndr_print__", (PyCFunction)py_ForestTrustInfoRecord_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   15208             :         { NULL, NULL, 0, NULL }
   15209             : };
   15210             : 
   15211             : 
   15212             : static PyTypeObject ForestTrustInfoRecord_Type = {
   15213             :         PyVarObject_HEAD_INIT(NULL, 0)
   15214             :         .tp_name = "drsblobs.ForestTrustInfoRecord",
   15215             :         .tp_getset = py_ForestTrustInfoRecord_getsetters,
   15216             :         .tp_methods = py_ForestTrustInfoRecord_methods,
   15217             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15218             :         .tp_new = py_ForestTrustInfoRecord_new,
   15219             : };
   15220             : 
   15221             : 
   15222           0 : static PyObject *py_ForestTrustInfoRecordArmor_get_record_size(PyObject *obj, void *closure)
   15223             : {
   15224           0 :         struct ForestTrustInfoRecordArmor *object = pytalloc_get_ptr(obj);
   15225           0 :         PyObject *py_record_size;
   15226           0 :         py_record_size = PyLong_FromUnsignedLongLong((uint32_t)(object->record_size));
   15227           0 :         return py_record_size;
   15228             : }
   15229             : 
   15230           0 : static int py_ForestTrustInfoRecordArmor_set_record_size(PyObject *py_obj, PyObject *value, void *closure)
   15231             : {
   15232           0 :         struct ForestTrustInfoRecordArmor *object = pytalloc_get_ptr(py_obj);
   15233           0 :         if (value == NULL) {
   15234           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->record_size");
   15235           0 :                 return -1;
   15236             :         }
   15237             :         {
   15238           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->record_size));
   15239           0 :                 if (PyLong_Check(value)) {
   15240           0 :                         unsigned long long test_var;
   15241           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15242           0 :                         if (PyErr_Occurred() != NULL) {
   15243           0 :                                 return -1;
   15244             :                         }
   15245           0 :                         if (test_var > uint_max) {
   15246           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15247             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15248           0 :                                 return -1;
   15249             :                         }
   15250           0 :                         object->record_size = test_var;
   15251             :                 } else {
   15252           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15253             :                           PyLong_Type.tp_name);
   15254           0 :                         return -1;
   15255             :                 }
   15256             :         }
   15257           0 :         return 0;
   15258             : }
   15259             : 
   15260           0 : static PyObject *py_ForestTrustInfoRecordArmor_get_record(PyObject *obj, void *closure)
   15261             : {
   15262           0 :         struct ForestTrustInfoRecordArmor *object = pytalloc_get_ptr(obj);
   15263           0 :         PyObject *py_record;
   15264           0 :         py_record = pytalloc_reference_ex(&ForestTrustInfoRecord_Type, pytalloc_get_mem_ctx(obj), &object->record);
   15265           0 :         return py_record;
   15266             : }
   15267             : 
   15268           0 : static int py_ForestTrustInfoRecordArmor_set_record(PyObject *py_obj, PyObject *value, void *closure)
   15269             : {
   15270           0 :         struct ForestTrustInfoRecordArmor *object = pytalloc_get_ptr(py_obj);
   15271           0 :         if (value == NULL) {
   15272           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->record");
   15273           0 :                 return -1;
   15274             :         }
   15275           0 :         PY_CHECK_TYPE(&ForestTrustInfoRecord_Type, value, return -1;);
   15276           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   15277           0 :                 PyErr_NoMemory();
   15278           0 :                 return -1;
   15279             :         }
   15280           0 :         object->record = *(struct ForestTrustInfoRecord *)pytalloc_get_ptr(value);
   15281           0 :         return 0;
   15282             : }
   15283             : 
   15284             : static PyGetSetDef py_ForestTrustInfoRecordArmor_getsetters[] = {
   15285             :         {
   15286             :                 .name = discard_const_p(char, "record_size"),
   15287             :                 .get = py_ForestTrustInfoRecordArmor_get_record_size,
   15288             :                 .set = py_ForestTrustInfoRecordArmor_set_record_size,
   15289             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15290             :         },
   15291             :         {
   15292             :                 .name = discard_const_p(char, "record"),
   15293             :                 .get = py_ForestTrustInfoRecordArmor_get_record,
   15294             :                 .set = py_ForestTrustInfoRecordArmor_set_record,
   15295             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ForestTrustInfoRecord")
   15296             :         },
   15297             :         { .name = NULL }
   15298             : };
   15299             : 
   15300           0 : static PyObject *py_ForestTrustInfoRecordArmor_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15301             : {
   15302           0 :         return pytalloc_new(struct ForestTrustInfoRecordArmor, type);
   15303             : }
   15304             : 
   15305             : 
   15306             : static PyTypeObject ForestTrustInfoRecordArmor_Type = {
   15307             :         PyVarObject_HEAD_INIT(NULL, 0)
   15308             :         .tp_name = "drsblobs.ForestTrustInfoRecordArmor",
   15309             :         .tp_getset = py_ForestTrustInfoRecordArmor_getsetters,
   15310             :         .tp_methods = NULL,
   15311             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15312             :         .tp_new = py_ForestTrustInfoRecordArmor_new,
   15313             : };
   15314             : 
   15315             : 
   15316           0 : static PyObject *py_ForestTrustInfo_get_version(PyObject *obj, void *closure)
   15317             : {
   15318           0 :         struct ForestTrustInfo *object = pytalloc_get_ptr(obj);
   15319           0 :         PyObject *py_version;
   15320           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
   15321           0 :         return py_version;
   15322             : }
   15323             : 
   15324           0 : static int py_ForestTrustInfo_set_version(PyObject *py_obj, PyObject *value, void *closure)
   15325             : {
   15326           0 :         struct ForestTrustInfo *object = pytalloc_get_ptr(py_obj);
   15327           0 :         if (value == NULL) {
   15328           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
   15329           0 :                 return -1;
   15330             :         }
   15331             :         {
   15332           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
   15333           0 :                 if (PyLong_Check(value)) {
   15334           0 :                         unsigned long long test_var;
   15335           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15336           0 :                         if (PyErr_Occurred() != NULL) {
   15337           0 :                                 return -1;
   15338             :                         }
   15339           0 :                         if (test_var > uint_max) {
   15340           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15341             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15342           0 :                                 return -1;
   15343             :                         }
   15344           0 :                         object->version = test_var;
   15345             :                 } else {
   15346           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15347             :                           PyLong_Type.tp_name);
   15348           0 :                         return -1;
   15349             :                 }
   15350             :         }
   15351           0 :         return 0;
   15352             : }
   15353             : 
   15354           0 : static PyObject *py_ForestTrustInfo_get_count(PyObject *obj, void *closure)
   15355             : {
   15356           0 :         struct ForestTrustInfo *object = pytalloc_get_ptr(obj);
   15357           0 :         PyObject *py_count;
   15358           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   15359           0 :         return py_count;
   15360             : }
   15361             : 
   15362           0 : static int py_ForestTrustInfo_set_count(PyObject *py_obj, PyObject *value, void *closure)
   15363             : {
   15364           0 :         struct ForestTrustInfo *object = pytalloc_get_ptr(py_obj);
   15365           0 :         if (value == NULL) {
   15366           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   15367           0 :                 return -1;
   15368             :         }
   15369             :         {
   15370           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   15371           0 :                 if (PyLong_Check(value)) {
   15372           0 :                         unsigned long long test_var;
   15373           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15374           0 :                         if (PyErr_Occurred() != NULL) {
   15375           0 :                                 return -1;
   15376             :                         }
   15377           0 :                         if (test_var > uint_max) {
   15378           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15379             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15380           0 :                                 return -1;
   15381             :                         }
   15382           0 :                         object->count = test_var;
   15383             :                 } else {
   15384           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15385             :                           PyLong_Type.tp_name);
   15386           0 :                         return -1;
   15387             :                 }
   15388             :         }
   15389           0 :         return 0;
   15390             : }
   15391             : 
   15392           0 : static PyObject *py_ForestTrustInfo_get_records(PyObject *obj, void *closure)
   15393             : {
   15394           0 :         struct ForestTrustInfo *object = pytalloc_get_ptr(obj);
   15395           0 :         PyObject *py_records;
   15396           0 :         py_records = PyList_New(object->count);
   15397           0 :         if (py_records == NULL) {
   15398           0 :                 return NULL;
   15399             :         }
   15400             :         {
   15401             :                 int records_cntr_0;
   15402           0 :                 for (records_cntr_0 = 0; records_cntr_0 < (object->count); records_cntr_0++) {
   15403           0 :                         PyObject *py_records_0;
   15404           0 :                         py_records_0 = pytalloc_reference_ex(&ForestTrustInfoRecordArmor_Type, object->records, &(object->records)[records_cntr_0]);
   15405           0 :                         PyList_SetItem(py_records, records_cntr_0, py_records_0);
   15406             :                 }
   15407             :         }
   15408           0 :         return py_records;
   15409             : }
   15410             : 
   15411           0 : static int py_ForestTrustInfo_set_records(PyObject *py_obj, PyObject *value, void *closure)
   15412             : {
   15413           0 :         struct ForestTrustInfo *object = pytalloc_get_ptr(py_obj);
   15414           0 :         if (value == NULL) {
   15415           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->records");
   15416           0 :                 return -1;
   15417             :         }
   15418           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   15419             :         {
   15420           0 :                 int records_cntr_0;
   15421           0 :                 object->records = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->records, PyList_GET_SIZE(value));
   15422           0 :                 if (!object->records) { return -1; }
   15423           0 :                 talloc_set_name_const(object->records, "ARRAY: object->records");
   15424           0 :                 for (records_cntr_0 = 0; records_cntr_0 < PyList_GET_SIZE(value); records_cntr_0++) {
   15425           0 :                         if (PyList_GET_ITEM(value, records_cntr_0) == NULL) {
   15426           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->records)[records_cntr_0]");
   15427           0 :                                 return -1;
   15428             :                         }
   15429           0 :                         PY_CHECK_TYPE(&ForestTrustInfoRecordArmor_Type, PyList_GET_ITEM(value, records_cntr_0), return -1;);
   15430           0 :                         if (talloc_reference(object->records, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, records_cntr_0))) == NULL) {
   15431           0 :                                 PyErr_NoMemory();
   15432           0 :                                 return -1;
   15433             :                         }
   15434           0 :                         (object->records)[records_cntr_0] = *(struct ForestTrustInfoRecordArmor *)pytalloc_get_ptr(PyList_GET_ITEM(value, records_cntr_0));
   15435             :                 }
   15436             :         }
   15437           0 :         return 0;
   15438             : }
   15439             : 
   15440             : static PyGetSetDef py_ForestTrustInfo_getsetters[] = {
   15441             :         {
   15442             :                 .name = discard_const_p(char, "version"),
   15443             :                 .get = py_ForestTrustInfo_get_version,
   15444             :                 .set = py_ForestTrustInfo_set_version,
   15445             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15446             :         },
   15447             :         {
   15448             :                 .name = discard_const_p(char, "count"),
   15449             :                 .get = py_ForestTrustInfo_get_count,
   15450             :                 .set = py_ForestTrustInfo_set_count,
   15451             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15452             :         },
   15453             :         {
   15454             :                 .name = discard_const_p(char, "records"),
   15455             :                 .get = py_ForestTrustInfo_get_records,
   15456             :                 .set = py_ForestTrustInfo_set_records,
   15457             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ForestTrustInfoRecordArmor")
   15458             :         },
   15459             :         { .name = NULL }
   15460             : };
   15461             : 
   15462           0 : static PyObject *py_ForestTrustInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15463             : {
   15464           0 :         return pytalloc_new(struct ForestTrustInfo, type);
   15465             : }
   15466             : 
   15467           0 : static PyObject *py_ForestTrustInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   15468             : {
   15469           0 :         struct ForestTrustInfo *object = pytalloc_get_ptr(py_obj);
   15470           0 :         PyObject *ret = NULL;
   15471           0 :         DATA_BLOB blob;
   15472           0 :         enum ndr_err_code err;
   15473           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   15474           0 :         if (tmp_ctx == NULL) {
   15475           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   15476           0 :                 return NULL;
   15477             :         }
   15478           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_ForestTrustInfo);
   15479           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15480           0 :                 TALLOC_FREE(tmp_ctx);
   15481           0 :                 PyErr_SetNdrError(err);
   15482           0 :                 return NULL;
   15483             :         }
   15484             : 
   15485           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   15486           0 :         TALLOC_FREE(tmp_ctx);
   15487           0 :         return ret;
   15488             : }
   15489             : 
   15490           0 : static PyObject *py_ForestTrustInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15491             : {
   15492           0 :         struct ForestTrustInfo *object = pytalloc_get_ptr(py_obj);
   15493           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   15494           0 :         Py_ssize_t blob_length = 0;
   15495           0 :         enum ndr_err_code err;
   15496           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   15497           0 :         PyObject *allow_remaining_obj = NULL;
   15498           0 :         bool allow_remaining = false;
   15499             : 
   15500           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   15501             :                 discard_const_p(char *, kwnames),
   15502             :                 &blob.data, &blob_length,
   15503             :                 &allow_remaining_obj)) {
   15504           0 :                 return NULL;
   15505             :         }
   15506           0 :         blob.length = blob_length;
   15507             : 
   15508           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   15509           0 :                 allow_remaining = true;
   15510             :         }
   15511             : 
   15512           0 :         if (allow_remaining) {
   15513           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ForestTrustInfo);
   15514             :         } else {
   15515           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ForestTrustInfo);
   15516             :         }
   15517           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15518           0 :                 PyErr_SetNdrError(err);
   15519           0 :                 return NULL;
   15520             :         }
   15521             : 
   15522           0 :         Py_RETURN_NONE;
   15523             : }
   15524             : 
   15525           0 : static PyObject *py_ForestTrustInfo_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   15526             : {
   15527           0 :         struct ForestTrustInfo *object = pytalloc_get_ptr(py_obj);
   15528           0 :         PyObject *ret;
   15529           0 :         char *retstr;
   15530             : 
   15531           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_ForestTrustInfo, "ForestTrustInfo", object);
   15532           0 :         ret = PyUnicode_FromString(retstr);
   15533           0 :         talloc_free(retstr);
   15534             : 
   15535           0 :         return ret;
   15536             : }
   15537             : 
   15538             : static PyMethodDef py_ForestTrustInfo_methods[] = {
   15539             :         { "__ndr_pack__", (PyCFunction)py_ForestTrustInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   15540             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ForestTrustInfo_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   15541             :         { "__ndr_print__", (PyCFunction)py_ForestTrustInfo_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   15542             :         { NULL, NULL, 0, NULL }
   15543             : };
   15544             : 
   15545             : 
   15546             : static PyTypeObject ForestTrustInfo_Type = {
   15547             :         PyVarObject_HEAD_INIT(NULL, 0)
   15548             :         .tp_name = "drsblobs.ForestTrustInfo",
   15549             :         .tp_getset = py_ForestTrustInfo_getsetters,
   15550             :         .tp_methods = py_ForestTrustInfo_methods,
   15551             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15552             :         .tp_new = py_ForestTrustInfo_new,
   15553             : };
   15554             : 
   15555             : 
   15556           0 : static PyObject *py_PlaintextSecret_get_cleartext(PyObject *obj, void *closure)
   15557             : {
   15558           0 :         struct PlaintextSecret *object = pytalloc_get_ptr(obj);
   15559           0 :         PyObject *py_cleartext;
   15560           0 :         py_cleartext = PyBytes_FromStringAndSize((char *)(object->cleartext).data, (object->cleartext).length);
   15561           0 :         return py_cleartext;
   15562             : }
   15563             : 
   15564           0 : static int py_PlaintextSecret_set_cleartext(PyObject *py_obj, PyObject *value, void *closure)
   15565             : {
   15566           0 :         struct PlaintextSecret *object = pytalloc_get_ptr(py_obj);
   15567           0 :         if (value == NULL) {
   15568           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cleartext");
   15569           0 :                 return -1;
   15570             :         }
   15571           0 :         object->cleartext = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   15572           0 :         return 0;
   15573             : }
   15574             : 
   15575             : static PyGetSetDef py_PlaintextSecret_getsetters[] = {
   15576             :         {
   15577             :                 .name = discard_const_p(char, "cleartext"),
   15578             :                 .get = py_PlaintextSecret_get_cleartext,
   15579             :                 .set = py_PlaintextSecret_set_cleartext,
   15580             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   15581             :         },
   15582             :         { .name = NULL }
   15583             : };
   15584             : 
   15585           0 : static PyObject *py_PlaintextSecret_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15586             : {
   15587           0 :         return pytalloc_new(struct PlaintextSecret, type);
   15588             : }
   15589             : 
   15590           0 : static PyObject *py_PlaintextSecret_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   15591             : {
   15592           0 :         struct PlaintextSecret *object = pytalloc_get_ptr(py_obj);
   15593           0 :         PyObject *ret = NULL;
   15594           0 :         DATA_BLOB blob;
   15595           0 :         enum ndr_err_code err;
   15596           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   15597           0 :         if (tmp_ctx == NULL) {
   15598           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   15599           0 :                 return NULL;
   15600             :         }
   15601           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_PlaintextSecret);
   15602           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15603           0 :                 TALLOC_FREE(tmp_ctx);
   15604           0 :                 PyErr_SetNdrError(err);
   15605           0 :                 return NULL;
   15606             :         }
   15607             : 
   15608           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   15609           0 :         TALLOC_FREE(tmp_ctx);
   15610           0 :         return ret;
   15611             : }
   15612             : 
   15613           0 : static PyObject *py_PlaintextSecret_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15614             : {
   15615           0 :         struct PlaintextSecret *object = pytalloc_get_ptr(py_obj);
   15616           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   15617           0 :         Py_ssize_t blob_length = 0;
   15618           0 :         enum ndr_err_code err;
   15619           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   15620           0 :         PyObject *allow_remaining_obj = NULL;
   15621           0 :         bool allow_remaining = false;
   15622             : 
   15623           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   15624             :                 discard_const_p(char *, kwnames),
   15625             :                 &blob.data, &blob_length,
   15626             :                 &allow_remaining_obj)) {
   15627           0 :                 return NULL;
   15628             :         }
   15629           0 :         blob.length = blob_length;
   15630             : 
   15631           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   15632           0 :                 allow_remaining = true;
   15633             :         }
   15634             : 
   15635           0 :         if (allow_remaining) {
   15636           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_PlaintextSecret);
   15637             :         } else {
   15638           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_PlaintextSecret);
   15639             :         }
   15640           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15641           0 :                 PyErr_SetNdrError(err);
   15642           0 :                 return NULL;
   15643             :         }
   15644             : 
   15645           0 :         Py_RETURN_NONE;
   15646             : }
   15647             : 
   15648           0 : static PyObject *py_PlaintextSecret_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   15649             : {
   15650           0 :         struct PlaintextSecret *object = pytalloc_get_ptr(py_obj);
   15651           0 :         PyObject *ret;
   15652           0 :         char *retstr;
   15653             : 
   15654           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_PlaintextSecret, "PlaintextSecret", object);
   15655           0 :         ret = PyUnicode_FromString(retstr);
   15656           0 :         talloc_free(retstr);
   15657             : 
   15658           0 :         return ret;
   15659             : }
   15660             : 
   15661             : static PyMethodDef py_PlaintextSecret_methods[] = {
   15662             :         { "__ndr_pack__", (PyCFunction)py_PlaintextSecret_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   15663             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_PlaintextSecret_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   15664             :         { "__ndr_print__", (PyCFunction)py_PlaintextSecret_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   15665             :         { NULL, NULL, 0, NULL }
   15666             : };
   15667             : 
   15668             : 
   15669             : static PyTypeObject PlaintextSecret_Type = {
   15670             :         PyVarObject_HEAD_INIT(NULL, 0)
   15671             :         .tp_name = "drsblobs.PlaintextSecret",
   15672             :         .tp_getset = py_PlaintextSecret_getsetters,
   15673             :         .tp_methods = py_PlaintextSecret_methods,
   15674             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15675             :         .tp_new = py_PlaintextSecret_new,
   15676             : };
   15677             : 
   15678             : 
   15679           3 : static PyObject *py_EncryptedSecretHeader_get_magic(PyObject *obj, void *closure)
   15680             : {
   15681           3 :         struct EncryptedSecretHeader *object = pytalloc_get_ptr(obj);
   15682           0 :         PyObject *py_magic;
   15683           3 :         py_magic = PyLong_FromUnsignedLongLong((uint32_t)(object->magic));
   15684           3 :         return py_magic;
   15685             : }
   15686             : 
   15687           0 : static int py_EncryptedSecretHeader_set_magic(PyObject *py_obj, PyObject *value, void *closure)
   15688             : {
   15689           0 :         struct EncryptedSecretHeader *object = pytalloc_get_ptr(py_obj);
   15690           0 :         if (value == NULL) {
   15691           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->magic");
   15692           0 :                 return -1;
   15693             :         }
   15694             :         {
   15695           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->magic));
   15696           0 :                 if (PyLong_Check(value)) {
   15697           0 :                         unsigned long long test_var;
   15698           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15699           0 :                         if (PyErr_Occurred() != NULL) {
   15700           0 :                                 return -1;
   15701             :                         }
   15702           0 :                         if (test_var > uint_max) {
   15703           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15704             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15705           0 :                                 return -1;
   15706             :                         }
   15707           0 :                         object->magic = test_var;
   15708             :                 } else {
   15709           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15710             :                           PyLong_Type.tp_name);
   15711           0 :                         return -1;
   15712             :                 }
   15713             :         }
   15714           0 :         return 0;
   15715             : }
   15716             : 
   15717           0 : static PyObject *py_EncryptedSecretHeader_get_version(PyObject *obj, void *closure)
   15718             : {
   15719           0 :         struct EncryptedSecretHeader *object = pytalloc_get_ptr(obj);
   15720           0 :         PyObject *py_version;
   15721           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
   15722           0 :         return py_version;
   15723             : }
   15724             : 
   15725           0 : static int py_EncryptedSecretHeader_set_version(PyObject *py_obj, PyObject *value, void *closure)
   15726             : {
   15727           0 :         struct EncryptedSecretHeader *object = pytalloc_get_ptr(py_obj);
   15728           0 :         if (value == NULL) {
   15729           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
   15730           0 :                 return -1;
   15731             :         }
   15732             :         {
   15733           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
   15734           0 :                 if (PyLong_Check(value)) {
   15735           0 :                         unsigned long long test_var;
   15736           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15737           0 :                         if (PyErr_Occurred() != NULL) {
   15738           0 :                                 return -1;
   15739             :                         }
   15740           0 :                         if (test_var > uint_max) {
   15741           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15742             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15743           0 :                                 return -1;
   15744             :                         }
   15745           0 :                         object->version = test_var;
   15746             :                 } else {
   15747           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15748             :                           PyLong_Type.tp_name);
   15749           0 :                         return -1;
   15750             :                 }
   15751             :         }
   15752           0 :         return 0;
   15753             : }
   15754             : 
   15755           0 : static PyObject *py_EncryptedSecretHeader_get_algorithm(PyObject *obj, void *closure)
   15756             : {
   15757           0 :         struct EncryptedSecretHeader *object = pytalloc_get_ptr(obj);
   15758           0 :         PyObject *py_algorithm;
   15759           0 :         py_algorithm = PyLong_FromUnsignedLongLong((uint32_t)(object->algorithm));
   15760           0 :         return py_algorithm;
   15761             : }
   15762             : 
   15763           0 : static int py_EncryptedSecretHeader_set_algorithm(PyObject *py_obj, PyObject *value, void *closure)
   15764             : {
   15765           0 :         struct EncryptedSecretHeader *object = pytalloc_get_ptr(py_obj);
   15766           0 :         if (value == NULL) {
   15767           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->algorithm");
   15768           0 :                 return -1;
   15769             :         }
   15770             :         {
   15771           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->algorithm));
   15772           0 :                 if (PyLong_Check(value)) {
   15773           0 :                         unsigned long long test_var;
   15774           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15775           0 :                         if (PyErr_Occurred() != NULL) {
   15776           0 :                                 return -1;
   15777             :                         }
   15778           0 :                         if (test_var > uint_max) {
   15779           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15780             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15781           0 :                                 return -1;
   15782             :                         }
   15783           0 :                         object->algorithm = test_var;
   15784             :                 } else {
   15785           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15786             :                           PyLong_Type.tp_name);
   15787           0 :                         return -1;
   15788             :                 }
   15789             :         }
   15790           0 :         return 0;
   15791             : }
   15792             : 
   15793           0 : static PyObject *py_EncryptedSecretHeader_get_flags(PyObject *obj, void *closure)
   15794             : {
   15795           0 :         struct EncryptedSecretHeader *object = pytalloc_get_ptr(obj);
   15796           0 :         PyObject *py_flags;
   15797           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
   15798           0 :         return py_flags;
   15799             : }
   15800             : 
   15801           0 : static int py_EncryptedSecretHeader_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   15802             : {
   15803           0 :         struct EncryptedSecretHeader *object = pytalloc_get_ptr(py_obj);
   15804           0 :         if (value == NULL) {
   15805           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   15806           0 :                 return -1;
   15807             :         }
   15808             :         {
   15809           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   15810           0 :                 if (PyLong_Check(value)) {
   15811           0 :                         unsigned long long test_var;
   15812           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15813           0 :                         if (PyErr_Occurred() != NULL) {
   15814           0 :                                 return -1;
   15815             :                         }
   15816           0 :                         if (test_var > uint_max) {
   15817           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15818             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15819           0 :                                 return -1;
   15820             :                         }
   15821           0 :                         object->flags = test_var;
   15822             :                 } else {
   15823           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15824             :                           PyLong_Type.tp_name);
   15825           0 :                         return -1;
   15826             :                 }
   15827             :         }
   15828           0 :         return 0;
   15829             : }
   15830             : 
   15831             : static PyGetSetDef py_EncryptedSecretHeader_getsetters[] = {
   15832             :         {
   15833             :                 .name = discard_const_p(char, "magic"),
   15834             :                 .get = py_EncryptedSecretHeader_get_magic,
   15835             :                 .set = py_EncryptedSecretHeader_set_magic,
   15836             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15837             :         },
   15838             :         {
   15839             :                 .name = discard_const_p(char, "version"),
   15840             :                 .get = py_EncryptedSecretHeader_get_version,
   15841             :                 .set = py_EncryptedSecretHeader_set_version,
   15842             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15843             :         },
   15844             :         {
   15845             :                 .name = discard_const_p(char, "algorithm"),
   15846             :                 .get = py_EncryptedSecretHeader_get_algorithm,
   15847             :                 .set = py_EncryptedSecretHeader_set_algorithm,
   15848             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15849             :         },
   15850             :         {
   15851             :                 .name = discard_const_p(char, "flags"),
   15852             :                 .get = py_EncryptedSecretHeader_get_flags,
   15853             :                 .set = py_EncryptedSecretHeader_set_flags,
   15854             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15855             :         },
   15856             :         { .name = NULL }
   15857             : };
   15858             : 
   15859           0 : static PyObject *py_EncryptedSecretHeader_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15860             : {
   15861           0 :         return pytalloc_new(struct EncryptedSecretHeader, type);
   15862             : }
   15863             : 
   15864           0 : static PyObject *py_EncryptedSecretHeader_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   15865             : {
   15866           0 :         struct EncryptedSecretHeader *object = pytalloc_get_ptr(py_obj);
   15867           0 :         PyObject *ret = NULL;
   15868           0 :         DATA_BLOB blob;
   15869           0 :         enum ndr_err_code err;
   15870           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   15871           0 :         if (tmp_ctx == NULL) {
   15872           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   15873           0 :                 return NULL;
   15874             :         }
   15875           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_EncryptedSecretHeader);
   15876           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15877           0 :                 TALLOC_FREE(tmp_ctx);
   15878           0 :                 PyErr_SetNdrError(err);
   15879           0 :                 return NULL;
   15880             :         }
   15881             : 
   15882           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   15883           0 :         TALLOC_FREE(tmp_ctx);
   15884           0 :         return ret;
   15885             : }
   15886             : 
   15887           0 : static PyObject *py_EncryptedSecretHeader_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   15888             : {
   15889           0 :         struct EncryptedSecretHeader *object = pytalloc_get_ptr(py_obj);
   15890           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   15891           0 :         Py_ssize_t blob_length = 0;
   15892           0 :         enum ndr_err_code err;
   15893           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   15894           0 :         PyObject *allow_remaining_obj = NULL;
   15895           0 :         bool allow_remaining = false;
   15896             : 
   15897           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   15898             :                 discard_const_p(char *, kwnames),
   15899             :                 &blob.data, &blob_length,
   15900             :                 &allow_remaining_obj)) {
   15901           0 :                 return NULL;
   15902             :         }
   15903           0 :         blob.length = blob_length;
   15904             : 
   15905           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   15906           0 :                 allow_remaining = true;
   15907             :         }
   15908             : 
   15909           0 :         if (allow_remaining) {
   15910           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_EncryptedSecretHeader);
   15911             :         } else {
   15912           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_EncryptedSecretHeader);
   15913             :         }
   15914           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   15915           0 :                 PyErr_SetNdrError(err);
   15916           0 :                 return NULL;
   15917             :         }
   15918             : 
   15919           0 :         Py_RETURN_NONE;
   15920             : }
   15921             : 
   15922           0 : static PyObject *py_EncryptedSecretHeader_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   15923             : {
   15924           0 :         struct EncryptedSecretHeader *object = pytalloc_get_ptr(py_obj);
   15925           0 :         PyObject *ret;
   15926           0 :         char *retstr;
   15927             : 
   15928           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_EncryptedSecretHeader, "EncryptedSecretHeader", object);
   15929           0 :         ret = PyUnicode_FromString(retstr);
   15930           0 :         talloc_free(retstr);
   15931             : 
   15932           0 :         return ret;
   15933             : }
   15934             : 
   15935             : static PyMethodDef py_EncryptedSecretHeader_methods[] = {
   15936             :         { "__ndr_pack__", (PyCFunction)py_EncryptedSecretHeader_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   15937             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_EncryptedSecretHeader_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   15938             :         { "__ndr_print__", (PyCFunction)py_EncryptedSecretHeader_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   15939             :         { NULL, NULL, 0, NULL }
   15940             : };
   15941             : 
   15942             : 
   15943             : static PyTypeObject EncryptedSecretHeader_Type = {
   15944             :         PyVarObject_HEAD_INIT(NULL, 0)
   15945             :         .tp_name = "drsblobs.EncryptedSecretHeader",
   15946             :         .tp_getset = py_EncryptedSecretHeader_getsetters,
   15947             :         .tp_methods = py_EncryptedSecretHeader_methods,
   15948             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15949             :         .tp_new = py_EncryptedSecretHeader_new,
   15950             : };
   15951             : 
   15952             : 
   15953           0 : static PyObject *py_EncryptedSecret_get_iv(PyObject *obj, void *closure)
   15954             : {
   15955           0 :         struct EncryptedSecret *object = pytalloc_get_ptr(obj);
   15956           0 :         PyObject *py_iv;
   15957           0 :         py_iv = PyBytes_FromStringAndSize((char *)(object->iv).data, (object->iv).length);
   15958           0 :         return py_iv;
   15959             : }
   15960             : 
   15961           0 : static int py_EncryptedSecret_set_iv(PyObject *py_obj, PyObject *value, void *closure)
   15962             : {
   15963           0 :         struct EncryptedSecret *object = pytalloc_get_ptr(py_obj);
   15964           0 :         if (value == NULL) {
   15965           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->iv");
   15966           0 :                 return -1;
   15967             :         }
   15968           0 :         object->iv = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   15969           0 :         return 0;
   15970             : }
   15971             : 
   15972           3 : static PyObject *py_EncryptedSecret_get_header(PyObject *obj, void *closure)
   15973             : {
   15974           3 :         struct EncryptedSecret *object = pytalloc_get_ptr(obj);
   15975           0 :         PyObject *py_header;
   15976           3 :         py_header = pytalloc_reference_ex(&EncryptedSecretHeader_Type, pytalloc_get_mem_ctx(obj), &object->header);
   15977           3 :         return py_header;
   15978             : }
   15979             : 
   15980           0 : static int py_EncryptedSecret_set_header(PyObject *py_obj, PyObject *value, void *closure)
   15981             : {
   15982           0 :         struct EncryptedSecret *object = pytalloc_get_ptr(py_obj);
   15983           0 :         if (value == NULL) {
   15984           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->header");
   15985           0 :                 return -1;
   15986             :         }
   15987           0 :         PY_CHECK_TYPE(&EncryptedSecretHeader_Type, value, return -1;);
   15988           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   15989           0 :                 PyErr_NoMemory();
   15990           0 :                 return -1;
   15991             :         }
   15992           0 :         object->header = *(struct EncryptedSecretHeader *)pytalloc_get_ptr(value);
   15993           0 :         return 0;
   15994             : }
   15995             : 
   15996           0 : static PyObject *py_EncryptedSecret_get_encrypted(PyObject *obj, void *closure)
   15997             : {
   15998           0 :         struct EncryptedSecret *object = pytalloc_get_ptr(obj);
   15999           0 :         PyObject *py_encrypted;
   16000           0 :         py_encrypted = PyBytes_FromStringAndSize((char *)(object->encrypted).data, (object->encrypted).length);
   16001           0 :         return py_encrypted;
   16002             : }
   16003             : 
   16004           0 : static int py_EncryptedSecret_set_encrypted(PyObject *py_obj, PyObject *value, void *closure)
   16005             : {
   16006           0 :         struct EncryptedSecret *object = pytalloc_get_ptr(py_obj);
   16007           0 :         if (value == NULL) {
   16008           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->encrypted");
   16009           0 :                 return -1;
   16010             :         }
   16011           0 :         object->encrypted = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   16012           0 :         return 0;
   16013             : }
   16014             : 
   16015             : static PyGetSetDef py_EncryptedSecret_getsetters[] = {
   16016             :         {
   16017             :                 .name = discard_const_p(char, "iv"),
   16018             :                 .get = py_EncryptedSecret_get_iv,
   16019             :                 .set = py_EncryptedSecret_set_iv,
   16020             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16021             :         },
   16022             :         {
   16023             :                 .name = discard_const_p(char, "header"),
   16024             :                 .get = py_EncryptedSecret_get_header,
   16025             :                 .set = py_EncryptedSecret_set_header,
   16026             :                 .doc = discard_const_p(char, "PIDL-generated element of base type EncryptedSecretHeader")
   16027             :         },
   16028             :         {
   16029             :                 .name = discard_const_p(char, "encrypted"),
   16030             :                 .get = py_EncryptedSecret_get_encrypted,
   16031             :                 .set = py_EncryptedSecret_set_encrypted,
   16032             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16033             :         },
   16034             :         { .name = NULL }
   16035             : };
   16036             : 
   16037           3 : static PyObject *py_EncryptedSecret_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16038             : {
   16039           3 :         return pytalloc_new(struct EncryptedSecret, type);
   16040             : }
   16041             : 
   16042           0 : static PyObject *py_EncryptedSecret_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   16043             : {
   16044           0 :         struct EncryptedSecret *object = pytalloc_get_ptr(py_obj);
   16045           0 :         PyObject *ret = NULL;
   16046           0 :         DATA_BLOB blob;
   16047           0 :         enum ndr_err_code err;
   16048           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   16049           0 :         if (tmp_ctx == NULL) {
   16050           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   16051           0 :                 return NULL;
   16052             :         }
   16053           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_EncryptedSecret);
   16054           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   16055           0 :                 TALLOC_FREE(tmp_ctx);
   16056           0 :                 PyErr_SetNdrError(err);
   16057           0 :                 return NULL;
   16058             :         }
   16059             : 
   16060           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   16061           0 :         TALLOC_FREE(tmp_ctx);
   16062           0 :         return ret;
   16063             : }
   16064             : 
   16065           3 : static PyObject *py_EncryptedSecret_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   16066             : {
   16067           3 :         struct EncryptedSecret *object = pytalloc_get_ptr(py_obj);
   16068           3 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   16069           3 :         Py_ssize_t blob_length = 0;
   16070           0 :         enum ndr_err_code err;
   16071           3 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   16072           3 :         PyObject *allow_remaining_obj = NULL;
   16073           3 :         bool allow_remaining = false;
   16074             : 
   16075           3 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   16076             :                 discard_const_p(char *, kwnames),
   16077             :                 &blob.data, &blob_length,
   16078             :                 &allow_remaining_obj)) {
   16079           0 :                 return NULL;
   16080             :         }
   16081           3 :         blob.length = blob_length;
   16082             : 
   16083           3 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   16084           0 :                 allow_remaining = true;
   16085             :         }
   16086             : 
   16087           3 :         if (allow_remaining) {
   16088           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_EncryptedSecret);
   16089             :         } else {
   16090           3 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_EncryptedSecret);
   16091             :         }
   16092           3 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   16093           0 :                 PyErr_SetNdrError(err);
   16094           0 :                 return NULL;
   16095             :         }
   16096             : 
   16097           3 :         Py_RETURN_NONE;
   16098             : }
   16099             : 
   16100           0 : static PyObject *py_EncryptedSecret_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   16101             : {
   16102           0 :         struct EncryptedSecret *object = pytalloc_get_ptr(py_obj);
   16103           0 :         PyObject *ret;
   16104           0 :         char *retstr;
   16105             : 
   16106           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_EncryptedSecret, "EncryptedSecret", object);
   16107           0 :         ret = PyUnicode_FromString(retstr);
   16108           0 :         talloc_free(retstr);
   16109             : 
   16110           0 :         return ret;
   16111             : }
   16112             : 
   16113             : static PyMethodDef py_EncryptedSecret_methods[] = {
   16114             :         { "__ndr_pack__", (PyCFunction)py_EncryptedSecret_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   16115             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_EncryptedSecret_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   16116             :         { "__ndr_print__", (PyCFunction)py_EncryptedSecret_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   16117             :         { NULL, NULL, 0, NULL }
   16118             : };
   16119             : 
   16120             : 
   16121             : static PyTypeObject EncryptedSecret_Type = {
   16122             :         PyVarObject_HEAD_INIT(NULL, 0)
   16123             :         .tp_name = "drsblobs.EncryptedSecret",
   16124             :         .tp_getset = py_EncryptedSecret_getsetters,
   16125             :         .tp_methods = py_EncryptedSecret_methods,
   16126             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16127             :         .tp_new = py_EncryptedSecret_new,
   16128             : };
   16129             : 
   16130             : 
   16131             : const struct PyNdrRpcMethodDef py_ndr_drsblobs_methods[] = {
   16132             :         {0}
   16133             : };
   16134             : 
   16135           0 : static PyObject *interface_drsblobs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16136             : {
   16137           0 :         return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_drsblobs);
   16138             : }
   16139             : 
   16140             : #define PY_DOC_DRSBLOBS "Active Directory Replication LDAP Blobs"
   16141             : static PyTypeObject drsblobs_InterfaceType = {
   16142             :         PyVarObject_HEAD_INIT(NULL, 0)
   16143             :         .tp_name = "drsblobs.drsblobs",
   16144             :         .tp_basicsize = sizeof(dcerpc_InterfaceObject),
   16145             :         .tp_doc = "drsblobs(binding, lp_ctx=None, credentials=None) -> connection\n"
   16146             : "\n"
   16147             : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
   16148             : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
   16149             : "credentials should be a credentials.Credentials object.\n\n"PY_DOC_DRSBLOBS,
   16150             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16151             :         .tp_new = interface_drsblobs_new,
   16152             : };
   16153             : 
   16154           0 : static PyObject *syntax_drsblobs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16155             : {
   16156           0 :         return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_drsblobs.syntax_id);
   16157             : }
   16158             : 
   16159             : #define PY_DOC_DRSBLOBS_SYNTAX "Active Directory Replication LDAP Blobs"
   16160             : static PyTypeObject drsblobs_SyntaxType = {
   16161             :         PyVarObject_HEAD_INIT(NULL, 0)
   16162             :         .tp_name = "drsblobs.drsblobs_abstract_syntax",
   16163             :         .tp_doc = "drsblobs_abstract_syntax()\n"PY_DOC_DRSBLOBS_SYNTAX,
   16164             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16165             :         .tp_new = syntax_drsblobs_new,
   16166             : };
   16167             : 
   16168             : static PyMethodDef drsblobs_methods[] = {
   16169             :         { NULL, NULL, 0, NULL }
   16170             : };
   16171             : 
   16172             : static struct PyModuleDef moduledef = {
   16173             :         PyModuleDef_HEAD_INIT,
   16174             :         .m_name = "drsblobs",
   16175             :         .m_doc = "drsblobs DCE/RPC",
   16176             :         .m_size = -1,
   16177             :         .m_methods = drsblobs_methods,
   16178             : };
   16179        7481 : MODULE_INIT_FUNC(drsblobs)
   16180             : {
   16181        7481 :         PyObject *m = NULL;
   16182        7481 :         PyObject *dep_samba_dcerpc_drsuapi = NULL;
   16183        7481 :         PyObject *dep_samba_dcerpc_misc = NULL;
   16184        7481 :         PyObject *dep_samba_dcerpc_samr = NULL;
   16185        7481 :         PyObject *dep_samba_dcerpc_lsa = NULL;
   16186        7481 :         PyObject *dep_samba_dcerpc_security = NULL;
   16187        7481 :         PyObject *dep_talloc = NULL;
   16188        7481 :         PyObject *dep_samba_dcerpc_base = NULL;
   16189             : 
   16190        7481 :         dep_samba_dcerpc_drsuapi = PyImport_ImportModule("samba.dcerpc.drsuapi");
   16191        7481 :         if (dep_samba_dcerpc_drsuapi == NULL)
   16192           0 :                 goto out;
   16193             : 
   16194        7481 :         dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
   16195        7481 :         if (dep_samba_dcerpc_misc == NULL)
   16196           0 :                 goto out;
   16197             : 
   16198        7481 :         dep_samba_dcerpc_samr = PyImport_ImportModule("samba.dcerpc.samr");
   16199        7481 :         if (dep_samba_dcerpc_samr == NULL)
   16200           0 :                 goto out;
   16201             : 
   16202        7481 :         dep_samba_dcerpc_lsa = PyImport_ImportModule("samba.dcerpc.lsa");
   16203        7481 :         if (dep_samba_dcerpc_lsa == NULL)
   16204           0 :                 goto out;
   16205             : 
   16206        7481 :         dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
   16207        7481 :         if (dep_samba_dcerpc_security == NULL)
   16208           0 :                 goto out;
   16209             : 
   16210        7481 :         dep_talloc = PyImport_ImportModule("talloc");
   16211        7481 :         if (dep_talloc == NULL)
   16212           0 :                 goto out;
   16213             : 
   16214        7481 :         dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
   16215        7481 :         if (dep_samba_dcerpc_base == NULL)
   16216           0 :                 goto out;
   16217             : 
   16218        7481 :         GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
   16219        7481 :         if (GUID_Type == NULL)
   16220           0 :                 goto out;
   16221             : 
   16222        7481 :         BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
   16223        7481 :         if (BaseObject_Type == NULL)
   16224           0 :                 goto out;
   16225             : 
   16226        7481 :         drsuapi_DsReplicaCursor_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_drsuapi, "DsReplicaCursor");
   16227        7481 :         if (drsuapi_DsReplicaCursor_Type == NULL)
   16228           0 :                 goto out;
   16229             : 
   16230        7481 :         drsuapi_DsReplicaCursor2_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_drsuapi, "DsReplicaCursor2");
   16231        7481 :         if (drsuapi_DsReplicaCursor2_Type == NULL)
   16232           0 :                 goto out;
   16233             : 
   16234        7481 :         drsuapi_DsReplicaHighWaterMark_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_drsuapi, "DsReplicaHighWaterMark");
   16235        7481 :         if (drsuapi_DsReplicaHighWaterMark_Type == NULL)
   16236           0 :                 goto out;
   16237             : 
   16238        7481 :         drsuapi_DsReplicaOIDMapping_Ctr_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_drsuapi, "DsReplicaOIDMapping_Ctr");
   16239        7481 :         if (drsuapi_DsReplicaOIDMapping_Ctr_Type == NULL)
   16240           0 :                 goto out;
   16241             : 
   16242        7481 :         samr_Password_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "Password");
   16243        7481 :         if (samr_Password_Type == NULL)
   16244           0 :                 goto out;
   16245             : 
   16246        7481 :         dom_sid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "dom_sid");
   16247        7481 :         if (dom_sid_Type == NULL)
   16248           0 :                 goto out;
   16249             : 
   16250        7481 :         ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
   16251        7481 :         if (ClientConnection_Type == NULL)
   16252           0 :                 goto out;
   16253             : 
   16254        7481 :         ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
   16255        7481 :         if (ndr_syntax_id_Type == NULL)
   16256           0 :                 goto out;
   16257             : 
   16258        7481 :         replPropertyMetaData1_Type.tp_base = BaseObject_Type;
   16259        7481 :         replPropertyMetaData1_Type.tp_basicsize = pytalloc_BaseObject_size();
   16260             : 
   16261        7481 :         replPropertyMetaDataCtr1_Type.tp_base = BaseObject_Type;
   16262        7481 :         replPropertyMetaDataCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   16263             : 
   16264        7481 :         replPropertyMetaDataCtr_Type.tp_base = BaseObject_Type;
   16265        7481 :         replPropertyMetaDataCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   16266             : 
   16267        7481 :         replPropertyMetaDataBlob_Type.tp_base = BaseObject_Type;
   16268        7481 :         replPropertyMetaDataBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16269             : 
   16270        7481 :         replUpToDateVectorCtr1_Type.tp_base = BaseObject_Type;
   16271        7481 :         replUpToDateVectorCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   16272             : 
   16273        7481 :         replUpToDateVectorCtr2_Type.tp_base = BaseObject_Type;
   16274        7481 :         replUpToDateVectorCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
   16275             : 
   16276        7481 :         replUpToDateVectorCtr_Type.tp_base = BaseObject_Type;
   16277        7481 :         replUpToDateVectorCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   16278             : 
   16279        7481 :         replUpToDateVectorBlob_Type.tp_base = BaseObject_Type;
   16280        7481 :         replUpToDateVectorBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16281             : 
   16282        7481 :         repsFromTo1OtherInfo_Type.tp_base = BaseObject_Type;
   16283        7481 :         repsFromTo1OtherInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   16284             : 
   16285        7481 :         repsFromTo1_Type.tp_base = BaseObject_Type;
   16286        7481 :         repsFromTo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   16287             : 
   16288        7481 :         repsFromTo2OtherInfo_Type.tp_base = BaseObject_Type;
   16289        7481 :         repsFromTo2OtherInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   16290             : 
   16291        7481 :         repsFromTo2_Type.tp_base = BaseObject_Type;
   16292        7481 :         repsFromTo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   16293             : 
   16294        7481 :         repsFromTo_Type.tp_base = BaseObject_Type;
   16295        7481 :         repsFromTo_Type.tp_basicsize = pytalloc_BaseObject_size();
   16296             : 
   16297        7481 :         repsFromToBlob_Type.tp_base = BaseObject_Type;
   16298        7481 :         repsFromToBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16299             : 
   16300        7481 :         scheduleHeader_Type.tp_base = BaseObject_Type;
   16301        7481 :         scheduleHeader_Type.tp_basicsize = pytalloc_BaseObject_size();
   16302             : 
   16303        7481 :         scheduleSlots_Type.tp_base = BaseObject_Type;
   16304        7481 :         scheduleSlots_Type.tp_basicsize = pytalloc_BaseObject_size();
   16305             : 
   16306        7481 :         schedule_Type.tp_base = BaseObject_Type;
   16307        7481 :         schedule_Type.tp_basicsize = pytalloc_BaseObject_size();
   16308             : 
   16309        7481 :         partialAttributeSetCtr1_Type.tp_base = BaseObject_Type;
   16310        7481 :         partialAttributeSetCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   16311             : 
   16312        7481 :         partialAttributeSetCtr_Type.tp_base = BaseObject_Type;
   16313        7481 :         partialAttributeSetCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   16314             : 
   16315        7481 :         partialAttributeSetBlob_Type.tp_base = BaseObject_Type;
   16316        7481 :         partialAttributeSetBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16317             : 
   16318        7481 :         schemaInfoBlob_Type.tp_base = BaseObject_Type;
   16319        7481 :         schemaInfoBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16320             : 
   16321        7481 :         drsuapi_MSPrefixMap_Entry_Type.tp_base = BaseObject_Type;
   16322        7481 :         drsuapi_MSPrefixMap_Entry_Type.tp_basicsize = pytalloc_BaseObject_size();
   16323             : 
   16324        7481 :         drsuapi_MSPrefixMap_Ctr_Type.tp_base = BaseObject_Type;
   16325        7481 :         drsuapi_MSPrefixMap_Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
   16326             : 
   16327        7481 :         prefixMapCtr_Type.tp_base = BaseObject_Type;
   16328        7481 :         prefixMapCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   16329             : 
   16330        7481 :         prefixMapBlob_Type.tp_base = BaseObject_Type;
   16331        7481 :         prefixMapBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16332             : 
   16333        7481 :         ldapControlDirSyncExtra_Type.tp_base = BaseObject_Type;
   16334        7481 :         ldapControlDirSyncExtra_Type.tp_basicsize = pytalloc_BaseObject_size();
   16335             : 
   16336        7481 :         ldapControlDirSyncBlob_Type.tp_base = BaseObject_Type;
   16337        7481 :         ldapControlDirSyncBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16338             : 
   16339        7481 :         ldapControlDirSyncCookie_Type.tp_base = BaseObject_Type;
   16340        7481 :         ldapControlDirSyncCookie_Type.tp_basicsize = pytalloc_BaseObject_size();
   16341             : 
   16342        7481 :         supplementalCredentialsPackage_Type.tp_base = BaseObject_Type;
   16343        7481 :         supplementalCredentialsPackage_Type.tp_basicsize = pytalloc_BaseObject_size();
   16344             : 
   16345        7481 :         supplementalCredentialsSubBlob_Type.tp_base = BaseObject_Type;
   16346        7481 :         supplementalCredentialsSubBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16347             : 
   16348        7481 :         supplementalCredentialsBlob_Type.tp_base = BaseObject_Type;
   16349        7481 :         supplementalCredentialsBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16350             : 
   16351        7481 :         package_PackagesBlob_Type.tp_base = BaseObject_Type;
   16352        7481 :         package_PackagesBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16353             : 
   16354        7481 :         package_PrimaryKerberosString_Type.tp_base = BaseObject_Type;
   16355        7481 :         package_PrimaryKerberosString_Type.tp_basicsize = pytalloc_BaseObject_size();
   16356             : 
   16357        7481 :         package_PrimaryKerberosKey3_Type.tp_base = BaseObject_Type;
   16358        7481 :         package_PrimaryKerberosKey3_Type.tp_basicsize = pytalloc_BaseObject_size();
   16359             : 
   16360        7481 :         package_PrimaryKerberosCtr3_Type.tp_base = BaseObject_Type;
   16361        7481 :         package_PrimaryKerberosCtr3_Type.tp_basicsize = pytalloc_BaseObject_size();
   16362             : 
   16363        7481 :         package_PrimaryKerberosKey4_Type.tp_base = BaseObject_Type;
   16364        7481 :         package_PrimaryKerberosKey4_Type.tp_basicsize = pytalloc_BaseObject_size();
   16365             : 
   16366        7481 :         package_PrimaryKerberosCtr4_Type.tp_base = BaseObject_Type;
   16367        7481 :         package_PrimaryKerberosCtr4_Type.tp_basicsize = pytalloc_BaseObject_size();
   16368             : 
   16369        7481 :         package_PrimaryKerberosCtr_Type.tp_base = BaseObject_Type;
   16370        7481 :         package_PrimaryKerberosCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   16371             : 
   16372        7481 :         package_PrimaryKerberosBlob_Type.tp_base = BaseObject_Type;
   16373        7481 :         package_PrimaryKerberosBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16374             : 
   16375        7481 :         package_PrimaryCLEARTEXTBlob_Type.tp_base = BaseObject_Type;
   16376        7481 :         package_PrimaryCLEARTEXTBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16377             : 
   16378        7481 :         package_PrimaryWDigestHash_Type.tp_base = BaseObject_Type;
   16379        7481 :         package_PrimaryWDigestHash_Type.tp_basicsize = pytalloc_BaseObject_size();
   16380             : 
   16381        7481 :         package_PrimaryWDigestBlob_Type.tp_base = BaseObject_Type;
   16382        7481 :         package_PrimaryWDigestBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16383             : 
   16384        7481 :         package_PrimarySambaGPGBlob_Type.tp_base = BaseObject_Type;
   16385        7481 :         package_PrimarySambaGPGBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16386             : 
   16387        7481 :         package_PrimaryUserPasswordValue_Type.tp_base = BaseObject_Type;
   16388        7481 :         package_PrimaryUserPasswordValue_Type.tp_basicsize = pytalloc_BaseObject_size();
   16389             : 
   16390        7481 :         package_PrimaryUserPasswordBlob_Type.tp_base = BaseObject_Type;
   16391        7481 :         package_PrimaryUserPasswordBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16392             : 
   16393        7481 :         AuthInfoNone_Type.tp_base = BaseObject_Type;
   16394        7481 :         AuthInfoNone_Type.tp_basicsize = pytalloc_BaseObject_size();
   16395             : 
   16396        7481 :         AuthInfoNT4Owf_Type.tp_base = BaseObject_Type;
   16397        7481 :         AuthInfoNT4Owf_Type.tp_basicsize = pytalloc_BaseObject_size();
   16398             : 
   16399        7481 :         AuthInfoClear_Type.tp_base = BaseObject_Type;
   16400        7481 :         AuthInfoClear_Type.tp_basicsize = pytalloc_BaseObject_size();
   16401             : 
   16402        7481 :         AuthInfoVersion_Type.tp_base = BaseObject_Type;
   16403        7481 :         AuthInfoVersion_Type.tp_basicsize = pytalloc_BaseObject_size();
   16404             : 
   16405        7481 :         AuthInfo_Type.tp_base = BaseObject_Type;
   16406        7481 :         AuthInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   16407             : 
   16408        7481 :         AuthenticationInformation_Type.tp_base = BaseObject_Type;
   16409        7481 :         AuthenticationInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   16410             : 
   16411        7481 :         AuthenticationInformationArray_Type.tp_base = BaseObject_Type;
   16412        7481 :         AuthenticationInformationArray_Type.tp_basicsize = pytalloc_BaseObject_size();
   16413             : 
   16414        7481 :         trustAuthInOutBlob_Type.tp_base = BaseObject_Type;
   16415        7481 :         trustAuthInOutBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16416             : 
   16417        7481 :         trustDomainPasswords_Type.tp_base = BaseObject_Type;
   16418        7481 :         trustDomainPasswords_Type.tp_basicsize = pytalloc_BaseObject_size();
   16419             : 
   16420        7481 :         DsCompressedChunk_Type.tp_base = BaseObject_Type;
   16421        7481 :         DsCompressedChunk_Type.tp_basicsize = pytalloc_BaseObject_size();
   16422             : 
   16423        7481 :         ExtendedErrorAString_Type.tp_base = BaseObject_Type;
   16424        7481 :         ExtendedErrorAString_Type.tp_basicsize = pytalloc_BaseObject_size();
   16425             : 
   16426        7481 :         ExtendedErrorUString_Type.tp_base = BaseObject_Type;
   16427        7481 :         ExtendedErrorUString_Type.tp_basicsize = pytalloc_BaseObject_size();
   16428             : 
   16429        7481 :         ExtendedErrorBlob_Type.tp_base = BaseObject_Type;
   16430        7481 :         ExtendedErrorBlob_Type.tp_basicsize = pytalloc_BaseObject_size();
   16431             : 
   16432        7481 :         ExtendedErrorComputerNameU_Type.tp_base = BaseObject_Type;
   16433        7481 :         ExtendedErrorComputerNameU_Type.tp_basicsize = pytalloc_BaseObject_size();
   16434             : 
   16435        7481 :         ExtendedErrorComputerName_Type.tp_base = BaseObject_Type;
   16436        7481 :         ExtendedErrorComputerName_Type.tp_basicsize = pytalloc_BaseObject_size();
   16437             : 
   16438        7481 :         ExtendedErrorParamU_Type.tp_base = BaseObject_Type;
   16439        7481 :         ExtendedErrorParamU_Type.tp_basicsize = pytalloc_BaseObject_size();
   16440             : 
   16441        7481 :         ExtendedErrorParam_Type.tp_base = BaseObject_Type;
   16442        7481 :         ExtendedErrorParam_Type.tp_basicsize = pytalloc_BaseObject_size();
   16443             : 
   16444        7481 :         ExtendedErrorInfo_Type.tp_base = BaseObject_Type;
   16445        7481 :         ExtendedErrorInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   16446             : 
   16447        7481 :         ExtendedErrorInfoPtr_Type.tp_base = BaseObject_Type;
   16448        7481 :         ExtendedErrorInfoPtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   16449             : 
   16450        7481 :         ForestTrustString_Type.tp_base = BaseObject_Type;
   16451        7481 :         ForestTrustString_Type.tp_basicsize = pytalloc_BaseObject_size();
   16452             : 
   16453        7481 :         ForestTrustDataDomainInfo_Type.tp_base = BaseObject_Type;
   16454        7481 :         ForestTrustDataDomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   16455             : 
   16456        7481 :         ForestTrustDataBinaryData_Type.tp_base = BaseObject_Type;
   16457        7481 :         ForestTrustDataBinaryData_Type.tp_basicsize = pytalloc_BaseObject_size();
   16458             : 
   16459        7481 :         ForestTrustData_Type.tp_base = BaseObject_Type;
   16460        7481 :         ForestTrustData_Type.tp_basicsize = pytalloc_BaseObject_size();
   16461             : 
   16462        7481 :         ForestTrustInfoRecord_Type.tp_base = BaseObject_Type;
   16463        7481 :         ForestTrustInfoRecord_Type.tp_basicsize = pytalloc_BaseObject_size();
   16464             : 
   16465        7481 :         ForestTrustInfoRecordArmor_Type.tp_base = BaseObject_Type;
   16466        7481 :         ForestTrustInfoRecordArmor_Type.tp_basicsize = pytalloc_BaseObject_size();
   16467             : 
   16468        7481 :         ForestTrustInfo_Type.tp_base = BaseObject_Type;
   16469        7481 :         ForestTrustInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   16470             : 
   16471        7481 :         PlaintextSecret_Type.tp_base = BaseObject_Type;
   16472        7481 :         PlaintextSecret_Type.tp_basicsize = pytalloc_BaseObject_size();
   16473             : 
   16474        7481 :         EncryptedSecretHeader_Type.tp_base = BaseObject_Type;
   16475        7481 :         EncryptedSecretHeader_Type.tp_basicsize = pytalloc_BaseObject_size();
   16476             : 
   16477        7481 :         EncryptedSecret_Type.tp_base = BaseObject_Type;
   16478        7481 :         EncryptedSecret_Type.tp_basicsize = pytalloc_BaseObject_size();
   16479             : 
   16480        7481 :         drsblobs_InterfaceType.tp_base = ClientConnection_Type;
   16481             : 
   16482        7481 :         drsblobs_SyntaxType.tp_base = ndr_syntax_id_Type;
   16483        7481 :         drsblobs_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
   16484             : 
   16485        7481 :         if (PyType_Ready(&replPropertyMetaData1_Type) < 0)
   16486           0 :                 goto out;
   16487        7481 :         if (PyType_Ready(&replPropertyMetaDataCtr1_Type) < 0)
   16488           0 :                 goto out;
   16489        7481 :         if (PyType_Ready(&replPropertyMetaDataCtr_Type) < 0)
   16490           0 :                 goto out;
   16491        7481 :         if (PyType_Ready(&replPropertyMetaDataBlob_Type) < 0)
   16492           0 :                 goto out;
   16493        7481 :         if (PyType_Ready(&replUpToDateVectorCtr1_Type) < 0)
   16494           0 :                 goto out;
   16495        7481 :         if (PyType_Ready(&replUpToDateVectorCtr2_Type) < 0)
   16496           0 :                 goto out;
   16497        7481 :         if (PyType_Ready(&replUpToDateVectorCtr_Type) < 0)
   16498           0 :                 goto out;
   16499        7481 :         if (PyType_Ready(&replUpToDateVectorBlob_Type) < 0)
   16500           0 :                 goto out;
   16501        7481 :         if (PyType_Ready(&repsFromTo1OtherInfo_Type) < 0)
   16502           0 :                 goto out;
   16503        7481 :         if (PyType_Ready(&repsFromTo1_Type) < 0)
   16504           0 :                 goto out;
   16505        7481 :         if (PyType_Ready(&repsFromTo2OtherInfo_Type) < 0)
   16506           0 :                 goto out;
   16507        7481 :         if (PyType_Ready(&repsFromTo2_Type) < 0)
   16508           0 :                 goto out;
   16509        7481 :         if (PyType_Ready(&repsFromTo_Type) < 0)
   16510           0 :                 goto out;
   16511        7481 :         if (PyType_Ready(&repsFromToBlob_Type) < 0)
   16512           0 :                 goto out;
   16513        7481 :         if (PyType_Ready(&scheduleHeader_Type) < 0)
   16514           0 :                 goto out;
   16515        7481 :         if (PyType_Ready(&scheduleSlots_Type) < 0)
   16516           0 :                 goto out;
   16517        7481 :         if (PyType_Ready(&schedule_Type) < 0)
   16518           0 :                 goto out;
   16519        7481 :         if (PyType_Ready(&partialAttributeSetCtr1_Type) < 0)
   16520           0 :                 goto out;
   16521        7481 :         if (PyType_Ready(&partialAttributeSetCtr_Type) < 0)
   16522           0 :                 goto out;
   16523        7481 :         if (PyType_Ready(&partialAttributeSetBlob_Type) < 0)
   16524           0 :                 goto out;
   16525        7481 :         if (PyType_Ready(&schemaInfoBlob_Type) < 0)
   16526           0 :                 goto out;
   16527        7481 :         if (PyType_Ready(&drsuapi_MSPrefixMap_Entry_Type) < 0)
   16528           0 :                 goto out;
   16529        7481 :         if (PyType_Ready(&drsuapi_MSPrefixMap_Ctr_Type) < 0)
   16530           0 :                 goto out;
   16531        7481 :         if (PyType_Ready(&prefixMapCtr_Type) < 0)
   16532           0 :                 goto out;
   16533        7481 :         if (PyType_Ready(&prefixMapBlob_Type) < 0)
   16534           0 :                 goto out;
   16535        7481 :         if (PyType_Ready(&ldapControlDirSyncExtra_Type) < 0)
   16536           0 :                 goto out;
   16537        7481 :         if (PyType_Ready(&ldapControlDirSyncBlob_Type) < 0)
   16538           0 :                 goto out;
   16539        7481 :         if (PyType_Ready(&ldapControlDirSyncCookie_Type) < 0)
   16540           0 :                 goto out;
   16541        7481 :         if (PyType_Ready(&supplementalCredentialsPackage_Type) < 0)
   16542           0 :                 goto out;
   16543        7481 :         if (PyType_Ready(&supplementalCredentialsSubBlob_Type) < 0)
   16544           0 :                 goto out;
   16545        7481 :         if (PyType_Ready(&supplementalCredentialsBlob_Type) < 0)
   16546           0 :                 goto out;
   16547        7481 :         if (PyType_Ready(&package_PackagesBlob_Type) < 0)
   16548           0 :                 goto out;
   16549        7481 :         if (PyType_Ready(&package_PrimaryKerberosString_Type) < 0)
   16550           0 :                 goto out;
   16551        7481 :         if (PyType_Ready(&package_PrimaryKerberosKey3_Type) < 0)
   16552           0 :                 goto out;
   16553        7481 :         if (PyType_Ready(&package_PrimaryKerberosCtr3_Type) < 0)
   16554           0 :                 goto out;
   16555        7481 :         if (PyType_Ready(&package_PrimaryKerberosKey4_Type) < 0)
   16556           0 :                 goto out;
   16557        7481 :         if (PyType_Ready(&package_PrimaryKerberosCtr4_Type) < 0)
   16558           0 :                 goto out;
   16559        7481 :         if (PyType_Ready(&package_PrimaryKerberosCtr_Type) < 0)
   16560           0 :                 goto out;
   16561        7481 :         if (PyType_Ready(&package_PrimaryKerberosBlob_Type) < 0)
   16562           0 :                 goto out;
   16563        7481 :         if (PyType_Ready(&package_PrimaryCLEARTEXTBlob_Type) < 0)
   16564           0 :                 goto out;
   16565        7481 :         if (PyType_Ready(&package_PrimaryWDigestHash_Type) < 0)
   16566           0 :                 goto out;
   16567        7481 :         if (PyType_Ready(&package_PrimaryWDigestBlob_Type) < 0)
   16568           0 :                 goto out;
   16569        7481 :         if (PyType_Ready(&package_PrimarySambaGPGBlob_Type) < 0)
   16570           0 :                 goto out;
   16571        7481 :         if (PyType_Ready(&package_PrimaryUserPasswordValue_Type) < 0)
   16572           0 :                 goto out;
   16573        7481 :         if (PyType_Ready(&package_PrimaryUserPasswordBlob_Type) < 0)
   16574           0 :                 goto out;
   16575        7481 :         if (PyType_Ready(&AuthInfoNone_Type) < 0)
   16576           0 :                 goto out;
   16577        7481 :         if (PyType_Ready(&AuthInfoNT4Owf_Type) < 0)
   16578           0 :                 goto out;
   16579        7481 :         if (PyType_Ready(&AuthInfoClear_Type) < 0)
   16580           0 :                 goto out;
   16581        7481 :         if (PyType_Ready(&AuthInfoVersion_Type) < 0)
   16582           0 :                 goto out;
   16583        7481 :         if (PyType_Ready(&AuthInfo_Type) < 0)
   16584           0 :                 goto out;
   16585        7481 :         if (PyType_Ready(&AuthenticationInformation_Type) < 0)
   16586           0 :                 goto out;
   16587        7481 :         if (PyType_Ready(&AuthenticationInformationArray_Type) < 0)
   16588           0 :                 goto out;
   16589        7481 :         if (PyType_Ready(&trustAuthInOutBlob_Type) < 0)
   16590           0 :                 goto out;
   16591        7481 :         if (PyType_Ready(&trustDomainPasswords_Type) < 0)
   16592           0 :                 goto out;
   16593        7481 :         if (PyType_Ready(&DsCompressedChunk_Type) < 0)
   16594           0 :                 goto out;
   16595        7481 :         if (PyType_Ready(&ExtendedErrorAString_Type) < 0)
   16596           0 :                 goto out;
   16597        7481 :         if (PyType_Ready(&ExtendedErrorUString_Type) < 0)
   16598           0 :                 goto out;
   16599        7481 :         if (PyType_Ready(&ExtendedErrorBlob_Type) < 0)
   16600           0 :                 goto out;
   16601        7481 :         if (PyType_Ready(&ExtendedErrorComputerNameU_Type) < 0)
   16602           0 :                 goto out;
   16603        7481 :         if (PyType_Ready(&ExtendedErrorComputerName_Type) < 0)
   16604           0 :                 goto out;
   16605        7481 :         if (PyType_Ready(&ExtendedErrorParamU_Type) < 0)
   16606           0 :                 goto out;
   16607        7481 :         if (PyType_Ready(&ExtendedErrorParam_Type) < 0)
   16608           0 :                 goto out;
   16609        7481 :         if (PyType_Ready(&ExtendedErrorInfo_Type) < 0)
   16610           0 :                 goto out;
   16611        7481 :         if (PyType_Ready(&ExtendedErrorInfoPtr_Type) < 0)
   16612           0 :                 goto out;
   16613        7481 :         if (PyType_Ready(&ForestTrustString_Type) < 0)
   16614           0 :                 goto out;
   16615        7481 :         if (PyType_Ready(&ForestTrustDataDomainInfo_Type) < 0)
   16616           0 :                 goto out;
   16617        7481 :         if (PyType_Ready(&ForestTrustDataBinaryData_Type) < 0)
   16618           0 :                 goto out;
   16619        7481 :         if (PyType_Ready(&ForestTrustData_Type) < 0)
   16620           0 :                 goto out;
   16621        7481 :         if (PyType_Ready(&ForestTrustInfoRecord_Type) < 0)
   16622           0 :                 goto out;
   16623        7481 :         if (PyType_Ready(&ForestTrustInfoRecordArmor_Type) < 0)
   16624           0 :                 goto out;
   16625        7481 :         if (PyType_Ready(&ForestTrustInfo_Type) < 0)
   16626           0 :                 goto out;
   16627        7481 :         if (PyType_Ready(&PlaintextSecret_Type) < 0)
   16628           0 :                 goto out;
   16629        7481 :         if (PyType_Ready(&EncryptedSecretHeader_Type) < 0)
   16630           0 :                 goto out;
   16631        7481 :         if (PyType_Ready(&EncryptedSecret_Type) < 0)
   16632           0 :                 goto out;
   16633        7481 :         if (PyType_Ready(&drsblobs_InterfaceType) < 0)
   16634           0 :                 goto out;
   16635        7481 :         if (PyType_Ready(&drsblobs_SyntaxType) < 0)
   16636           0 :                 goto out;
   16637        7481 :         if (!PyInterface_AddNdrRpcMethods(&drsblobs_InterfaceType, py_ndr_drsblobs_methods))
   16638           0 :                 return NULL;
   16639             : 
   16640             : #ifdef PY_REPLPROPERTYMETADATA1_PATCH
   16641             :         PY_REPLPROPERTYMETADATA1_PATCH(&replPropertyMetaData1_Type);
   16642             : #endif
   16643             : #ifdef PY_REPLPROPERTYMETADATACTR1_PATCH
   16644             :         PY_REPLPROPERTYMETADATACTR1_PATCH(&replPropertyMetaDataCtr1_Type);
   16645             : #endif
   16646             : #ifdef PY_REPLPROPERTYMETADATACTR_PATCH
   16647             :         PY_REPLPROPERTYMETADATACTR_PATCH(&replPropertyMetaDataCtr_Type);
   16648             : #endif
   16649             : #ifdef PY_REPLPROPERTYMETADATABLOB_PATCH
   16650             :         PY_REPLPROPERTYMETADATABLOB_PATCH(&replPropertyMetaDataBlob_Type);
   16651             : #endif
   16652             : #ifdef PY_REPLUPTODATEVECTORCTR1_PATCH
   16653             :         PY_REPLUPTODATEVECTORCTR1_PATCH(&replUpToDateVectorCtr1_Type);
   16654             : #endif
   16655             : #ifdef PY_REPLUPTODATEVECTORCTR2_PATCH
   16656             :         PY_REPLUPTODATEVECTORCTR2_PATCH(&replUpToDateVectorCtr2_Type);
   16657             : #endif
   16658             : #ifdef PY_REPLUPTODATEVECTORCTR_PATCH
   16659             :         PY_REPLUPTODATEVECTORCTR_PATCH(&replUpToDateVectorCtr_Type);
   16660             : #endif
   16661             : #ifdef PY_REPLUPTODATEVECTORBLOB_PATCH
   16662             :         PY_REPLUPTODATEVECTORBLOB_PATCH(&replUpToDateVectorBlob_Type);
   16663             : #endif
   16664             : #ifdef PY_REPSFROMTO1OTHERINFO_PATCH
   16665             :         PY_REPSFROMTO1OTHERINFO_PATCH(&repsFromTo1OtherInfo_Type);
   16666             : #endif
   16667             : #ifdef PY_REPSFROMTO1_PATCH
   16668             :         PY_REPSFROMTO1_PATCH(&repsFromTo1_Type);
   16669             : #endif
   16670             : #ifdef PY_REPSFROMTO2OTHERINFO_PATCH
   16671             :         PY_REPSFROMTO2OTHERINFO_PATCH(&repsFromTo2OtherInfo_Type);
   16672             : #endif
   16673             : #ifdef PY_REPSFROMTO2_PATCH
   16674             :         PY_REPSFROMTO2_PATCH(&repsFromTo2_Type);
   16675             : #endif
   16676             : #ifdef PY_REPSFROMTO_PATCH
   16677             :         PY_REPSFROMTO_PATCH(&repsFromTo_Type);
   16678             : #endif
   16679             : #ifdef PY_REPSFROMTOBLOB_PATCH
   16680             :         PY_REPSFROMTOBLOB_PATCH(&repsFromToBlob_Type);
   16681             : #endif
   16682             : #ifdef PY_SCHEDULEHEADER_PATCH
   16683             :         PY_SCHEDULEHEADER_PATCH(&scheduleHeader_Type);
   16684             : #endif
   16685             : #ifdef PY_SCHEDULESLOTS_PATCH
   16686             :         PY_SCHEDULESLOTS_PATCH(&scheduleSlots_Type);
   16687             : #endif
   16688             : #ifdef PY_SCHEDULE_PATCH
   16689             :         PY_SCHEDULE_PATCH(&schedule_Type);
   16690             : #endif
   16691             : #ifdef PY_PARTIALATTRIBUTESETCTR1_PATCH
   16692             :         PY_PARTIALATTRIBUTESETCTR1_PATCH(&partialAttributeSetCtr1_Type);
   16693             : #endif
   16694             : #ifdef PY_PARTIALATTRIBUTESETCTR_PATCH
   16695             :         PY_PARTIALATTRIBUTESETCTR_PATCH(&partialAttributeSetCtr_Type);
   16696             : #endif
   16697             : #ifdef PY_PARTIALATTRIBUTESETBLOB_PATCH
   16698             :         PY_PARTIALATTRIBUTESETBLOB_PATCH(&partialAttributeSetBlob_Type);
   16699             : #endif
   16700             : #ifdef PY_SCHEMAINFOBLOB_PATCH
   16701             :         PY_SCHEMAINFOBLOB_PATCH(&schemaInfoBlob_Type);
   16702             : #endif
   16703             : #ifdef PY_DRSUAPI_MSPREFIXMAP_ENTRY_PATCH
   16704             :         PY_DRSUAPI_MSPREFIXMAP_ENTRY_PATCH(&drsuapi_MSPrefixMap_Entry_Type);
   16705             : #endif
   16706             : #ifdef PY_DRSUAPI_MSPREFIXMAP_CTR_PATCH
   16707             :         PY_DRSUAPI_MSPREFIXMAP_CTR_PATCH(&drsuapi_MSPrefixMap_Ctr_Type);
   16708             : #endif
   16709             : #ifdef PY_PREFIXMAPCTR_PATCH
   16710             :         PY_PREFIXMAPCTR_PATCH(&prefixMapCtr_Type);
   16711             : #endif
   16712             : #ifdef PY_PREFIXMAPBLOB_PATCH
   16713             :         PY_PREFIXMAPBLOB_PATCH(&prefixMapBlob_Type);
   16714             : #endif
   16715             : #ifdef PY_LDAPCONTROLDIRSYNCEXTRA_PATCH
   16716             :         PY_LDAPCONTROLDIRSYNCEXTRA_PATCH(&ldapControlDirSyncExtra_Type);
   16717             : #endif
   16718             : #ifdef PY_LDAPCONTROLDIRSYNCBLOB_PATCH
   16719             :         PY_LDAPCONTROLDIRSYNCBLOB_PATCH(&ldapControlDirSyncBlob_Type);
   16720             : #endif
   16721             : #ifdef PY_LDAPCONTROLDIRSYNCCOOKIE_PATCH
   16722             :         PY_LDAPCONTROLDIRSYNCCOOKIE_PATCH(&ldapControlDirSyncCookie_Type);
   16723             : #endif
   16724             : #ifdef PY_SUPPLEMENTALCREDENTIALSPACKAGE_PATCH
   16725             :         PY_SUPPLEMENTALCREDENTIALSPACKAGE_PATCH(&supplementalCredentialsPackage_Type);
   16726             : #endif
   16727             : #ifdef PY_SUPPLEMENTALCREDENTIALSSUBBLOB_PATCH
   16728             :         PY_SUPPLEMENTALCREDENTIALSSUBBLOB_PATCH(&supplementalCredentialsSubBlob_Type);
   16729             : #endif
   16730             : #ifdef PY_SUPPLEMENTALCREDENTIALSBLOB_PATCH
   16731             :         PY_SUPPLEMENTALCREDENTIALSBLOB_PATCH(&supplementalCredentialsBlob_Type);
   16732             : #endif
   16733             : #ifdef PY_PACKAGE_PACKAGESBLOB_PATCH
   16734             :         PY_PACKAGE_PACKAGESBLOB_PATCH(&package_PackagesBlob_Type);
   16735             : #endif
   16736             : #ifdef PY_PACKAGE_PRIMARYKERBEROSSTRING_PATCH
   16737             :         PY_PACKAGE_PRIMARYKERBEROSSTRING_PATCH(&package_PrimaryKerberosString_Type);
   16738             : #endif
   16739             : #ifdef PY_PACKAGE_PRIMARYKERBEROSKEY3_PATCH
   16740             :         PY_PACKAGE_PRIMARYKERBEROSKEY3_PATCH(&package_PrimaryKerberosKey3_Type);
   16741             : #endif
   16742             : #ifdef PY_PACKAGE_PRIMARYKERBEROSCTR3_PATCH
   16743             :         PY_PACKAGE_PRIMARYKERBEROSCTR3_PATCH(&package_PrimaryKerberosCtr3_Type);
   16744             : #endif
   16745             : #ifdef PY_PACKAGE_PRIMARYKERBEROSKEY4_PATCH
   16746             :         PY_PACKAGE_PRIMARYKERBEROSKEY4_PATCH(&package_PrimaryKerberosKey4_Type);
   16747             : #endif
   16748             : #ifdef PY_PACKAGE_PRIMARYKERBEROSCTR4_PATCH
   16749             :         PY_PACKAGE_PRIMARYKERBEROSCTR4_PATCH(&package_PrimaryKerberosCtr4_Type);
   16750             : #endif
   16751             : #ifdef PY_PACKAGE_PRIMARYKERBEROSCTR_PATCH
   16752             :         PY_PACKAGE_PRIMARYKERBEROSCTR_PATCH(&package_PrimaryKerberosCtr_Type);
   16753             : #endif
   16754             : #ifdef PY_PACKAGE_PRIMARYKERBEROSBLOB_PATCH
   16755             :         PY_PACKAGE_PRIMARYKERBEROSBLOB_PATCH(&package_PrimaryKerberosBlob_Type);
   16756             : #endif
   16757             : #ifdef PY_PACKAGE_PRIMARYCLEARTEXTBLOB_PATCH
   16758             :         PY_PACKAGE_PRIMARYCLEARTEXTBLOB_PATCH(&package_PrimaryCLEARTEXTBlob_Type);
   16759             : #endif
   16760             : #ifdef PY_PACKAGE_PRIMARYWDIGESTHASH_PATCH
   16761             :         PY_PACKAGE_PRIMARYWDIGESTHASH_PATCH(&package_PrimaryWDigestHash_Type);
   16762             : #endif
   16763             : #ifdef PY_PACKAGE_PRIMARYWDIGESTBLOB_PATCH
   16764             :         PY_PACKAGE_PRIMARYWDIGESTBLOB_PATCH(&package_PrimaryWDigestBlob_Type);
   16765             : #endif
   16766             : #ifdef PY_PACKAGE_PRIMARYSAMBAGPGBLOB_PATCH
   16767             :         PY_PACKAGE_PRIMARYSAMBAGPGBLOB_PATCH(&package_PrimarySambaGPGBlob_Type);
   16768             : #endif
   16769             : #ifdef PY_PACKAGE_PRIMARYUSERPASSWORDVALUE_PATCH
   16770             :         PY_PACKAGE_PRIMARYUSERPASSWORDVALUE_PATCH(&package_PrimaryUserPasswordValue_Type);
   16771             : #endif
   16772             : #ifdef PY_PACKAGE_PRIMARYUSERPASSWORDBLOB_PATCH
   16773             :         PY_PACKAGE_PRIMARYUSERPASSWORDBLOB_PATCH(&package_PrimaryUserPasswordBlob_Type);
   16774             : #endif
   16775             : #ifdef PY_AUTHINFONONE_PATCH
   16776             :         PY_AUTHINFONONE_PATCH(&AuthInfoNone_Type);
   16777             : #endif
   16778             : #ifdef PY_AUTHINFONT4OWF_PATCH
   16779             :         PY_AUTHINFONT4OWF_PATCH(&AuthInfoNT4Owf_Type);
   16780             : #endif
   16781             : #ifdef PY_AUTHINFOCLEAR_PATCH
   16782             :         PY_AUTHINFOCLEAR_PATCH(&AuthInfoClear_Type);
   16783             : #endif
   16784             : #ifdef PY_AUTHINFOVERSION_PATCH
   16785             :         PY_AUTHINFOVERSION_PATCH(&AuthInfoVersion_Type);
   16786             : #endif
   16787             : #ifdef PY_AUTHINFO_PATCH
   16788             :         PY_AUTHINFO_PATCH(&AuthInfo_Type);
   16789             : #endif
   16790             : #ifdef PY_AUTHENTICATIONINFORMATION_PATCH
   16791             :         PY_AUTHENTICATIONINFORMATION_PATCH(&AuthenticationInformation_Type);
   16792             : #endif
   16793             : #ifdef PY_AUTHENTICATIONINFORMATIONARRAY_PATCH
   16794             :         PY_AUTHENTICATIONINFORMATIONARRAY_PATCH(&AuthenticationInformationArray_Type);
   16795             : #endif
   16796             : #ifdef PY_TRUSTAUTHINOUTBLOB_PATCH
   16797             :         PY_TRUSTAUTHINOUTBLOB_PATCH(&trustAuthInOutBlob_Type);
   16798             : #endif
   16799             : #ifdef PY_TRUSTDOMAINPASSWORDS_PATCH
   16800             :         PY_TRUSTDOMAINPASSWORDS_PATCH(&trustDomainPasswords_Type);
   16801             : #endif
   16802             : #ifdef PY_DSCOMPRESSEDCHUNK_PATCH
   16803             :         PY_DSCOMPRESSEDCHUNK_PATCH(&DsCompressedChunk_Type);
   16804             : #endif
   16805             : #ifdef PY_EXTENDEDERRORASTRING_PATCH
   16806             :         PY_EXTENDEDERRORASTRING_PATCH(&ExtendedErrorAString_Type);
   16807             : #endif
   16808             : #ifdef PY_EXTENDEDERRORUSTRING_PATCH
   16809             :         PY_EXTENDEDERRORUSTRING_PATCH(&ExtendedErrorUString_Type);
   16810             : #endif
   16811             : #ifdef PY_EXTENDEDERRORBLOB_PATCH
   16812             :         PY_EXTENDEDERRORBLOB_PATCH(&ExtendedErrorBlob_Type);
   16813             : #endif
   16814             : #ifdef PY_EXTENDEDERRORCOMPUTERNAMEU_PATCH
   16815             :         PY_EXTENDEDERRORCOMPUTERNAMEU_PATCH(&ExtendedErrorComputerNameU_Type);
   16816             : #endif
   16817             : #ifdef PY_EXTENDEDERRORCOMPUTERNAME_PATCH
   16818             :         PY_EXTENDEDERRORCOMPUTERNAME_PATCH(&ExtendedErrorComputerName_Type);
   16819             : #endif
   16820             : #ifdef PY_EXTENDEDERRORPARAMU_PATCH
   16821             :         PY_EXTENDEDERRORPARAMU_PATCH(&ExtendedErrorParamU_Type);
   16822             : #endif
   16823             : #ifdef PY_EXTENDEDERRORPARAM_PATCH
   16824             :         PY_EXTENDEDERRORPARAM_PATCH(&ExtendedErrorParam_Type);
   16825             : #endif
   16826             : #ifdef PY_EXTENDEDERRORINFO_PATCH
   16827             :         PY_EXTENDEDERRORINFO_PATCH(&ExtendedErrorInfo_Type);
   16828             : #endif
   16829             : #ifdef PY_EXTENDEDERRORINFOPTR_PATCH
   16830             :         PY_EXTENDEDERRORINFOPTR_PATCH(&ExtendedErrorInfoPtr_Type);
   16831             : #endif
   16832             : #ifdef PY_FORESTTRUSTSTRING_PATCH
   16833             :         PY_FORESTTRUSTSTRING_PATCH(&ForestTrustString_Type);
   16834             : #endif
   16835             : #ifdef PY_FORESTTRUSTDATADOMAININFO_PATCH
   16836             :         PY_FORESTTRUSTDATADOMAININFO_PATCH(&ForestTrustDataDomainInfo_Type);
   16837             : #endif
   16838             : #ifdef PY_FORESTTRUSTDATABINARYDATA_PATCH
   16839             :         PY_FORESTTRUSTDATABINARYDATA_PATCH(&ForestTrustDataBinaryData_Type);
   16840             : #endif
   16841             : #ifdef PY_FORESTTRUSTDATA_PATCH
   16842             :         PY_FORESTTRUSTDATA_PATCH(&ForestTrustData_Type);
   16843             : #endif
   16844             : #ifdef PY_FORESTTRUSTINFORECORD_PATCH
   16845             :         PY_FORESTTRUSTINFORECORD_PATCH(&ForestTrustInfoRecord_Type);
   16846             : #endif
   16847             : #ifdef PY_FORESTTRUSTINFORECORDARMOR_PATCH
   16848             :         PY_FORESTTRUSTINFORECORDARMOR_PATCH(&ForestTrustInfoRecordArmor_Type);
   16849             : #endif
   16850             : #ifdef PY_FORESTTRUSTINFO_PATCH
   16851             :         PY_FORESTTRUSTINFO_PATCH(&ForestTrustInfo_Type);
   16852             : #endif
   16853             : #ifdef PY_PLAINTEXTSECRET_PATCH
   16854             :         PY_PLAINTEXTSECRET_PATCH(&PlaintextSecret_Type);
   16855             : #endif
   16856             : #ifdef PY_ENCRYPTEDSECRETHEADER_PATCH
   16857             :         PY_ENCRYPTEDSECRETHEADER_PATCH(&EncryptedSecretHeader_Type);
   16858             : #endif
   16859             : #ifdef PY_ENCRYPTEDSECRET_PATCH
   16860             :         PY_ENCRYPTEDSECRET_PATCH(&EncryptedSecret_Type);
   16861             : #endif
   16862             : #ifdef PY_DRSBLOBS_PATCH
   16863             :         PY_DRSBLOBS_PATCH(&drsblobs_InterfaceType);
   16864             : #endif
   16865             : #ifdef PY_DRSBLOBS_ABSTRACT_SYNTAX_PATCH
   16866             :         PY_DRSBLOBS_ABSTRACT_SYNTAX_PATCH(&drsblobs_SyntaxType);
   16867             : #endif
   16868             : #ifdef PY_ABSTRACT_SYNTAX_PATCH
   16869             :         PY_ABSTRACT_SYNTAX_PATCH(&drsblobs_SyntaxType);
   16870             : #endif
   16871             : 
   16872        7481 :         m = PyModule_Create(&moduledef);
   16873        7481 :         if (m == NULL)
   16874           0 :                 goto out;
   16875             : 
   16876        7481 :         PyModule_AddObject(m, "SUPPLEMENTAL_CREDENTIALS_PREFIX", PyUnicode_FromString("                                                "));
   16877        7481 :         PyModule_AddObject(m, "ENCRYPTED_SECRET_MAGIC_VALUE", PyLong_FromUnsignedLongLong(0xCA5CADED));
   16878        7481 :         PyModule_AddObject(m, "PREFIX_MAP_VERSION_DSDB", PyLong_FromUnsignedLongLong((uint32_t)(PREFIX_MAP_VERSION_DSDB)));
   16879        7481 :         PyModule_AddObject(m, "SUPPLEMENTAL_CREDENTIALS_SIGNATURE", PyLong_FromLong((uint16_t)(SUPPLEMENTAL_CREDENTIALS_SIGNATURE)));
   16880        7481 :         PyModule_AddObject(m, "EXTENDED_ERROR_COMPUTER_NAME_PRESENT", PyLong_FromLong((uint16_t)(EXTENDED_ERROR_COMPUTER_NAME_PRESENT)));
   16881        7481 :         PyModule_AddObject(m, "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT", PyLong_FromLong((uint16_t)(EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT)));
   16882        7481 :         PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING", PyLong_FromLong((uint16_t)(EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING)));
   16883        7481 :         PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING", PyLong_FromLong((uint16_t)(EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING)));
   16884        7481 :         PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_UINT32", PyLong_FromLong((uint16_t)(EXTENDED_ERROR_PARAM_TYPE_UINT32)));
   16885        7481 :         PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_UINT16", PyLong_FromLong((uint16_t)(EXTENDED_ERROR_PARAM_TYPE_UINT16)));
   16886        7481 :         PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_UINT64", PyLong_FromLong((uint16_t)(EXTENDED_ERROR_PARAM_TYPE_UINT64)));
   16887        7481 :         PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_NONE", PyLong_FromLong((uint16_t)(EXTENDED_ERROR_PARAM_TYPE_NONE)));
   16888        7481 :         PyModule_AddObject(m, "EXTENDED_ERROR_PARAM_TYPE_BLOB", PyLong_FromLong((uint16_t)(EXTENDED_ERROR_PARAM_TYPE_BLOB)));
   16889        7481 :         PyModule_AddObject(m, "FOREST_TRUST_TOP_LEVEL_NAME", PyLong_FromLong((uint16_t)(FOREST_TRUST_TOP_LEVEL_NAME)));
   16890        7481 :         PyModule_AddObject(m, "FOREST_TRUST_TOP_LEVEL_NAME_EX", PyLong_FromLong((uint16_t)(FOREST_TRUST_TOP_LEVEL_NAME_EX)));
   16891        7481 :         PyModule_AddObject(m, "FOREST_TRUST_DOMAIN_INFO", PyLong_FromLong((uint16_t)(FOREST_TRUST_DOMAIN_INFO)));
   16892        7481 :         PyModule_AddObject(m, "ENC_SECRET_AES_128_AEAD", PyLong_FromLong((uint16_t)(ENC_SECRET_AES_128_AEAD)));
   16893        6242 :         Py_INCREF((PyObject *)(void *)&replPropertyMetaData1_Type);
   16894        7481 :         PyModule_AddObject(m, "replPropertyMetaData1", (PyObject *)(void *)&replPropertyMetaData1_Type);
   16895        6242 :         Py_INCREF((PyObject *)(void *)&replPropertyMetaDataCtr1_Type);
   16896        7481 :         PyModule_AddObject(m, "replPropertyMetaDataCtr1", (PyObject *)(void *)&replPropertyMetaDataCtr1_Type);
   16897        6242 :         Py_INCREF((PyObject *)(void *)&replPropertyMetaDataCtr_Type);
   16898        7481 :         PyModule_AddObject(m, "replPropertyMetaDataCtr", (PyObject *)(void *)&replPropertyMetaDataCtr_Type);
   16899        6242 :         Py_INCREF((PyObject *)(void *)&replPropertyMetaDataBlob_Type);
   16900        7481 :         PyModule_AddObject(m, "replPropertyMetaDataBlob", (PyObject *)(void *)&replPropertyMetaDataBlob_Type);
   16901        6242 :         Py_INCREF((PyObject *)(void *)&replUpToDateVectorCtr1_Type);
   16902        7481 :         PyModule_AddObject(m, "replUpToDateVectorCtr1", (PyObject *)(void *)&replUpToDateVectorCtr1_Type);
   16903        6242 :         Py_INCREF((PyObject *)(void *)&replUpToDateVectorCtr2_Type);
   16904        7481 :         PyModule_AddObject(m, "replUpToDateVectorCtr2", (PyObject *)(void *)&replUpToDateVectorCtr2_Type);
   16905        6242 :         Py_INCREF((PyObject *)(void *)&replUpToDateVectorCtr_Type);
   16906        7481 :         PyModule_AddObject(m, "replUpToDateVectorCtr", (PyObject *)(void *)&replUpToDateVectorCtr_Type);
   16907        6242 :         Py_INCREF((PyObject *)(void *)&replUpToDateVectorBlob_Type);
   16908        7481 :         PyModule_AddObject(m, "replUpToDateVectorBlob", (PyObject *)(void *)&replUpToDateVectorBlob_Type);
   16909        6242 :         Py_INCREF((PyObject *)(void *)&repsFromTo1OtherInfo_Type);
   16910        7481 :         PyModule_AddObject(m, "repsFromTo1OtherInfo", (PyObject *)(void *)&repsFromTo1OtherInfo_Type);
   16911        6242 :         Py_INCREF((PyObject *)(void *)&repsFromTo1_Type);
   16912        7481 :         PyModule_AddObject(m, "repsFromTo1", (PyObject *)(void *)&repsFromTo1_Type);
   16913        6242 :         Py_INCREF((PyObject *)(void *)&repsFromTo2OtherInfo_Type);
   16914        7481 :         PyModule_AddObject(m, "repsFromTo2OtherInfo", (PyObject *)(void *)&repsFromTo2OtherInfo_Type);
   16915        6242 :         Py_INCREF((PyObject *)(void *)&repsFromTo2_Type);
   16916        7481 :         PyModule_AddObject(m, "repsFromTo2", (PyObject *)(void *)&repsFromTo2_Type);
   16917        6242 :         Py_INCREF((PyObject *)(void *)&repsFromTo_Type);
   16918        7481 :         PyModule_AddObject(m, "repsFromTo", (PyObject *)(void *)&repsFromTo_Type);
   16919        6242 :         Py_INCREF((PyObject *)(void *)&repsFromToBlob_Type);
   16920        7481 :         PyModule_AddObject(m, "repsFromToBlob", (PyObject *)(void *)&repsFromToBlob_Type);
   16921        6242 :         Py_INCREF((PyObject *)(void *)&scheduleHeader_Type);
   16922        7481 :         PyModule_AddObject(m, "scheduleHeader", (PyObject *)(void *)&scheduleHeader_Type);
   16923        6242 :         Py_INCREF((PyObject *)(void *)&scheduleSlots_Type);
   16924        7481 :         PyModule_AddObject(m, "scheduleSlots", (PyObject *)(void *)&scheduleSlots_Type);
   16925        6242 :         Py_INCREF((PyObject *)(void *)&schedule_Type);
   16926        7481 :         PyModule_AddObject(m, "schedule", (PyObject *)(void *)&schedule_Type);
   16927        6242 :         Py_INCREF((PyObject *)(void *)&partialAttributeSetCtr1_Type);
   16928        7481 :         PyModule_AddObject(m, "partialAttributeSetCtr1", (PyObject *)(void *)&partialAttributeSetCtr1_Type);
   16929        6242 :         Py_INCREF((PyObject *)(void *)&partialAttributeSetCtr_Type);
   16930        7481 :         PyModule_AddObject(m, "partialAttributeSetCtr", (PyObject *)(void *)&partialAttributeSetCtr_Type);
   16931        6242 :         Py_INCREF((PyObject *)(void *)&partialAttributeSetBlob_Type);
   16932        7481 :         PyModule_AddObject(m, "partialAttributeSetBlob", (PyObject *)(void *)&partialAttributeSetBlob_Type);
   16933        6242 :         Py_INCREF((PyObject *)(void *)&schemaInfoBlob_Type);
   16934        7481 :         PyModule_AddObject(m, "schemaInfoBlob", (PyObject *)(void *)&schemaInfoBlob_Type);
   16935        6242 :         Py_INCREF((PyObject *)(void *)&drsuapi_MSPrefixMap_Entry_Type);
   16936        7481 :         PyModule_AddObject(m, "drsuapi_MSPrefixMap_Entry", (PyObject *)(void *)&drsuapi_MSPrefixMap_Entry_Type);
   16937        6242 :         Py_INCREF((PyObject *)(void *)&drsuapi_MSPrefixMap_Ctr_Type);
   16938        7481 :         PyModule_AddObject(m, "drsuapi_MSPrefixMap_Ctr", (PyObject *)(void *)&drsuapi_MSPrefixMap_Ctr_Type);
   16939        6242 :         Py_INCREF((PyObject *)(void *)&prefixMapCtr_Type);
   16940        7481 :         PyModule_AddObject(m, "prefixMapCtr", (PyObject *)(void *)&prefixMapCtr_Type);
   16941        6242 :         Py_INCREF((PyObject *)(void *)&prefixMapBlob_Type);
   16942        7481 :         PyModule_AddObject(m, "prefixMapBlob", (PyObject *)(void *)&prefixMapBlob_Type);
   16943        6242 :         Py_INCREF((PyObject *)(void *)&ldapControlDirSyncExtra_Type);
   16944        7481 :         PyModule_AddObject(m, "ldapControlDirSyncExtra", (PyObject *)(void *)&ldapControlDirSyncExtra_Type);
   16945        6242 :         Py_INCREF((PyObject *)(void *)&ldapControlDirSyncBlob_Type);
   16946        7481 :         PyModule_AddObject(m, "ldapControlDirSyncBlob", (PyObject *)(void *)&ldapControlDirSyncBlob_Type);
   16947        6242 :         Py_INCREF((PyObject *)(void *)&ldapControlDirSyncCookie_Type);
   16948        7481 :         PyModule_AddObject(m, "ldapControlDirSyncCookie", (PyObject *)(void *)&ldapControlDirSyncCookie_Type);
   16949        6242 :         Py_INCREF((PyObject *)(void *)&supplementalCredentialsPackage_Type);
   16950        7481 :         PyModule_AddObject(m, "supplementalCredentialsPackage", (PyObject *)(void *)&supplementalCredentialsPackage_Type);
   16951        6242 :         Py_INCREF((PyObject *)(void *)&supplementalCredentialsSubBlob_Type);
   16952        7481 :         PyModule_AddObject(m, "supplementalCredentialsSubBlob", (PyObject *)(void *)&supplementalCredentialsSubBlob_Type);
   16953        6242 :         Py_INCREF((PyObject *)(void *)&supplementalCredentialsBlob_Type);
   16954        7481 :         PyModule_AddObject(m, "supplementalCredentialsBlob", (PyObject *)(void *)&supplementalCredentialsBlob_Type);
   16955        6242 :         Py_INCREF((PyObject *)(void *)&package_PackagesBlob_Type);
   16956        7481 :         PyModule_AddObject(m, "package_PackagesBlob", (PyObject *)(void *)&package_PackagesBlob_Type);
   16957        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosString_Type);
   16958        7481 :         PyModule_AddObject(m, "package_PrimaryKerberosString", (PyObject *)(void *)&package_PrimaryKerberosString_Type);
   16959        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosKey3_Type);
   16960        7481 :         PyModule_AddObject(m, "package_PrimaryKerberosKey3", (PyObject *)(void *)&package_PrimaryKerberosKey3_Type);
   16961        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosCtr3_Type);
   16962        7481 :         PyModule_AddObject(m, "package_PrimaryKerberosCtr3", (PyObject *)(void *)&package_PrimaryKerberosCtr3_Type);
   16963        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosKey4_Type);
   16964        7481 :         PyModule_AddObject(m, "package_PrimaryKerberosKey4", (PyObject *)(void *)&package_PrimaryKerberosKey4_Type);
   16965        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosCtr4_Type);
   16966        7481 :         PyModule_AddObject(m, "package_PrimaryKerberosCtr4", (PyObject *)(void *)&package_PrimaryKerberosCtr4_Type);
   16967        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosCtr_Type);
   16968        7481 :         PyModule_AddObject(m, "package_PrimaryKerberosCtr", (PyObject *)(void *)&package_PrimaryKerberosCtr_Type);
   16969        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimaryKerberosBlob_Type);
   16970        7481 :         PyModule_AddObject(m, "package_PrimaryKerberosBlob", (PyObject *)(void *)&package_PrimaryKerberosBlob_Type);
   16971        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimaryCLEARTEXTBlob_Type);
   16972        7481 :         PyModule_AddObject(m, "package_PrimaryCLEARTEXTBlob", (PyObject *)(void *)&package_PrimaryCLEARTEXTBlob_Type);
   16973        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimaryWDigestHash_Type);
   16974        7481 :         PyModule_AddObject(m, "package_PrimaryWDigestHash", (PyObject *)(void *)&package_PrimaryWDigestHash_Type);
   16975        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimaryWDigestBlob_Type);
   16976        7481 :         PyModule_AddObject(m, "package_PrimaryWDigestBlob", (PyObject *)(void *)&package_PrimaryWDigestBlob_Type);
   16977        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimarySambaGPGBlob_Type);
   16978        7481 :         PyModule_AddObject(m, "package_PrimarySambaGPGBlob", (PyObject *)(void *)&package_PrimarySambaGPGBlob_Type);
   16979        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimaryUserPasswordValue_Type);
   16980        7481 :         PyModule_AddObject(m, "package_PrimaryUserPasswordValue", (PyObject *)(void *)&package_PrimaryUserPasswordValue_Type);
   16981        6242 :         Py_INCREF((PyObject *)(void *)&package_PrimaryUserPasswordBlob_Type);
   16982        7481 :         PyModule_AddObject(m, "package_PrimaryUserPasswordBlob", (PyObject *)(void *)&package_PrimaryUserPasswordBlob_Type);
   16983        6242 :         Py_INCREF((PyObject *)(void *)&AuthInfoNone_Type);
   16984        7481 :         PyModule_AddObject(m, "AuthInfoNone", (PyObject *)(void *)&AuthInfoNone_Type);
   16985        6242 :         Py_INCREF((PyObject *)(void *)&AuthInfoNT4Owf_Type);
   16986        7481 :         PyModule_AddObject(m, "AuthInfoNT4Owf", (PyObject *)(void *)&AuthInfoNT4Owf_Type);
   16987        6242 :         Py_INCREF((PyObject *)(void *)&AuthInfoClear_Type);
   16988        7481 :         PyModule_AddObject(m, "AuthInfoClear", (PyObject *)(void *)&AuthInfoClear_Type);
   16989        6242 :         Py_INCREF((PyObject *)(void *)&AuthInfoVersion_Type);
   16990        7481 :         PyModule_AddObject(m, "AuthInfoVersion", (PyObject *)(void *)&AuthInfoVersion_Type);
   16991        6242 :         Py_INCREF((PyObject *)(void *)&AuthInfo_Type);
   16992        7481 :         PyModule_AddObject(m, "AuthInfo", (PyObject *)(void *)&AuthInfo_Type);
   16993        6242 :         Py_INCREF((PyObject *)(void *)&AuthenticationInformation_Type);
   16994        7481 :         PyModule_AddObject(m, "AuthenticationInformation", (PyObject *)(void *)&AuthenticationInformation_Type);
   16995        6242 :         Py_INCREF((PyObject *)(void *)&AuthenticationInformationArray_Type);
   16996        7481 :         PyModule_AddObject(m, "AuthenticationInformationArray", (PyObject *)(void *)&AuthenticationInformationArray_Type);
   16997        6242 :         Py_INCREF((PyObject *)(void *)&trustAuthInOutBlob_Type);
   16998        7481 :         PyModule_AddObject(m, "trustAuthInOutBlob", (PyObject *)(void *)&trustAuthInOutBlob_Type);
   16999        6242 :         Py_INCREF((PyObject *)(void *)&trustDomainPasswords_Type);
   17000        7481 :         PyModule_AddObject(m, "trustDomainPasswords", (PyObject *)(void *)&trustDomainPasswords_Type);
   17001        6242 :         Py_INCREF((PyObject *)(void *)&DsCompressedChunk_Type);
   17002        7481 :         PyModule_AddObject(m, "DsCompressedChunk", (PyObject *)(void *)&DsCompressedChunk_Type);
   17003        6242 :         Py_INCREF((PyObject *)(void *)&ExtendedErrorAString_Type);
   17004        7481 :         PyModule_AddObject(m, "ExtendedErrorAString", (PyObject *)(void *)&ExtendedErrorAString_Type);
   17005        6242 :         Py_INCREF((PyObject *)(void *)&ExtendedErrorUString_Type);
   17006        7481 :         PyModule_AddObject(m, "ExtendedErrorUString", (PyObject *)(void *)&ExtendedErrorUString_Type);
   17007        6242 :         Py_INCREF((PyObject *)(void *)&ExtendedErrorBlob_Type);
   17008        7481 :         PyModule_AddObject(m, "ExtendedErrorBlob", (PyObject *)(void *)&ExtendedErrorBlob_Type);
   17009        6242 :         Py_INCREF((PyObject *)(void *)&ExtendedErrorComputerNameU_Type);
   17010        7481 :         PyModule_AddObject(m, "ExtendedErrorComputerNameU", (PyObject *)(void *)&ExtendedErrorComputerNameU_Type);
   17011        6242 :         Py_INCREF((PyObject *)(void *)&ExtendedErrorComputerName_Type);
   17012        7481 :         PyModule_AddObject(m, "ExtendedErrorComputerName", (PyObject *)(void *)&ExtendedErrorComputerName_Type);
   17013        6242 :         Py_INCREF((PyObject *)(void *)&ExtendedErrorParamU_Type);
   17014        7481 :         PyModule_AddObject(m, "ExtendedErrorParamU", (PyObject *)(void *)&ExtendedErrorParamU_Type);
   17015        6242 :         Py_INCREF((PyObject *)(void *)&ExtendedErrorParam_Type);
   17016        7481 :         PyModule_AddObject(m, "ExtendedErrorParam", (PyObject *)(void *)&ExtendedErrorParam_Type);
   17017        6242 :         Py_INCREF((PyObject *)(void *)&ExtendedErrorInfo_Type);
   17018        7481 :         PyModule_AddObject(m, "ExtendedErrorInfo", (PyObject *)(void *)&ExtendedErrorInfo_Type);
   17019        6242 :         Py_INCREF((PyObject *)(void *)&ExtendedErrorInfoPtr_Type);
   17020        7481 :         PyModule_AddObject(m, "ExtendedErrorInfoPtr", (PyObject *)(void *)&ExtendedErrorInfoPtr_Type);
   17021        6242 :         Py_INCREF((PyObject *)(void *)&ForestTrustString_Type);
   17022        7481 :         PyModule_AddObject(m, "ForestTrustString", (PyObject *)(void *)&ForestTrustString_Type);
   17023        6242 :         Py_INCREF((PyObject *)(void *)&ForestTrustDataDomainInfo_Type);
   17024        7481 :         PyModule_AddObject(m, "ForestTrustDataDomainInfo", (PyObject *)(void *)&ForestTrustDataDomainInfo_Type);
   17025        6242 :         Py_INCREF((PyObject *)(void *)&ForestTrustDataBinaryData_Type);
   17026        7481 :         PyModule_AddObject(m, "ForestTrustDataBinaryData", (PyObject *)(void *)&ForestTrustDataBinaryData_Type);
   17027        6242 :         Py_INCREF((PyObject *)(void *)&ForestTrustData_Type);
   17028        7481 :         PyModule_AddObject(m, "ForestTrustData", (PyObject *)(void *)&ForestTrustData_Type);
   17029        6242 :         Py_INCREF((PyObject *)(void *)&ForestTrustInfoRecord_Type);
   17030        7481 :         PyModule_AddObject(m, "ForestTrustInfoRecord", (PyObject *)(void *)&ForestTrustInfoRecord_Type);
   17031        6242 :         Py_INCREF((PyObject *)(void *)&ForestTrustInfoRecordArmor_Type);
   17032        7481 :         PyModule_AddObject(m, "ForestTrustInfoRecordArmor", (PyObject *)(void *)&ForestTrustInfoRecordArmor_Type);
   17033        6242 :         Py_INCREF((PyObject *)(void *)&ForestTrustInfo_Type);
   17034        7481 :         PyModule_AddObject(m, "ForestTrustInfo", (PyObject *)(void *)&ForestTrustInfo_Type);
   17035        6242 :         Py_INCREF((PyObject *)(void *)&PlaintextSecret_Type);
   17036        7481 :         PyModule_AddObject(m, "PlaintextSecret", (PyObject *)(void *)&PlaintextSecret_Type);
   17037        6242 :         Py_INCREF((PyObject *)(void *)&EncryptedSecretHeader_Type);
   17038        7481 :         PyModule_AddObject(m, "EncryptedSecretHeader", (PyObject *)(void *)&EncryptedSecretHeader_Type);
   17039        6242 :         Py_INCREF((PyObject *)(void *)&EncryptedSecret_Type);
   17040        7481 :         PyModule_AddObject(m, "EncryptedSecret", (PyObject *)(void *)&EncryptedSecret_Type);
   17041        6242 :         Py_INCREF((PyObject *)(void *)&drsblobs_InterfaceType);
   17042        7481 :         PyModule_AddObject(m, "drsblobs", (PyObject *)(void *)&drsblobs_InterfaceType);
   17043        6242 :         Py_INCREF((PyObject *)(void *)&drsblobs_SyntaxType);
   17044        7481 :         PyModule_AddObject(m, "drsblobs_abstract_syntax", (PyObject *)(void *)&drsblobs_SyntaxType);
   17045        6242 :         Py_INCREF((PyObject *)(void *)&drsblobs_SyntaxType);
   17046        7481 :         PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&drsblobs_SyntaxType);
   17047             : #ifdef PY_MOD_DRSBLOBS_PATCH
   17048             :         PY_MOD_DRSBLOBS_PATCH(m);
   17049             : #endif
   17050        7481 :         out:
   17051        7481 :         Py_XDECREF(dep_samba_dcerpc_drsuapi);
   17052        7481 :         Py_XDECREF(dep_samba_dcerpc_misc);
   17053        7481 :         Py_XDECREF(dep_samba_dcerpc_samr);
   17054        7481 :         Py_XDECREF(dep_samba_dcerpc_lsa);
   17055        7481 :         Py_XDECREF(dep_samba_dcerpc_security);
   17056        7481 :         Py_XDECREF(dep_talloc);
   17057        7481 :         Py_XDECREF(dep_samba_dcerpc_base);
   17058        7289 :         return m;
   17059             : 
   17060             : }

Generated by: LCOV version 1.14