LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - py_drsuapi.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 3307 23260 14.2 %
Date: 2021-09-23 10:06:22 Functions: 257 1870 13.7 %

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